Simple Portal

Support => English Support => Topic started by: Glitch on December 10, 2011, 11:15:56 AM

Title: Highlight parent tab when submenu active
Post by: Glitch on December 10, 2011, 11:15:56 AM
I asked over at SMF and they directed me here.  I apologize if this has already been asked.  If there's a solution...and anyone can direct me to it...I really would appreciate it.

Anyhow, I run SMF 2.0.1 and use SP 2.3.4.

I added some sub links under the "Forum" tab and when I click them, the "Forum" tab does not stay highlighted.  It jumps to the "Home" tab, instead.  I'm sure it has something to do with the tab being active...but, I really don't know how to code it in order to have the correct tab highlighted.

You can see the issue by visiting my site located at http://www.glitchpc.net.

Again...I apologize if this has been answered before...and I want to thank you, in advance...for your help.
Title: Re: Highlight parent tab when submenu active
Post by: ccbtimewiz on December 10, 2011, 12:51:24 PM
Open ./Sources/Subs.php

Find:
elseif ($context['current_action'] == 'groups' && $context['allow_moderation_center'])
$current_action = 'moderate';


Add after:
elseif ($context['current_action'] == 'youraction')
$current_action = 'forum';


And continue building as such
Title: Re: Highlight parent tab when submenu active
Post by: Glitch on December 10, 2011, 01:33:14 PM
Thank you...I now have two of the three submenu items working per your instructions...however, I do not have an action for the "Chat" submenu item...since it is a pop-up and is coded as an absolute url:  /chat/index.php
Title: Re: Highlight parent tab when submenu active
Post by: ccbtimewiz on December 10, 2011, 01:36:26 PM
In /chat/index.php

Find:
<?php


Replace with:
<?php$_GET['action'] = 'chat';$current_action = 'chat';


Then try using "chat" in the Subs file
Title: Re: Highlight parent tab when submenu active
Post by: Glitch on December 10, 2011, 01:57:56 PM
Leekoberries...

Thanks, again!  Works a "treat"!
EhPortal 1.39.8 © 2024, WebDev