Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Actions and Without Actions
Destro Offline
Junior Member
**
Posts: 39
Joined: Nov 2012
Post: #1
Actions and Without Actions
Hello there,

I'm using this code to control active tab

PHP Code:
class="section-usergroups <if (THIS_SCRIPT == "usercp.php" AND $mybb->input['action'] == "usergroups") then>nav-active</if>"


It's working, but there is a problem, that it will duplicate class "nav-active" if I use this code in the main file like this

PHP Code:
class="section-home <if THIS_SCRIPT == "usercp.php" then>nav-active</if>"


The class nav-active will be duplicated when I go to usercp.php?action=usergroups (the condition is always true) !

How to avoid this ?

06-08-2013 02:54 AM
Find all posts by this user Quote this message in a reply
Destroy666 Offline
Junior Member
**
Posts: 27
Joined: Jul 2012
Post: #2
RE: Actions and Without Actions

PHP Code:
class="section-home <if THIS_SCRIPT == "usercp.php" && $mybb->input['action'] != "usergroups" then>nav-active</if>

Will show it active in all UCP pages except usergroups.

PHP Code:
class="section-home <if THIS_SCRIPT == "usercp.php" && !$mybb->input['action'] then>nav-active</if>

Should show it active only on main page (no action).

06-08-2013 12:08 PM
Find all posts by this user Quote this message in a reply
Destro Offline
Junior Member
**
Posts: 39
Joined: Nov 2012
Post: #3
RE: Actions and Without Actions
Thanks a lots!

Works like a charm Smile
06-09-2013 03:14 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: