vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Custom Fields in Postbit... (https://vborg.vbsupport.ru/showthread.php?t=276619)

Linue_DarkStar 01-08-2012 09:44 AM

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

kh99 01-08-2012 02:24 PM

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.

Linue_DarkStar 01-08-2012 09:08 PM

1 Attachment(s)
I've named the images the same as the ranks, and the field is 5. It still wants to error out.

kh99 01-08-2012 09:31 PM

Oh..sorry. It's written for vb3. You need to change each $post['field5'] to {vb:raw post.field5}

Linue_DarkStar 01-09-2012 02:18 AM

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.


All times are GMT. The time now is 02:49 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.01121 seconds
  • Memory Usage 1,717KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete