vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Image won't show in Post Bit (User profile field) (https://vborg.vbsupport.ru/showthread.php?t=314852)

iamjubee 10-12-2014 03:39 AM

Image won't show in Post Bit (User profile field)
 
The user profile field number is 11. Users have to select a sector (game) that they primarily play in and I want that sector to reflect an image in postbit. The selection for 'Sector' are:

GHOSTS
ADVANCED WARFARE
DESTINY

I have uploaded all .jpg images to represent those in forums/images/sector

I have used the code below to insert an image into postbit legacy for a user profile field but getting an image error. What am I doing wrong?

PHP Code:

<div align="left">Sector: </dt>
<
vb:if condition="$post['field11']">
    <
img src="http://www.dom-clan.org/forums/images/sector/{vb:raw post.field11}.jpg" alt="Users Sector!" align="center" border="" /></vb:if></div

I'm getting this:

https://vborg.vbsupport.ru/external/2014/10/13.png


Any help would be greatly appreciated! I am using vB 4.2.2

Daniel 10-12-2014 07:48 AM

Try this:

Code:

<div align="left">Sector: </dt>
<vb:if condition="$userinfo['field11']">
<
img src="http://www.dom-clan.org/forums/images/sector/{
userinfo.field11}.jpg" alt="Users Sector!" align="center" border="" /></vb:if></div>


Lynne 10-12-2014 04:47 PM

If it's in the postbit, then $post should be the correct variable. What type of User Profile Field is field 11 - Single-Selection Radio Button or what?

Have you tried printing out field 11 to see what is in the database?


All times are GMT. The time now is 03:59 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.01006 seconds
  • Memory Usage 1,727KB
  • 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)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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