Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 04-04-2009, 10:48 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Advice

Ladies and Gentlemen I would like to take this moment to thank you for reading my post, any and all suggestions will be taken on board.

I run a Sports website (and forum obviously) and what I am trying to get at (and I have seen it on a number of forums but cant find it anywhere) is when people register there is an added field for them to select (or type) what sporting team they follow.

Once they do that it is then displayed on their profile, and postbit - I have seen on many websites that they have postbit background images where admins, and co have like a wallpaper background, well what I would like to get to having is that when these people sign up they select from a drop down menu what team they support - once they select and finish registration they then get the wallpaper type background in their postbit which will be one from their team.

A good example can be seen here: http://forums.rleague.com not everyone has it in their posts but some people do (I can give you a direct link to people who do if required) - thats the type of thing I would like to have set up on my forum, but where everyone selects a team and has the postbit background.

Any help would be greatfully appreciated, or instructions on how to do it - I truly appreciate anyone taking the time to reply.
Reply With Quote
  #2  
Old 04-04-2009, 12:38 PM
TigerC10's Avatar
TigerC10 TigerC10 is offline
 
Join Date: Apr 2006
Location: Austin, TX
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, profile fields are probably the way to go here.

http://www.vbulletin.com/docs/html/main/profile_add

Using a single-selection menu will allow you to put a background or an image in the postbit. However, you are limited to 31 options total with those.

If you cover more than one sport, you should have multiple single-selection menus for all of the different sports. Then you should have a final selection menu with a listing of all of the different sports so that they can say which sport is their favorite (their "favorite" sport listing will be used to pick out which team background should display).


From there, it becomes a bunch of template alterations. Check this article:

https://vborg.vbsupport.ru/showthread.php?t=118896



It tells you how to access the postbit information. All you've got to do is change up how it is displayed. Instead of adding it to a line in the postbit, you can add it to some code to make a background.
Reply With Quote
  #3  
Old 04-05-2009, 04:38 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you = much appreciated will give it a go and let you know
Reply With Quote
  #4  
Old 04-05-2009, 05:41 AM
Jaiibee's Avatar
Jaiibee Jaiibee is offline
 
Join Date: Sep 2007
Location: Australia
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To add it to the postbit, each Profile Field will have a unique identifier. This can be found next to it in the form of field*

Simply add the following code in the desired placement within your vbulletin templates (eg/ inside the postbit). Replace the * wildcard with the number your Profile Field has.

Code:
$post[field*]
Reply With Quote
  #5  
Old 04-06-2009, 09:24 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your help everyone, I have added the fields, made it where they have to enter information, and have the fields showing on postbit - I am getting better at this stuff I just have to find the codes now to get it so a picture/background shows up for their favorite team - rather than just the plain background.
Reply With Quote
  #6  
Old 04-07-2009, 10:01 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to bother you all again - but was wondering if anyone knew the code to add images for what I want to do with this.
Reply With Quote
  #7  
Old 04-08-2009, 11:40 PM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to bother everyone again but I was wondering if anyone had the code to have a background image in the postbit section - where when a user selects their favorite teams it selects that teams background and so everytime the user posts it displays the background image of their favorite team.
Reply With Quote
  #8  
Old 04-10-2009, 06:12 AM
Jaiibee's Avatar
Jaiibee Jaiibee is offline
 
Join Date: Sep 2007
Location: Australia
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

https://vborg.vbsupport.ru/showthread.php?t=203850

Well this is a start. You could take their code, and change their "Replace with" code to the following:

Code:
<if condition="is_member_of($post, #)">
<td width="175" style="background-image:url(url to image);border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
<else />
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if>
Create the usergroups you want, for example Bostons (usergroup ID of 7) and NY (usergroup ID of 8).
Change # to the usergroup ID of each usergroup, in my example 7 for Bostons, 8 for NY.

Example code:

Code:
<if condition="is_member_of($post, 7)">
<td  width="175" style="background-image:url('images/teams/boston.gif');
border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
<else />
<if condition="is_member_of($post, 8)">
<td class="postbit" width="175" style="background-image:url('images/teams/ny.gif');
border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
<else />
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
</if>
</if>
Do you get what I mean?
You may be looking at a number of if statements, so if you're alright with that, than sweet <3
Reply With Quote
  #9  
Old 04-10-2009, 12:39 PM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah i get ya thanks - its late here in the land of Australia but I will give it a crack in the morning Thanks for your help

--------------- Added [DATE]1239370941[/DATE] at [TIME]1239370941[/TIME] ---------------

So just so I understand you still think best idea is to set up usergroups rather than trying to set it up from a Profile Field where they select their favorite team?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:09 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08029 seconds
  • Memory Usage 2,239KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete