View Full Version : VB conditional
Blooded
10-20-2010, 01:35 AM
Well i want to know how to add a conditional that made some image or anything i want to show to an specific group but only on some specific templates.
To be more clear, i want to show a register button in all the forum except in the register.php page.
I know there is a template called register but i didn't see any conditional to use on templates, i see for forum id user groups etc but not for templates.
Well thats everything.
Thanks in advance :)
Lynne
10-20-2010, 03:22 AM
Sounds like you want to use THIS_SCRIPT. To show something on all pages but the registration page:
<vb:if condition="THIS_SCRIPT != 'register'">
stuff
</vb:if>
Blooded
10-20-2010, 04:33 AM
yeah thats the one thanks Lynne i search it here:
http://www.vbulletin.com/docs/html/template_conditionals
but didnt find it :(
Lynne
10-20-2010, 01:38 PM
Take a look in the articles forums as there are articles in there that cover a lot more conditionals than those few in the manual.
Blooded
10-22-2010, 09:45 PM
Well i just cant make it work :S
Use this
<vb:if condition="THIS_SCRIPT != 'register'" and "$show['guest']">
But i show to all groups :( is not showing up in the registration page but is not workin for the conditional show
Lynne
10-22-2010, 09:54 PM
A condition is surrounded by double-quotes. You ended your condition right after the condition regarding the script 'register' - it never looked at show.guest. You need to do it more like this:
<vb:if condition="THIS_SCRIPT != 'register' and $show['guest']">
Blooded
10-22-2010, 09:57 PM
Oh i see :D
vbulletin uses the "" like php uses the () for several conditions in one if
thanks a lot :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.