News:

Wondering if this will always be free?  See why free is better.

Main Menu

Turning Highlighting Off Active Buttons

Started by RL Joneson, April 07, 2008, 11:59:31 AM

Previous topic - Next topic

RL Joneson

Is there a way to turn off the highlighted effect on the nav bar that indicates the active page on default theme? So that no matter what page you are on, the nav looks the same. the reasoning is that i have my HOME nav button pointed to a diff url, so in reality the user really isn't on the HOME page.

forum rljoneson.com/faf_forum


metallica48423

did you want to remove it from all tabs or just that one?

you'd just remove the operation which determines if thats the active action.

for example, in index.template.php:


// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Would change to


// Show the [home] button.
echo '<td valign="top" class="maintab_back , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
  </td>';
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

RL Joneson

$txt[103] ?? Thanks metallica, but isn't that 1.0 script? Shouldn't it look like this?

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '">&nbsp;</td>';

foreach ($context['menu_buttons'] as $act => $button)
echo ($button['active_button'] || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , ' <td valign="top" class="maintab_', $button['active_button'] ? 'active_back' : 'back', '">
<a href="', $button['href'], '">', $button['title'], '</a>
</td>', $button['active_button'] ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// The end of tab section.


metallica48423

ughhh, i didn't even see this was in 2.x support....

wow... i need more coffee.  I apoligize :)


foreach ($context['menu_buttons'] as $act => $button)
echo '<td class="maintab_back">
             <a href="', $button['href'], '">', $button['title'], '</a>
      </td>';
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

RL Joneson

Haha yeah its about time for a cup! Worked perfectly! Thank you!

Advertisement: