News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Can you please help combine two top menus?

Started by Random Username, January 09, 2023, 08:43:58 PM

Previous topic - Next topic

Random Username

Surely this is possible? Thank you very much.

Sir Osis of Liver

Not enough info.  What exactly are you wanting to do?  Which two menus?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username

Hi, thank you. The two top ones, the one with the login and sign up button at the top when you aren't logged in and then the one with home, search, members, etc.

Thank you

Sir Osis of Liver

Anything's possible, but there's not a really good way to do it.  Those two menus are coded differently, in different places, have different formatting, and if you combine them on one line you'll run out of room if you add mod buttons and the menu will wrap.  You can eliminate the top menu and just add those buttons to the main menu array in Subs.php, then you'd basically have a 2.0 menu.  You'd just have to decide what to do with the user dropmemu.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username

Hi, I have plenty of space for what I'm doing. I cut the top search dropdown out since it's already in the lower forum menu. If I can move the user dropdown, My Messages, and Alerts then I'm be stoked. I know where the code would go but adapting it would be very tough for me and maybe impossible. Not sure.

Thank you!

Sir Osis of Liver

#5
Combining the two menus on same line will look crappy because top menus use jquery popups and main menu uses dropdowns.  The jquery popups are pretty, but really unnecessary, and just add steps to navigation.  If you copy the 2.0 button array into 2.1 Subs.php you'll have everything in main menu on one line except alerts, and you can easily add an Alerts button to the array that goes directly to alerts in profile.  It's a lot simpler to use, and less confusing for new members.  You'd just have to decide what to do with the top left user button.  All the links in the popup go to profile, so it's redundant after you restore the Profile button to main menu.  2.0 had a user info block that included a "Hello Member" message with avatar, you could do something similar.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

And 2.0's layout is a decade out of date....
Сл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."

Random Username

I can't say I fully understand but get the gist, I think. I have to say this is such great software but this is a really lame downside, in my view. It just takes vertical space from the screen for no good reason. One menu is enough.... But I'm only speaking from my own perspective. I'm no expert. Thanks.

Sir Osis of Liver

It doesn't really, because in 2.0 there's a userinfo block that's separate from the main menu, and is located variously in the header depending on theme, often with other elements occupying the same vertical space, so it's not wasted (like this).  Take a look at the 2.1 themes, some of them reposition menus to good effect (like this).  Also bear in mind that if you make changes to the menus it can affect mobile view.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Random Username

Oh, sorry. I forgot I started this thread. I achieved it.

Advertisement: