The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Coding noob having trouble with <IF> tag
I am looking at using the <IF> statement in one of my templates and I am having trouble, hoping somone here can assist.
I am looking to have on navbar button do 2 different things depending on the current page. So it would look something like this Code:
<if CURRENT PAGE="index.php"> <td align="left" valign="top" width="62" height="69"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img src="$stylevar[imgdir_misc]/nav_home.gif" width="62" height="69" border="0" alt="" /></a></td> <else /> <td align="left" valign="top" width="62" height="69"><a href="/index.php" accesskey="1"><img src="$stylevar[imgdir_misc]/nav_home.gif" width="62" height="69" border="0" alt="" /></a></td> </if> Thanks in advance |
#2
|
|||
|
|||
In the vB PHP files you will find constants:
Code:
// in the index.php file near the top define('THIS_SCRIPT', 'index'); // in the showthread.php file near the top define('THIS_SCRIPT', 'showthread'); Code:
<if condition="THIS_SCRIPT == 'index'"> on forum index page <else /> not on forum index page </if> <if condition="THIS_SCRIPT == 'showthread'"> on forum showthread page <else /> not on forum showthread page </if> |
#3
|
||||
|
||||
Brilliant!
Thank you SO much calorie. Worked like a charm. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|