Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: tX on March 02, 2006, 08:15:50 PM

Title: Adding to the menubar?
Post by: tX on March 02, 2006, 08:15:50 PM
How can i add to the menu bar? I'm useing the default RC2 theme, but i chanegd the colors and such. I would also like it to work with the ssi menubar function if possible. I basicly juast want to add a few links up there to otehr places on my website.


Also if there a way i can change the color of just the copyright? Mine is currently black on black which im sure smf staff doesn't like, not to mention it looked retarted being blank down there anyways.

Title: Re: Adding to the menubar?
Post by: RyanJones on March 03, 2006, 07:19:00 AM
http://www.simplemachines.org/community/index.php?topic=63203.0

...Should help you :)

Cheers,

Ryan Jones
Title: Re: Adding to the menubar?
Post by: tX on March 05, 2006, 06:13:53 PM
That is really confussing to me, Do we REPLACE
   

// 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>' : '';


With


// Show the [chat] button.

echo ($current_action=='chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '


<td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">

<a href="', $scripturl, '?action=chat">Chat</a>


</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Or do we made a new entery with the second one?

are there any step by stepposts about how to do this?

Also Is there a way i can change what "Home" links to? I want to make Home link to my main website home, and then make a Forum button that links to the Forum Home,
Title: Re: Adding to the menubar?
Post by: Harelin on March 06, 2006, 10:03:38 PM
If you want to direct the Home link to your main website, understand this part of the code from your first selection:

<a href="', $scripturl, '">' , $txt[103] , '</a>

$scripturl = inserts the url to your forum script.  Alone, without a page specificed (as seen above), it'll direct you to the forum index.  Therefore, you want to remove $scripturl and replace it with the url to the desired main page of your site:

<a href="http://www.yourdomain.com/">' , $txt[103] , '</a>

$txt[103] is configured in your language file.  If you want the Home link to read differently, find $txt[103] in your /languages/index.english.php file.

Knowing these two elements, you can easily go into the code and copy and paste to create additional links in the menu bar.