Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-22-2009, 08:06 PM
n00bl3t n00bl3t is offline
 
Join Date: Dec 2008
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default User Profile Field Help

Well I posted this up at vbulletin.com but they said to maybe try asking here, vbulletin.org
^^

Quote:
Originally Posted by n00bl3t View Post
Well I created a field for users to select their gamer tag so the are recognized by other community members of what they belong to because I run a multi gaming community and I am expanding into other games; WoW, Counter Strike, steam games and what not.

So I have this profile field that works just great, the people can choose their gamer position. Example, i just registered and picked Counter Strike Source. So now when I go to my profile, and click "About Me" my Gaming Field says: Counter-Strike Source.

That is all great and stuff, but I am trying to make it so when I make a new post or thread, on the side, under my name, will display a picture that I would give that field. I hope someone understands this and can send a link that helps with this.

It is kinda like a user rank, but nothing within the user ranks can fix this and the user doesnt belong to a usergroup so it can't use user ranks.


So again, brief explanation: user picks his "Gaming Field" and then when he posts, a picture will display under his name his gaming field. ^^
Reply With Quote
  #2  
Old 07-22-2009, 10:02 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="$post['fieldX']"><img src="path/to/image" /></if>
? If you want their custom option to appear also:
Code:
<if condition="$post['fieldX']">$post[fieldX]<br /><img src="path/to/image" /></if>
Put that in the template postbit/postbit legacy depending on what you use. Replace X with the field number (can be found in profile fields in ACP). Remember, in the actual code, $post[fieldX] has no '' around it.
Reply With Quote
  #3  
Old 07-22-2009, 10:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What kind of profile field did you create? Do they select the field from a dropdown? If so, see the second post in here - How To Add A Profile Field To The Postbit
Reply With Quote
  #4  
Old 07-22-2009, 11:30 PM
n00bl3t n00bl3t is offline
 
Join Date: Dec 2008
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by James Birkett View Post
Code:
<if condition="$post['fieldX']">$post[fieldX]<br /><img src="path/to/image" /></if>
Put that in the template postbit/postbit legacy depending on what you use. Replace X with the field number (can be found in profile fields in ACP). Remember, in the actual code, $post[fieldX] has no '' around it.
Is there a specific spot to put this or at the bottom should do it?
Reply With Quote
  #5  
Old 07-22-2009, 11:35 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Depends on where you want it to appear. Under Postcount? Location? Usertitle? I don't know if this works for drop-downs.. so if not you'll have to come back.
Reply With Quote
  #6  
Old 07-22-2009, 11:41 PM
n00bl3t n00bl3t is offline
 
Join Date: Dec 2008
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, so the code worked, field 6, blah blah and the image comes up however as soon as I added it I noticed a problem. Within field 6 the user has many different options to pick from and from those options need to display the picture, not from the field. Know what I mean?

Edit: I got it to post under the avatar and again it works, just need to know have the picture depending on what the user picks within the field 6.
Reply With Quote
  #7  
Old 07-22-2009, 11:43 PM
H3C x Nevz H3C x Nevz is offline
 
Join Date: Mar 2009
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to pick a specific spot, tell me and I'll show you where to put the code.

One way to answer your above dilemma would be to make a dropdown box for the games, and label the images the same as the field. For instance, one of the options for your users is Counterstrike, so upload all of your images to the same spot, and label the image "Counterstrike.png" so you can just do <img src="pathtoimage.com/$post[fieldX].png">. Get what I'm saying?
Reply With Quote
  #8  
Old 07-22-2009, 11:51 PM
n00bl3t n00bl3t is offline
 
Join Date: Dec 2008
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I created a Single-Selection Menu and right now it has 3 example options:

Counter Strike: Source
WarCraft 3
Other

.................................................. .................

A user selects CS:S and then his/her posts will display a CS:S image under his/her avatar. I know where to know set the stuff to display it under the avatar, I just do not know how to make it so the image displays the persons selection they made.

If the person made the WarCraft 3 selection, how would I display that specific image, etc, etc with other options?
Reply With Quote
  #9  
Old 07-23-2009, 12:17 AM
H3C x Nevz H3C x Nevz is offline
 
Join Date: Mar 2009
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you wanted to do my method, you'd need to delete the colon in CounterStrike Source. Then, upload your image as "Counterstrike Source.png" with the space. Then upload a corresponding image for Warcraft as "WarCraft 3.png", uploaded at the SAME spot. Then a corresponding image at "Other.png", but you'd still need an image. Then, use this code:

<img src="pathtoimage.com/$post[fieldX].png">

Of course, replacing pathtoimage.com with wherever you uploaded the images, and the X with the field number.
Reply With Quote
  #10  
Old 07-23-2009, 10:16 AM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by H3C x Nevz View Post
If you wanted to do my method, you'd need to delete the colon in CounterStrike Source. Then, upload your image as "Counterstrike Source.png" with the space. Then upload a corresponding image for Warcraft as "WarCraft 3.png", uploaded at the SAME spot. Then a corresponding image at "Other.png", but you'd still need an image. Then, use this code:

<img src="pathtoimage.com/$post[fieldX].png">

Of course, replacing pathtoimage.com with wherever you uploaded the images, and the X with the field number.
What he's trying to say is. Upload your images with exactly the same name as the option (don't add the extension) they choose, and then when they choose that option it will automatically select the image using path/to/image/$post[fieldX].png">
Reply With Quote
Reply


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 02:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04414 seconds
  • Memory Usage 2,256KB
  • 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
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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