vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Conditional for all VBulletin pages? (https://vborg.vbsupport.ru/showthread.php?t=191361)

PhilMcKrackon 09-19-2008 09:26 PM

Conditional for all VBulletin pages?
 
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
HTML Code:

<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

Quote:

Originally Posted by Antivirus (Post 1626378)
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.


All times are GMT. The time now is 10:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01090 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete