Advertisement:

Author Topic: Turning Highlighting Off Active Buttons  (Read 2866 times)

Offline RL Joneson

  • Jr. Member
  • **
  • Posts: 100
  • Gender: Male
  • RL Joneson. Design. Web. Print.
    • RL Joneson. Design. Web. Print.
Turning Highlighting Off Active Buttons
« on: April 07, 2008, 11:59:31 AM »
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
Code: [Select]
rljoneson.com/faf_forum

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: Turning Highlighting Off Active Buttons
« Reply #1 on: April 07, 2008, 12:16:05 PM »
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:

Code: [Select]
// 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

Code: [Select]
// 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

Quote
Microsoft 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
     

Offline RL Joneson

  • Jr. Member
  • **
  • Posts: 100
  • Gender: Male
  • RL Joneson. Design. Web. Print.
    • RL Joneson. Design. Web. Print.
Re: Turning Highlighting Off Active Buttons
« Reply #2 on: April 07, 2008, 12:28:31 PM »
$txt[103] ?? Thanks metallica, but isn't that 1.0 script? Shouldn't it look like this?

Code: [Select]
// 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.

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: Turning Highlighting Off Active Buttons
« Reply #3 on: April 07, 2008, 12:38:05 PM »
ughhh, i didn't even see this was in 2.x support....

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

Code: [Select]
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

Quote
Microsoft 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
     

Offline RL Joneson

  • Jr. Member
  • **
  • Posts: 100
  • Gender: Male
  • RL Joneson. Design. Web. Print.
    • RL Joneson. Design. Web. Print.
Re: Turning Highlighting Off Active Buttons
« Reply #4 on: April 07, 2008, 12:48:09 PM »
Haha yeah its about time for a cup! Worked perfectly! Thank you!