TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 777
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

Removing the 'help' button from top menu bar

Started by raenk, September 30, 2006, 04:54:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

raenk

Hi,

I would like to remove de help button from the top menu bar and add some custom ones.

Thanks

akulion

#1
Download from your server index.template.php file (located in your Themes/default/ folder (assuming ur using the default theme)

- backup file!

- open file and look for:


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


comment this out by adding // in front of the lines or delete the code if you prefer to remove help button

----------------------------

To ADD a button find:


if (in_array($context['current_action'], array('staff','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))


and add to that list your new button action, for example lets say you are creating a button for Videos. So you would place something like  ,'video' after the 'pm'

The above step creates the page state - meaning it highlisght the button when ur on that particular page

Then to get the Video button to show up

You will add this code

// Show the [video] button.
echo ($current_action == 'video' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'video' ? 'active_back' : 'back' , '">
<a href="URL TO VIDEO PAGE">Video</a>
</td>' , $current_action == 'video' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Before this line:    // How about the [search] button?
Or wherever you prefer in that area of the file (since thats where all the buttons are defined)

oh and in the above add button code you will have to put in the URL if you are linking to an external page

or if the page is linked internally then in the line (for the video button code):

<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>

(original button code here)

all u have to do is put the action for that page and the link name....

So for example, you are linking to an article called "videos" which has the link page=12

then ur line becomes

<a href="', $scripturl, '?page=12">Videos</a>


--------------------------------

hope u got that all - i tried to explain best i could

raenk

Wow, many many thanks, great info ! Couldn't be better.


This website is proudly hosted on Crocweb Cloud Website Hosting.