Advertisement:

Author Topic: DMOT: Default Menu To Top For SMF 2.0.x and 1.1.x (Hook Version!)  (Read 20633 times)

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
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 (EMSPv100.zip 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.
- EMSPv100.zip 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.
« Last Edit: January 16, 2015, 07:17:42 AM by ahrasis »

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top
« Reply #1 on: August 04, 2014, 05:19:44 AM »
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...
« Last Edit: August 11, 2014, 09:30:10 AM by ahrasis »

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #2 on: August 04, 2014, 04:47:10 PM »
Now cover 1.1.x version as well. Do report if there is any error / problem in using this mod.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #3 on: August 13, 2014, 04:03:07 AM »
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 (EMSPv100.zip is attached in mod download page).

Offline Kimmie

  • SMF Hero
  • ******
  • Posts: 1,590
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #4 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?

Offline Biology Forums

  • SMF Hero
  • ******
  • Posts: 3,781
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #5 on: August 15, 2014, 04:42:48 PM »
Could you please provide an image of what this mod does?

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

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #6 on: August 15, 2014, 09:47:52 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.

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.

Offline vladok

  • Semi-Newbie
  • *
  • Posts: 53
    • .: Ньюз Дозор.ru :.
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #7 on: August 16, 2014, 04:57:00 AM »
ahrasis,
You can add a menu down? To get the menu at the forum top and forum bottom?

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #8 on: August 16, 2014, 11:59:44 PM »
ahrasis,
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?
« Last Edit: August 17, 2014, 01:11:23 PM by ahrasis »

Offline vladok

  • Semi-Newbie
  • *
  • Posts: 53
    • .: Ньюз Дозор.ru :.
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #9 on: August 17, 2014, 02:24:51 PM »
I trying repeat same menu to forum bottom :)
SMF v. 2.0.6

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #10 on: August 17, 2014, 03:44:33 PM »
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
Code: [Select]
#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.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x
« Reply #11 on: August 17, 2014, 03:52:53 PM »
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 (EMSPv100.zip).
- alternative menu mod requires this mod pre-installed.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #12 on: September 01, 2014, 06:16:14 PM »
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

Offline DSystem

  • Jr. Member
  • **
  • Posts: 238
  • Gender: Male
  • EletronicaBR - Admin
    • eletronicaBR.com
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #13 on: September 07, 2014, 08:39:36 AM »
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. :(

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #14 on: September 07, 2014, 09:47:31 AM »
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 http://eletronicabr.com/ 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?

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #15 on: September 07, 2014, 10:27:18 AM »
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.

Offline DSystem

  • Jr. Member
  • **
  • Posts: 238
  • Gender: Male
  • EletronicaBR - Admin
    • eletronicaBR.com
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #16 on: September 07, 2014, 10:36:43 AM »
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 -> http://custom.simplemachines.org/mods/index.php?mod=2940

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.

 

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #17 on: September 07, 2014, 11:06:57 AM »
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.

Offline DSystem

  • Jr. Member
  • **
  • Posts: 238
  • Gender: Male
  • EletronicaBR - Admin
    • eletronicaBR.com
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #18 on: September 07, 2014, 11:20:12 AM »
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.

Offline Hj Ahmad Rasyid Hj Ismail

  • SMF Hero
  • ******
  • Posts: 4,905
  • Gender: Male
  • Busy mode is on.
    • ahmad.rasyid.ismail on Facebook
    • ahrasis on GitHub
    • ahrasis on LinkedIn
    • @ahrasis on Twitter
    • ElkArte Malaysia
Re: DMOT: Default Menu On Top For SMF 2.0.x and 1.1.x (Hook!)
« Reply #19 on: September 08, 2014, 09:30:32 AM »
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.