SimplePortal

Customization => Themes and Graphics => Topic started by: wilkolak on May 21, 2010, 08:14:19 AM

Title: How to make nice top menu?
Post by: wilkolak on May 21, 2010, 08:14:19 AM
Hi, this is my first post here. Hope you will not eat me. :P
I'm porting my site from PHP-Fusion to SMF+SimplePortal and I have a problem. I'm trying to make a custom top-menu which links to custom pages, forums, downloads, etc. Something exactly like here it is (Home, Forum, About, etc..). How I can do it? Is there some kind of addon doing it or is it custom coded in theme?

I was searching last 3 hours for anwser on this question here and on google... so please don't tell me to search. :P My brain search machine has broken.

PS Downloads page on this site is beautiful. Is this an avaible to download somewhere addon?
Title: Re: How to make nice top menu?
Post by: AngelinaBelle on May 21, 2010, 09:13:59 AM
Do you want to add more tabs to the current menu? You can do that in function setupMenuContext() in Subs.php (output happens in function template_menu in index.template.php)
 
If you need a separate strip of buttons, you can use function template_button_strip in index.template.php
 
Title: Re: How to make nice top menu?
Post by: wilkolak on May 21, 2010, 09:16:12 AM
I want to do something exactly like on this site.
Thanks any way, I will look into that.
Title: Re: How to make nice top menu?
Post by: AngelinaBelle on May 21, 2010, 09:39:49 AM
Sounds like you don't want to create a new menu -- you want to change the appearance of your theme.
 
SimplePortal has not released the Mehmene theme to the public, but you can learn a lot by browsing through index.css. 
 
By carefully controlling the heights of the elements at the top, the creator made them all fit where they are supposed to on top of the main background image. Then, the menu buttons get a subtle border and the active menu button gets its own background image to highlight it.
 
It looks like some adjustments to index.template.php were made as well, to place the top elements slightly differently than is done in the default CURVE theme, and to remove some of the "buttony" appearance from template_menu.  You can view the generated HTML.
 
You might also enjoy having a look at some of the many themes available at SMF, and at other SMF theme sites, to see the php for similar "non-buttony" menu strips.
SimplePortal 2.3.8 © 2008-2024, SimplePortal