News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Main menu in rc2

Started by rotor, January 03, 2006, 01:07:22 AM

Previous topic - Next topic

rotor

Hi all,

I am just having a bit of a prob with the main menu in RC2. I have member map installed and when I press on it the "Home" selection is highlighted instead of the Member Map button.

Thought it might be in the css file ... mmmmm

Sverre

Sounds like you have just forgottent to change the $current_action == 'home' parts in the code for your member map tab/button...

Could you post the code you've used?

rotor

Hi Sverre,

No I did that ... have a look:

// The [member map]
   echo ($current_action=='mm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action=='mm' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=mm">' , $txt[mm_mm] , '</a>
            </td>' , $current_action=='mm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Sverre

Hmm... very strange, the only difference I see in your code and the one for the Help button for example, is the spaces before and after ==.

I haven't tried to add tabs yet myself, and my knowledge of PHP is very limited (i.e. not enough to know if those spaces are significant or not :P), so there might be something obvious I'm missing though.

bloc

Have you added "mm" to the array of actions?

Like:
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'mm')))
$current_action = $context['current_action'];

rotor

yeah thanks bloc, somehow I had put "MemberMap" in the array having changed the $current_action  a couple of times in the link ... why, who knows. 

Works now thanks!!

Advertisement: