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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-08-2012, 09:44 AM
Linue_DarkStar Linue_DarkStar is offline
 
Join Date: Apr 2011
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Fields in Postbit...

So I'm looking for a way to have Custom Profile Fields show up in the Postbit, but instead of text, an image.

So say someone chooses Cadet (Rank) in a Custom Profile Field I made, well in the Postbit an image would show up, and if you change the Rank the image changes too.

This is some coding I have thus far....

<center><vb:if condition="$post['field5']">
<div><img src="www.clanpf.com/forums/images/bTech/misc/$post['field5'].png" alt="$post['field5']" /></div></center>
</vb:if>

I found it from here...https://vborg.vbsupport.ru/archive/i.../t-118896.html
Reply With Quote
  #2  
Old 01-08-2012, 02:24 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That looks like a good start, have you tried it? You need to create a custom profile field if you haven't already, then have the values be part or all of the image file names. Of course you'd change '5' to the number of your custom profile field.
Reply With Quote
  #3  
Old 01-08-2012, 09:08 PM
Linue_DarkStar Linue_DarkStar is offline
 
Join Date: Apr 2011
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've named the images the same as the ranks, and the field is 5. It still wants to error out.
Attached Images
File Type: jpg Issue 4.jpg (80.7 KB, 0 views)
Reply With Quote
  #4  
Old 01-08-2012, 09:31 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh..sorry. It's written for vb3. You need to change each $post['field5'] to {vb:raw post.field5}
Reply With Quote
  #5  
Old 01-09-2012, 02:18 AM
Linue_DarkStar Linue_DarkStar is offline
 
Join Date: Apr 2011
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Each one?

So it should look like this?

<center><vb:if condition="{vb:raw post.field5}"><img src="www.clanpf.com/forums/images/misc/{vb:raw post.field5}.png" alt="{vb:raw post.field5}" /></center>
</vb:if>

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

Well I changed the coding to...

<center><vb:if condition="$post['field7']"><img src="www.clanpf.com/forums/images/misc/{vb:raw post.field7}.png" alt="{vb:raw post.field7}" /></center>
</vb:if>

And it seems to apply the Name, but still isn't finding the image with the same name.
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 01:46 AM.


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.06704 seconds
  • Memory Usage 2,210KB
  • Queries Executed 12 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (5)postbit_onlinestatus
  • (5)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_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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete