PDA

View Full Version : Postbit not displaying some things for some people


sn1p3r001
09-12-2014, 10:13 AM
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.

<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.

tpearl5
09-12-2014, 11:49 AM
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.

Dave
09-12-2014, 12:11 PM
Refer to http://www.vbulletin.com/docs/html/template_conditionals for the right syntax.

sn1p3r001
09-13-2014, 08:07 PM
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.


<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):

https://vborg.vbsupport.ru/external/2014/09/16.png

This is what it looks like to some users:

https://vborg.vbsupport.ru/external/2014/09/17.png


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!