Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 09-12-2014, 10:13 AM
sn1p3r001 sn1p3r001 is offline
 
Join Date: Jun 2013
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Postbit not displaying some things for some people

Hi all,

I've made some modifications to my postbit template to display some custom profile fields. There are three fields.

Field 9 contains the html that I want to display. This displays for some users, but not for others. When it "breaks" it shows the html code.

Field 11 is meant to be a simpler way to accomplish the same task with a simpler input method (just the name of the image, so users don't need to dig through code to see the image they want). This works for some users, but not for others. When it breaks, it shows a broken image icon.

Field 10 dies the same thing as Field 11, and works for everyone.

Code:
<vb: if condition="$post['field9']"><dd>{vb:raw post.field9}</dd></vb: if>
			
<vb: if condition="$post['field11']"><dd><img src="/images/ranks/{vb:raw post.field11}.png" alt="{vb:raw post.field11}" border="" /></dd></vb: if>

<vb: if condition="$post['field10']"> <dd> <img src="/images/buttons/flags/{vb:raw post.field10}.GIF" alt="{vb:raw post.field10}" border="" /> </dd> </vb: if>
Can anybody help me figure out why this isn't working? I'm having trouble since I can't replicate the issue.

I don't think it's a browser issue, since the members who reported the issue are using the same browser as I am (and it works for me). They also report the problem when they switch browsers.

Is this a problem with my code, or perhaps a plugin that's interfering? If that's the case, why does it work for some users, but not for others?

I appreciate the help.
Reply With Quote
  #2  
Old 09-12-2014, 11:49 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It sounds like the data stored in the html field is being parsed incorrectly or is not consistent. There also shouldn't be spaces between vb:if. Field 11 is probably breaking because of case or an incorrect path.

It would be hard to determine exactly what is going on without seeing examples.
Reply With Quote
Благодарность от:
sn1p3r001
  #3  
Old 09-12-2014, 12:11 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Refer to http://www.vbulletin.com/docs/html/t...e_conditionals for the right syntax.
Reply With Quote
Благодарность от:
sn1p3r001
  #4  
Old 09-13-2014, 08:07 PM
sn1p3r001 sn1p3r001 is offline
 
Join Date: Jun 2013
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi guys, appreciate the input.

I've adjusted my syntax to remove the space in the vb:if, but it's not helping. I'm just confused because field10 is set up the same way, but that displays no problem. Would the fields' options have any impact on the display? ex if it's private, searchable, etc.

Code:
		
<vb:if condition="$post['field11']"><dd><img src="/images/ranks/{vb:raw post.field11}.png" alt="{vb:raw post.field11}" border="" /></dd></vb:if>

<vb:if condition="$post['field10']"> <dd> <img src="/images/buttons/flags/{vb:raw post.field10}.GIF" alt="{vb:raw post.field10}" border="" /> </dd> </vb:if>
The case and path for field11 (rank) are definitely correct. It works for most users (myself included). This is what it should look like (field9 has since been removed):



This is what it looks like to some users:




The user who gave me the last image there reports that the rank shows up properly when he is editing or replying to a thread, but if he's just browsing the forums, it's broken.


EDIT; Looks like I answered my own question. I had field11 set to Private, so it wasn't displaying in every case. Changing it to be not private fixed the issue. Thank you both for your help. It's greatly appreciated!
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 12:34 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.03673 seconds
  • Memory Usage 2,191KB
  • 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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (2)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete