MyBB Hacks

Full Version: Toplink conditional asset .. doubt.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a problem .. I do a conditional to make an active TopLink when in a certain location on the forum. The code is as follows:

PHP Code:
<if THIS_SCRIPT == 'portal.php' then>
	<setvar tactive>active</setvar>
<else if THIS_SCRIPT == 'index.php' then>
	<setvar tactive>active</setvar>
<else if THIS_SCRIPT == 'search.php' then>
	<setvar tactive>active</setvar>
<else if THIS_SCRIPT == 'memberlist.php' then>
	<setvar tactive>active</setvar>
<else if THIS_SCRIPT == 'calendar.php' then>
	<setvar tactive>active</setvar>
<else if THIS_SCRIPT == 'misc.php' AND $mybb->input['action'] == 'help' then>
	<setvar tactive>active</setvar>
</if>


Try to see the {$tplvars['tactive']} but nothing comes out, what's wrong with the code?

Greetings Tongue

PS: I was going to do with the function switch but I can not.

Try using <elseif...>
Reference URL's