News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How do you add custom tabs (links) to the main menu?

Started by Lan T8, April 18, 2008, 02:47:16 AM

Previous topic - Next topic

Lan T8

I am slowly getting this new Forum to where I want it.  Now I am trying to find the 2.0 answer to:

How do you add custom tabs to the Core (default) theme menu?
http://docs.simplemachines.org/index.php?topic=564.0

After Playing with this a while, I did this and it works...


In Sources/Subs.php

FIND:

$buttons = array(
'home' => array(


ADD BETWEEN the upper two lines:

'northhigh' => array(
'title' => 'North High',
'href' => 'http://northhigh.info',
'show' => true,
'sub_buttons' => array(
),
),


So it now Looks Like This:

$buttons = array(
'northhigh' => array(
'title' => 'North High',
'href' => 'http://northhigh.info',
'show' => true,
'sub_buttons' => array(
),
),
'home' => array(


This will add the Menu Tab "NORTH HIGH" to the Left.

These are blocks of code for each tab (link) and you can insert it between any block to put the new tab in a different position.

For example, putting it before:

'help' => array(


As in:

$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'northhigh' => array(
'title' => 'North High',
'href' => 'http://northhigh.info',
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),



And the North High Tab (Link) to hxxp:northhigh.info [nonactive] moved the the second position between Home and Help.

I am just new to this and I am not sure if this is the right way to do it.  It works, but can someone tell me if it works the right way?

Thanks in advance!
Lan T8
From My Tropical Island Paradise!
hxxp:northhigh.info [nonactive]

Oldiesmann

Michael Eshom
Christian Metal Fans

keyboard

What an excellent Post !!!!!  I have learned a lot from this post..   :) :)


.Now if I can only find out someplace where I can find out how to change the Boards default icons,, :-\ :-\ :-\,,,
Слaва
Украинi

keyboard

I have had to revert back to 1.1.5  for various reasons...... I realize that my next question is not a smf 2.0 question...but can you direct to a similar instruction on how to add tabs for 1.1.5....

I found Lan T8's instuction perfect and very easy to follow, so I am hoping to find a similar thread on 1.1.5
Слaва
Украинi

Stef001

How can i make the link open in new window.

Can someone help.

Kind regards Stef.
SMF 2.0.2 | SimplePortal 2.3.5

baty10

Hi!

I have a question.

I made it and there was only a link.
How would I be able to arrange for a picture to appear?

Thy a lot.

hellboy78

where to do this manual changes into version 1.1.8. ?

thank you

rainland

hello, is there an option that the link im menu buttons opens in a new tab. not in the current window
thanks!

josylad

Hi,
How do i make the links to automatically open in new tab.

Kindred

well, first of all - you don't ask the question in a 4 year old thread which has already been marked as solved.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: