News:

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

Main Menu

Alternative Menu With Top Menu Icon & Button Remover SMF 2.0.x & 1.1.x (Hooks!)

Started by Hj Ahmad Rasyid Hj Ismail, August 03, 2014, 07:48:03 PM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Link to Mod

Alternative Menu With Top Menu Icon & Button Remover (Hook!)
Version 1.4.2 For SMF 2.0.x (Hook, No File Modification) and For 1.1.x
Version 1.4.2m For SMF 2.0.x (Mostly Hook, One File Modification) and For 1.1.x

  • Please do your own backup though every installation is backed up automatically.
  • This mod will provide you with an alternative menu similar to default where you can simply remove any buttons.
  • You will be directed to its settings page immediately upon its successful installation.
  • You can enable this mod or disable it as well as any of its available buttons
  • But we will add more features like adding profile avatar, menu / submenu etc if needed later on.
  • We added top menu icon for those who wish to use image / icon menu instead of text menu.
  • You can test it in lower SMF 2.0.x & 1.1.x version too as IMO it should work just fine. ;)


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. ;)
The icons used are Crystal Clear and are released under LGPL (GNU Lesser General Public License).

 


#Updated to version 1.4.2 (fully hook version & partially hook version)
- Added icons license and name.
- Fixed support to Change Profile Text To Avatar mod.
- Added more supports for download ['dldir'], multimedia ['multimedia'], teampage ['teampage'] and shop ['shop'].
- Creating two mod packages for this, i.e. fully hook and mostly hook.
- Reason: some sites are experiencing problem with injecting $context['html_headers'] via hook.
- So, that part will be modified manually in mostly hook package.

#Updated to version 1.4.1 (hook version)
- Removing old icons and replacing it to a new one since we overlooked that the license did not allow redistribution.
- Fixed css stylings that used jointly with Default Menu On Top mod.
- Added support to Change Profile Text To Avatar mod so that it won't change Avatar to Profile Icon, if enabled.

#Updated to version 1.4.0 (hook version)
- Re-wrote the mod so that it won't affect forum original menu.
- As such supports other mods that is using the main menu whether top or sub menu.
- Added icon for portal ['forum'] / ['community'], arcade ['arcade'], download ['downloads'] and gallery ['gallery'].
- Automatic in SMF version 2.0.x
- The same icons are ready for SMF version 1.1.x but the menu will still need to modified manually.

#Updated to version 1.3.1 (hook version)
- Temporarily cancelling removal function for home menu that is causing undefined $button['href'] and $button['url'] errors.

#Updated to version RC 1.3.0 (hook version)
- Fully using hook with no file modification for SMF 2.0.x.

#Updated to version 1.2.2
- fix some of minor css alignment.
- fix css to work with search bar to menu mod.
- fix css to work with default menu on top mod.

#Updated to version 1.2.0
- Support SMF 1.1.x


Note:
For SMF 1.1.x this mod now requires pre-installation of:
- Enhanced Mod Settings Page mod (EMSPv100.zip); and
- Default Menu On Top mod.


For SMF 2.0.x users:
- If you faced problems with other mods, or $context['html_headers'] via hook is not working correctly, please install mostly hook (m) version.

Guide for DilberMC and othe custom themes: http://www.simplemachines.org/community/index.php?topic=526023.msg3750263#msg3750263

Hj Ahmad Rasyid Hj Ismail

#Updated to verson 1.0.1
- Added option to use top menu icon instead of text menu.
- Will work with Default Menu To Top mod.



Will try to create a package for SMF 1.1.x soon.


Hj Ahmad Rasyid Hj Ismail

Updated so that this mod can be used for SMF 1.1.x as well.

For SMF 1.1.x, this mod required DMOT: Default Menu On Top mod pre-installed for it to be nicely working.


Hj Ahmad Rasyid Hj Ismail

There will be another simple mod coming to move search menu to the right side of the main menu. Of course left or right is a simple adjustment and that can be changed to suite own need via css file. I will try to make all of the mods work together and complement each other in harmony since with DMOT, it will look better with it. That will also be make compatible with 1.1.x.

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 default menu on top mod.

Note: For SMF 1.1x this mod now requires pre-installation of:
- Enhanced Mod Settings Page mod (EMSPv100.zip); and
- Default Menu On Top mod.

Hj Ahmad Rasyid Hj Ismail


#Updated to version RC 1.3.0 (hook version)
- Fully using hook with no file modification for SMF 2.0.x.
- Mods that use $menu_buttons hook will still work if they are installed after this mod.
- Allow integration to this mod via line 218: call_integration_hook('integrate_altmenu_buttons', array(&$altmenu_buttons));

Hj Ahmad Rasyid Hj Ismail


#Updated to version 1.3.1 (hook version)
- Temporarily cancelling removal function for home menu that is causing undefined $button['href'] and $button['url'] errors.

Burke ♞ Knight

I see one issue that could make people not use this...
If mods add to the menu, they do not show, not can you add them easily.

Like the forum tab in a portal, the downloads or gallery buttons from popular mods.


Otherwise, I love it, and the colored images are better idea. :)

Hj Ahmad Rasyid Hj Ismail

Thank you for listing other mods needs as well as colored images. I personally want them to be gray (not colored) unless hovered upon. This can be modified in its css file. Just turn it the other way around. (The gray effect however is not working on IE, thus the icon menu will still be seen in color though.)

And yes, I know this mod "kinda" replace the default mod but other mods can actually add their buttons easily if they are using hook. I have even tested mention mod by Dragoon and it works well with this mod. IMO other mods should also use a smarter approach of adding menu i.e. without a need replace the original default menu.

It is also possible for me to add few mods that will modify this mod via hook or I can add them up as options within this mod. But this is not my choice for now as I will to consider a lot other mods if I am doing so. So far, paragraph two is the best option for every mod authors to have a win-win situation. The mod authors should improve by creating the menu button via hook as it is definitely the easiest and safest way to include a menu button.

I'll need to think more on this and try to see other options or ways to avoid conflicting mods.

Burke ♞ Knight

Mods that add to the submenus are not a problem, and far as I know, Mentions does that, not adds a top level menu item.

Portals have to have the forum button added, as the index is done as the main portal page.
I have no idea which portals do this via edits or via hooks, so we may want to find out, so we can try to come up with something.

Now, an idea... Make a package that has Home and Forum buttons, for those with portals.
Or, you could make one extra button, where they can set the name, url, and even an image, to be placed after the Home button.

Hj Ahmad Rasyid Hj Ismail

They just need to use hook to add button, whether it is top menu or sub-menu. Simple Portal, PortaMX and Dream Portal, use hook in integrating top menu button. Only ezPortal and TinyPortal are still using the old style in adding top menu.

I haven't check with other mods, but if it is so difficult for them to code that, I will post coding tip / trick on how to this. Besides, I think this will be better and as I said, this will be win-win situation for all mod authors wanted to use the space in main menu, whether it is top menu or sub menu.

Burke ♞ Knight

I just tried it on a test site, with SimplePortal, and the forum button did not show up.

http://www.bkefreetest.cu.cc/

Hj Ahmad Rasyid Hj Ismail

Yes. That would be happening as predicted. This mod is not smart enough to detect and include the mod that is already installed. It works only if it is installed earlier. That also won't cover the icon. By the way, I am rewriting this mod like I have rewrited ROAM - Re-Organize Admin Menu mod. It will cover that in the next release. It should also be more friendly to other mods that need to insert their own code without using hook.

Burke ♞ Knight

I tried it both ways, with SP installed first, then this mod, and no forum button.
Tried this mod first, then SP, and same result.

Hj Ahmad Rasyid Hj Ismail

Thank you for the feedback. Anyway, don't worry about the past, as the future is already coming. I am in the final testing of the new package now and I will upload it soon in the mod page. I just want to make sure that there is no error(s). ;)

Hj Ahmad Rasyid Hj Ismail

After a more deep and thorough test with portal, arcade, download and gallery mods, I humbly present the latest version of Alternative Menu mod.

#Updated to version 1.4.0 (hook version)
- Re-wrote the mod so that it won't affect forum original menu.
- As such supports other mods that is using the main menu whether top or sub menu.
- Add icon for portal ['forum'] / ['community'], arcade ['arcade'], download ['downloads'] and gallery ['gallery'].
- Automatic in SMF version 2.0.x
- The same icons are ready for SMF version 1.1.x but the menu will still need to modified manually.
- Icons will now be in color and will turn grey upon hover instead.

Do give your comments and feedbacks. Also feel free to ask for support. I cannot read minds like any other people too. ;)

Steve

DO NOT pm me for support!

DSystem

I really like this mod. A true upgrade from the menu of SMF.

How do I use a few mods have not yet supported by this mod did some additions.

I use the following Mods:

= SA Shop -> http://custom.simplemachines.org/mods/index.php?mod=1794
= Team Page -> http://custom.simplemachines.org/mods/index.php?mod=2167
= SMF Downloads Directory -> http://www.smfpacks.com/page/sa=dldir
= SMFPacks Multimedia Gallery -> http://www.smfpacks.com/page/sa=multimedia

I changed the icon from the list of members for

AlternativeMenu.subs.php

        $areas['shop']['title'] = empty($modSettings['altmenu_replace_with_icon']) ? $txt['shop'] : $txt['shop_icon'];
        $areas['dldir']['title'] = empty($modSettings['altmenu_replace_with_icon']) ? $txt['downloads'] : $txt['downloads_icon'];
        $areas['teampage']['title'] = empty($modSettings['altmenu_replace_with_icon']) ? $txt['teampage'] : $txt['teampage_icon'];
        $areas['multimedia']['title'] = empty($modSettings['altmenu_replace_with_icon']) ? $txt['multimedia'] : $txt['multimedia_icon'];


AlternativeMenu.english.php
$txt['shop'] = 'Loja';
$txt['shop_icon'] = '<img src="'. $settings['images_url']. '/AlternativeMenu.icons/shop.png" title="'.$txt['shop']. '" alt="'.$txt['shop']. '" class="altmenu_blur" />';
$txt['multimedia'] = 'Multimedia';
$txt['multimedia_icon'] = '<img src="'. $settings['images_url']. '/AlternativeMenu.icons/multimedia.png" title="'.$txt['multimedia']. '" alt="'.$txt['multimedia']. '" class="altmenu_blur" />';
$txt['teampage'] = 'Team';
$txt['teampage_icon'] = '<img src="'. $settings['images_url']. '/AlternativeMenu.icons/teampage.png" title="'.$txt['teampage']. '" alt="'.$txt['teampage']. '" class="altmenu_blur" />';




It was very easy and intuitive to make these changes. Congrats on the mod. :D

Advertisement: