The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
How do you make a link change from forum and home depending on what page your on. For example, when your on the home page it would show forum. And when your on forum it would show Home Page
|
#2
|
||||
|
||||
![]() HTML Code:
<if condition="THIS_SCRIPT == 'index'">show home link</if> <if condition="THIS_SCRIPT == 'whatever-you-call-home'">show index link</if> |
#3
|
|||
|
|||
![]()
The following error occurred when attempting to evaluate this template:
The conditional on line 89 appears to be missing its beginning tag (<if>). This may cause unexpected behavior. This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish. I get that error |
#4
|
||||
|
||||
![]()
whoops.... condition, not conditions. Fixed above.
|
#5
|
|||
|
|||
![]()
Still not working, here is the code i'm putting in.
Code:
<td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td> <if condition="THIS_SCRIPT == 'index.php'">Home</if> <if condition="THIS_SCRIPT == 'home.php'">Forum</if> |
#6
|
||||
|
||||
![]()
No, that isn't correct because of two issues. First, THIS_SCRIPT is defined at the top of your php page. For instance, this is the line at the top of index.php:
Code:
define('THIS_SCRIPT', 'index'); Code:
<if condition="THIS_SCRIPT == 'index'">Home</if> Second, you want the link to look the same as this line: Code:
<td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td> Code:
<if condition="THIS_SCRIPT == 'whatever-you-call-home'"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> |
#7
|
|||
|
|||
![]()
ok the script at the top of my home page is
Code:
define('THIS_SCRIPT', 'provb_blhome'); My code would be this right or wrong? Code:
<if condition="define('THIS_SCRIPT', 'provb_blhome');"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> Code:
vBulletin Message The following template conditional expression contains function calls: <if condition="define('THIS_SCRIPT', 'provb_blhome');"> Function Name Usage in Expression define define('THIS_SCRIPT', 'provb_blhome') With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression. The following functions are allowed in template conditional expressions: in_array() is_array() is_numeric() isset() empty() defined() array() can_moderate() can_moderate_calendar() exec_switch_bg() is_browser() is_member_of() |
#8
|
||||
|
||||
![]() Code:
<if condition="THIS_SCRIPT == 'provb_blhome'"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> |
#9
|
|||
|
|||
![]()
none of these are working. My home page is called home.php and my forum is index.php.
This is were i put the code Code:
<if condition="THIS_SCRIPT == 'provb_blhome'"><td class="vbmenu_control"><a href="index.php$session[sessionurl_q]">Forum</a></td></if> <td class="vbmenu_control"> <a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td> </if> <if condition="$show['registerbutton']"> <td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td> </if> |
#10
|
||||
|
||||
![]() Code:
<td class="vbmenu_control"><if condition="THIS_SCRIPT == provb_blhome"><a href="index.php$session[sessionurl_q]">Forum</a><else /><a href="/home.php" rel="nofollow">Home</a></if></td> <a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td> </if> <if condition="$show['registerbutton']"> <td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td> </if> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|