Custom tabs - How do I add them to the Core (default) theme menu

Below are the steps required to add a menu item. For this tutorial we are going to be adding a chat link.

In index.template.php
The index.template.php file can be found in: Themes/[theme-name]/index.template.php

The theme name is the name of the theme you want to edit. If there is no index.template.php there (which is unlikely, but might be), you should use the "default" theme directory.

There are two ways to do this. This first method is the recommended one.

First method
In the index.template.php file, find the following code: if ($context['current_action'] == 'search2') $current_action = 'search'; And add below this: if ($context['current_action'] == 'chat') $current_action = 'chat';

Second Method
In the index.template.php file, find: if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))

As you can see it has a list of the actions in the menu. What we are going to do is add , 'chat'  after  'pm' . Each action in the array is separated by a comma and enclosed in single quotes ( ' ). It should look like this:

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

The next step is adding the link itself. This is an example of the home menu.

2. In the same file
$context['browser']['is_ie4']) ? ' ' : , '									' , $txt[103] , '				 ' , $current_action == 'home' ? ' ' : ;

This is how it should look with the made changes.''' $context['browser']['is_ie4']) ? ' ' : , '									Chat				 ' , $current_action == 'chat' ? ' ' : ;
 * $current_action=='home' - is what sets the tab for the current actions. As you can see it is defined in 3 instances. You will need to change it for all three of them.
 * ',$txt[103], ' - is the text string that prints Home on the Main menu. As you see the variable is inside ', , '. The reason for this is because it's inside an echo. If you are going to hard code the name in the menu you do not need to put ' , , ' around it.

If you want to be neat about it and add support for other languages, add this string to /Themes/default/languages/index.english.php and to any other language file that you want to add it to, ie. /Themes/default/languages/index.{language}.php, and change Chat to the translated string. $txt['chat'] = 'Chat';

For further assistance please take a look at this topic.