Log in

View Full Version : Conditional for all VBulletin pages?


PhilMcKrackon
09-19-2008, 09:26 PM
Trying to display an image ONLY when not viewing a VBulletin page. I'm having trouble with a conditional for this.

Any ideas?

Example: For all VBALinks pages I use <if condition="VBA_SCRIPT != 'links_directory'">

Is there one that can be used for all VBulletin pages?

Thanks,

Lynne
09-20-2008, 03:15 AM
Hmmm, I'm not sure if it would work, but vb pages define the term "THIS_SCRIPT" at the top of it's pages (looks like vba uses VBA_SCRIPT instead). So, maybe
<if condition="!THIS_SCRIPT">
stuff if THIS_SCRIPT is not defined
</if>

(I have not tried this.)

PhilMcKrackon
09-20-2008, 11:20 AM
Thanks for the reply Lynne,

Unfortunately other apps also use the THIS_SCRIPT definition also... I was hoping that there was a variable defined that was ONLY used when viewing the forums. I can do what I want with some creative use of conditionals but it's not pretty. I was looking for something easy... :)

Thanks!

Lynne
09-20-2008, 02:17 PM
Wait a sec... only when viewing the Forums? Or when viewing any vbulletin page at all?

PhilMcKrackon
09-20-2008, 02:34 PM
Only when viewing the vbulletin forums or any page associated with them such as registration, members list, blogs, groups... Any page that is made by Vbulletin - not any page that is created by any of the 3rd part addons I have such as VBalinks, Dynamics or even photopost.

Sorry if I wasn't clearer...

Lynne
09-20-2008, 02:58 PM
Ah, OK. I can't think of a single variable you can use to do that.

Antivirus
09-20-2008, 03:02 PM
What about testing for the absence of the vbulletin object...

<If condition = "!$vbulletin">

Dismounted
09-21-2008, 06:25 AM
What about testing for the absence of the vbulletin object...

<If condition = "!$vbulletin">
Modifications (such as VBA) will still have $vbulletin defined. The only way (I can think of right now), is to compile a list of vBulletin default THIS_SCRIPT constants, and check if the current THIS_SCRIPT is in that list.