The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi all,
Looking for some conditionals that correspond to the navbar template. Example If I am on showthread page, I would like to call the title of thread (first post) in the navbar. Something like this Code:
<vb:if condition="THIS_SCRIPT == 'showthread'"> {raw thread.info[post]} </vb:if> Or if it needs a plugin? Thanks Mick |
#3
|
|||
|
|||
![]()
I think vbulletin.org was lagging earlier as I replied to this?
That worked perfect, I have tried to thank you in the last two posts where you have helped me but it says I cannot thank you because you was the last person I thanked... just shows how helpful you are ![]() Thank you very much for the code. Mick |
#4
|
|||
|
|||
![]()
Thanks. Looking at it again, you might want vb:raw instead of vb:var - I was thinking you should handle any html tags, but the SHOWTHREAD template uses vb:raw so it must be handled elsewhere.
|
#5
|
|||
|
|||
![]()
Cheers, I changed it to raw
![]() Can I ask what the difference is as both worked ? Just for future reference. Regards Mick |
#6
|
|||
|
|||
![]()
The only difference is that 'var' will run the value through htmlspecialchars(), which encodes html characters like '<' and '>' (as < and >
![]() I have to admit I don't know offhand how it's handled - maybe those characters aren't allowed at all in thread titles or something. But you could do a test by creating a thread with a title like '<b>Bold</b>' and then see if vb:raw looks different than vb:var. Edit: I just went ahead and tried it. If you create a thread with title '<b>Bold</b>' and use vb:var you get <b>Bold</b>, which means that htmlspecialchars is being applied twice. So you need to use vb:raw in this case, or you might end up with strange things like that. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|