Hi,
I would like to remove de help button from the top menu bar and add some custom ones.
Thanks
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 . '"> </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 . '"> </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 . '"> </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 . '"> </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
Wow, many many thanks, great info ! Couldn't be better.