News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[2.0 RC3] Main Menu Highlighting

Started by LHW, September 02, 2010, 06:33:54 AM

Previous topic - Next topic

LHW

Was wondering if someone could help me with something...

Under Curve, when you click on Admin / Error Log, the Admin button (in the Main Menu) remains highlighted once you've entered the Error Log.

Where is the setting that tells it to highlight the Admin button, and how can it be changed to highlight a different button?

Thanks!


Oya

its not a setting but part of subs.php setupmenucontext

since when your in the admin area action=admin the main button is highlighted as it has the id of admin

what exacty did you want to do

LHW

I moved a couple of the Main buttons so they're embedded under another.  e.g.  I moved Moderate... so it was a sub-button of Admin.  Works like a charm, except that now it defaults to having Home highlighted, and I'd like Admin to be highlighted instead.


Oya

i think changing
elseif ($context['current_action'] == 'groups' && $context['allow_moderation_center'])
$current_action = 'moderate';


to this should do it
elseif ($context['current_action'] == 'groups' && $context['allow_moderation_center'])
$current_action = 'admin';
elseif ($context['current_action'] == 'moderate' && $context['allow_moderation_center'])
$current_action = 'admin';

LHW



Raffoz

I read this post and i tried to apply its advices to my situation, but i couldn't solve it...

Here it's a short summary:

I added a page with Simple Portal.
Then i create a tab in SMF (modifying subs.php) to be able to call this page from the horizontal menu, just near homepage and forum.

But i noticed a thing:
- after i click one of the tab (one of the default ones: i mean, search, profile, forum), it becomes highlighted when my browser loads it;
- if i click the tab i created for the "page", it doesn't become highlighted, and the only tab highlighted remains the "homepage" one.

Do you know how to solve my problem?

Thanks!
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

Advertisement: