The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Conditionals on mod (THIS_SCRIPT)
vBulletin allows the use of <if condition="THIS_SCRIPT == 'page'">
to display different things based on the current page. How do I get the similar affect with vBAdvanced? They wouldn't provide any support to me since it's a mod. I installed the vBAdvanced Homepage mod which is at: mydomain.com/index.php. All of the regular forum pages are at: mydomain.com/forum/xxx.php I added the following to the phpinclude_start template: define('THIS_SCRIPT2', '../page'); I wanted to use the same header file for all pages instead of the index_header on the vBAdvance page. In the header template, I added: <if condition="$THIS_SCRIPT2 == 'index'"> do something <else /> do this instead </if> It doesn't work. Am I doing something wrong? |
#2
|
|||
|
|||
you will not receive any support relatively to vBadvanced as it's a hack with a support forum, and it's not provided as part of vBulletin.. go to vbadvanced.com for this kind of requests...
btw, i suggest you upgrade to CMPS if you want to have a better control on your content. |
#3
|
||||
|
||||
THIS SCRIPT is a varible that is defined on a page,
define('THIS_SCRIPT2', '../page'); that becomes TRUE on EVERY page. If you want it to become true on every page your going to need to do abit more work. |
#4
|
|||
|
|||
Quote:
PHP Code:
PHP Code:
|
#5
|
|||
|
|||
Quote:
The problem is that $THIS_SCRIPT only recognized php files in the directory of the forum. It doesn't work with things that are outside of the forum directory. That's why I was trying to figure out how to do something similar that recognizes php files in a different directory level. What I'll do then, is just change the name of the vbAdvanced index page and place it in the same directory as the forum and use the server's Mod Rewrite feature to make it appear as if it's in my root directory. The $THIS_SCRIPT will work then. ~ Thanks for your help ~ |
#6
|
||||
|
||||
THIS_SCRIPT works fine outside of the forum directory, i use it on my pages
http://www.usshomestarrunner.com (homeportal) http://www.usshomestarrunner.com/smlinks (smlinks) They both have their own identifiers then i just do <if condition="THIS_SCRIPT == homeportal"> or <if condition="THIS_SCRIPT == smlinks"> |
#7
|
|||
|
|||
Quote:
I'll take a look at CMPS. |
#8
|
|||
|
|||
Quote:
~ Thanks again ~ |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|