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

Main Menu

DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)

Started by Hj Ahmad Rasyid Hj Ismail, August 01, 2014, 04:20:12 PM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Link to Mod

DMOT: Default Menu On Top (Hook Version!)

- For SMF 2.0.x & 1.1.x
- Fully hook, no file modification for SMF 2.0.x but partly manual is also avalable.

1. Please do your own backup though every installation is backed up automatically.
2. This mod will help you move your main menu from its current position to top.
3. Upon its successful installation, you will need to enable it it mod settings page.
4. There is nothing fancy about this mod but just a simple css mod tricks.
5. You can test it in lower SMF 2.0 and 1.1.x version too as IMO it should work just fine. ;)
6. For SMF 1.1x - this mod now requires Enhanced Mod Settings Page mod to be pre-installed ( is attached).

Thank you for using/testing it.

Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep author's link if it is in there somewhere. ;)


#Change Logs

@Version 1.4.1
- Fix inconsistency with FARM - Font Awesome Responsive Mod i.e. by disabling css hover and active.
- Add support for smaller screen i.e. margin is adjusted to be more responsive to screen size.

@Version 1.4.0
- Further harmonize between this mod and Alternative Menu mod css stylings.
- Fixed options dependencies between one to another as introduced in version 1.3.0[/u].
- Fixed main menu break when this mod is disable in its mod settings page.

@Version 1.3.0
- Added options to change main menu background, its bottom border and its text color.
- Added options to change top menu background and its text color when active.
- Added options to change top menu background and its text color when hovered upon.

@Version 1.2.2
- Fixed some of minor css alignment within this mod itself.
- Fixed css to work better with Alternative Menu and Search Bar To Menu mods.

@Version 1.2.1
- Added requirement for EMSP - Enhanced Mod Settings Page mod to be pre-installed.
- thus is attached together.
- Reason is because SMF 1.1.x doesn't have its own Mod Settings Page.
- This is will ease forum owner in managing the mods.

@Version 1.2.0
- Added support to Alternative Menu mod.
- Added support to Search Bar To Menu mod.

@Version 1.1.0
- Added support to SMF 1.1.x.

@Version 1.0.0
- Introductory package.

Hj Ahmad Rasyid Hj Ismail

I think I can make this mod works for SMF 1.1.x and I will update with regards to that soon.

I will also try to make several variations for this menu. Among others, I am thinking of:
1. Giving an options for it for it to be on the left, center or right.
2. Moving upshrink button to its right side?
3. Adding search inside it?
4. Moving forum name above or below it?
5. Moving forum name next to it?
6. Adding time and date?

Or may be, it will be just in another mod(s).

Basically, some of this ideas can be seen in anypost forum:
1. Theme pre-face1
2. Theme face2

This mod will be adjusted accordingly to work together with my other mod: Alternative Menu With Button Remover

Still thinking...

Hj Ahmad Rasyid Hj Ismail

Now cover 1.1.x version as well. Do report if there is any error / problem in using this mod.

Hj Ahmad Rasyid Hj Ismail

Updated to work together with Alternative Menu With Top Menu Icon & Button Remover mod which is now available to both SMF 2.0.x and SMF 1.1.x.

For SMF 1.1x - this mod now requires Enhanced Mod Settings Page mod to be pre-installed ( is attached in mod download page).


Any screenshots that show the difference between this menu and the one we already have at the top?

Biology Forums

Could you please provide an image of what this mod does?

Thanks for making it compatible for 1.x...

Hj Ahmad Rasyid Hj Ismail

Quote from: Kimmie on August 15, 2014, 03:40:28 PM
Any screenshots that show the difference between this menu and the one we already have at the top?

For SMF 2.0.x, it is the same menu as it only moves it to top via css. As for SMF 1.1.x, it is a new menu menu based on the default menu but no dropdown menu is created for the time being.

Quote from: Shuban on August 15, 2014, 04:42:48 PM
Could you please provide an image of what this mod does?

Sorry, I forgot to include a picture. I will post it soonest in both the mod and this support page.


You can add a menu down? To get the menu at the forum top and forum bottom?

Hj Ahmad Rasyid Hj Ismail

Quote from: vladok on August 16, 2014, 04:57:00 AM
You can add a menu down? To get the menu at the forum top and forum bottom?

Are trying to repeat the same menu at the bottom or are you trying to get a new one?

And for which version of SMF that is?


I trying repeat same menu to forum bottom :)
SMF v. 2.0.6

Hj Ahmad Rasyid Hj Ismail

I guess that will need quite a lot of modifications especially in 2.0.x since this mod only use css to change the position of the menu. When the menu is at the bottom, it will require "push up" for its sub menu rather than "drop down" unless you want to disable its sub menu.

Basically you need two of template_menu(); instead of one. Cover the bottom menu with <div id="bottommenu'></div> respectively. So the idea for bottom menu is to call css #bottommenu #main_menu.

Add this in DefaultMenuOnTop.css
#bottommenu #main_menu
padding: 0.7em;
width: 100%;
margin: 0;
background: #eee;
border-top: 2px solid #333;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 9999;

You can try to hide all its sub menu by hiding them using #bottommenu #main_menu .dropmenu li { display:none; } or something if you are unable to make them push up because drop down will not work at the bottom of your forum.

Frankly speaking this is all just an idea which you have to test as I have never tested this.

Hj Ahmad Rasyid Hj Ismail

Updated to 1.2.2
- fix some of minor css alignment.
- fix css to work with search bar to menu mod.
- fix css to work with alternative menu mod.

Note: For SMF 1.1x
- this mod now requires Enhanced Mod Settings Page mod to be pre-installed (
- alternative menu mod requires this mod pre-installed.

Hj Ahmad Rasyid Hj Ismail

Updated to Version 1.3.0
- This is a hook version for SMF 2.0.x.
- Allows color changes in SMF 2.0.x and SMF 1.1.x for the followings:
1. Background color
2. Background bottom border color
3. Menu font color
4. Active background color
5. Menu font color if active
6. Hover background color
7. Menu font color if hovered


Was using a few days ago version v. 1.2.2 of this mod without problems.

Yesterday I upgraded to version DMOT.V. 1.3.0 and started having a problem.

Installing mod works perfectly. After a few minutes it shuts down and the menu back to the old location.

Disabling the option "Move default menu to the top of your forum?" and activating again the menu back to the top of the Forum.

After a few minutes the menu always comes back to the old location. :(

Hj Ahmad Rasyid Hj Ismail

Did you find any errors in the error logs? If you did, kindly share them here so I can try to give a look at them.

Otherwise, kindly give me a test account so that I can log in and test as a user. Because, so from your website I can only see tat it is working fine.

Before that, have you ever tried to clear all you to hard refresh your browser and clear the caches?

Hj Ahmad Rasyid Hj Ismail

I downloaded from SMF and installed this mod in my live and test forums for testing just to be sure. However, frustratingly (as I was looking for a bug :) ), it works as it supposed to and no error(s) has been detected.

DSystem, if you're still facing your error(s), kindly post them here. My latest visit to your site also suggests that the mod is working perfectly.


Thank you very much for your attention. Does not appear any error in the logs.

I'm auditioning. Seems to be an incompatibility with this mod:

Quick Spoiler ->

I was using version 0.9.4. Now updated to version 0.9.5

Strange that when I remove the mod Quick Spoiler   the DMOT stops functioning.

Hj Ahmad Rasyid Hj Ismail

I visited your site as a regular member using the given login credential and I only find that the menu is always kept on the top. Each action available in the menu has been tested and the result is the same. At no time at all the menu returns to its original position.

The only things that are a bit weird is the menu when action for download and multimedia is being active. It replaces the main menu with its own menu.

One more thing is, if you installed the Alternative Menu and turn on the icon to replace the text menu, the Alternative Menu CSS will override the default css for highlighting active and hovered button. As such, if the download and multimedia change the menu from icon back to text, the background wont be highlighted when active or hovered but the active or hovered text will remain the plain white making it little bit weird.

I am however still not sure whether Quick Spoiler has anything to do with the error that you said. I need more time to test it further. It is kinda late here in Malaysia as such I will update this somewhere later.


After I updated the mod spoller the problem stopped.

The menu really got really bad when clicked in mutimidia or downloads. I would appreciate your help to improve this.

I will provide an account with more access to better analyze.

Here in Brazil it is now noon. nice evening for you until tomorrow.

Hj Ahmad Rasyid Hj Ismail

I think I found out why that sometime the hook for $context['html_headers'] is not working properly. I believe the best solution for the time being is to provide two packages i.e. fully hook and mostly hook version. In the later, $context['html_headers'] via hook will not be used, but manual modification will be applied so that the css file link can properly be inserted and can fully be used by the mod users.

This will apply to my other "hooked" mods as well and hopefully will resolve problem faced by our friend like DSystem in his forum.