[WIP] Custom Menu Mod

Started by Robbo_, December 06, 2009, 08:02:33 AM

Previous topic - Next topic

Robbo_

So I have been meaning to get around to finishing this mod for a long time now. I got bored today and needed a break from the other stuff I have been working on so decided to try get a version out for feedback. Around 6 hours later and here it is...

This mod basically adds an area in the administration center to allow you to edit your forums main menu. So when you want to add a link all you have to do is a few mouse clicks instead of editing your forums files.

This mod is in early stages, this is the first version that is usable enough to give to you for feedback.

There are many things missing in this version, here is a list of them so you don't ask about them....
- ability to move the links around like you can with boards instead of having to go into the modify link section just to move it.
- ability to delete multiple links at a time
- ability to set custom code for the name of a link. So you can, for example, add the amount of unread messages beside the My Messages link etc
- auto detect links that mods add and add them on install or ask you if you want it added
- ability to disable/enable links
- caching
- log admin actions for when someone changes a link somehow
- my code is messy (due to me being so tired and doing little hacky things), it will need to be cleaned up ;)

There are also a few bugs. The main one you will notice is detecting if a link is active or not. Basically it will only work when you first click the link, when you go to a sub area of that link it will not work. I need to rethink how I store the links etc. To tired to mess with it tonight.

There are areas that need to have descriptions etc that I have not included yet.

I have not yet added any language strings so this is for english only for now.

What I want from you...
Feedback on how it looks, feedback on how easy it is to use. How I should implement the custom PHP names. What settings you want and any features you want.

There are probably things I have missed and I wanted to format this post nicer but I'm to tired.

Oh and I just thought of something... the open in new tab/window option may or may not work properly. Same with the use of the URL field when choosing other. I never tested any of that (it will save what you choose though).

REMEMBER THIS VERSION IS ONLY FOR FEEDBACK AND TESTING, DO NOT USE IT ON A LIVE WEBSITE!

Cheers,
Robbo
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Bigguy

This looks awesome. Glad you have been working on it. I will test it out when I get a chance.

Eliana Tamerin

This is a mod I've been waiting for!

Btw,  how's this going to work with additional mods? If I add a mod, like SimplePortal, or SMG, which adds its own menu item, is that going to show up in your Custom Menu? Will the edits fail on Subs.php, then? Or would I need to add it manually? Didn't read your future features list very well.

My only gripe would be that most menu links use $scripturl, but that doesn't seem to be represented very well. If I change my forum url (from http://mydomain.com to http://forum.mydomain.com), will I have to change all the respective menu links as well?
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

vaulter

I get an error:

Quote1.     Execute Modification     Install.xml     Modification parse error
   2.    Execute Modification    Install.xml    Modification parse error
   3.     Extract File     ./Sources/ManageLinks.php     
   4.    Extract File    ./Sources/Subs-Links.php    
   5.    Extract File    ./Themes/default/ManageLinks.template.php    
   6.    Adapt Database    Install.php

Running SMF 2.0 RC 2

No other mods installed

Any ideas?

tfs

#4
>>Looking forward to taking this for a spin!

Now that's cool!  I have a feeling that this is going to be a very popular mod.  To the point where SMF will want to incorporate the functionality.  Installed fine on my SMF 2.0 RC2. 
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

vbgamer45

Gread idea for a mod looks great!
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vaulter

Ok - Great idea for a mod and got it installed now.

One problem - The hover menu that used to appear over the admin button and others such as the My Messages (inbox/new message etc) has now gone.  I'm assuming this mod has somehow disrupted its function?

Looking forward to a fix for that :)

tfs

#7
I have this installed on my test site.  I also have Aeva-Media.  When  I "Enabled the custom menu:" the "Gallery" and "Members" menus disappear.

Also, the copy/paste behavior is different.  When Cusom Menu is disabled, if I highlight my existing menu, copy and then paste into notepad, I get a list of the top menus, but I also get a list of the sub-menus.  Like so...



    * Home
    * Help
    * Search
    * Admin
          o Features and Options
          o Packages
          o Error Log
          o Permissions
    * Moderate
          o Reported Posts
    * Profile
          o Summary
          o Account Settings
          o Forum Profile
    * My Messages
          o Read your messages
          o Send a message
    * Gallery
    * Members
          o View the memberlist
          o Search For Members
    * Logout

But when Custom Menuy is active, not only are Gallery and Members missing, but the copy/paste function no longer shows the sub-menus... like so...

    * Home
    * Help
    * Search
    * Admin
    * Moderate
    * Profile
    * My Messages
    * Logout

=======================
Followup....  I see that the "Members" menu is not a part of the menu list in the "Edit Links" area.  I uninstalled Aeva-Media.  Problem persists with the "Members" menu.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Robbo_

Quote from: Eliana Tamerin on December 06, 2009, 09:31:45 AM
My only gripe would be that most menu links use $scripturl, but that doesn't seem to be represented very well. If I change my forum url (from http://mydomain.com to http://forum.mydomain.com), will I have to change all the respective menu links as well?
I need to change how I handle the locations. Any of the main ones and ones added by mods will need to be added just with the action and/or sub action. This will also fix the issue with showing which link is active.

Quote from: vaulter on December 06, 2009, 12:21:03 PM
Ok - Great idea for a mod and got it installed now.

One problem - The hover menu that used to appear over the admin button and others such as the My Messages (inbox/new message etc) has now gone.  I'm assuming this mod has somehow disrupted its function?

Looking forward to a fix for that :)
It is noted in my first post that the active buttons is very buggy. Next version should have a fix for it.

Quote from: tfs on December 06, 2009, 02:12:48 PM
I have this installed on my test site.  I also have Aeva-Media.  When  I "Enabled the custom menu:" the "Gallery" and "Members" menus disappear.

Also, the copy/paste behavior is different.  When Cusom Menu is disabled, if I highlight my existing menu, copy and then paste into notepad, I get a list of the top menus, but I also get a list of the sub-menus.  Like so...



    * Home
    * Help
    * Search
    * Admin
          o Features and Options
          o Packages
          o Error Log
          o Permissions
    * Moderate
          o Reported Posts
    * Profile
          o Summary
          o Account Settings
          o Forum Profile
    * My Messages
          o Read your messages
          o Send a message
    * Gallery
    * Members
          o View the memberlist
          o Search For Members
    * Logout

But when Custom Menuy is active, not only are Gallery and Members missing, but the copy/paste function no longer shows the sub-menus... like so...

    * Home
    * Help
    * Search
    * Admin
    * Moderate
    * Profile
    * My Messages
    * Logout

=======================
Followup....  I see that the "Members" menu is not a part of the menu list in the "Edit Links" area.  I uninstalled Aeva-Media.  Problem persists with the "Members" menu.
When you enable this mod it will only show the links that are in the links list (in Admin -> ManageMenu). For custom mods you will have to add the links yourself. However in future versions it will auto detect any custom links that have been added by mods and add them for you.

With the sub-menus, you would firstly have to add the sub-links to those links in Admin -> ManageMenu as well. I don't put them in automatically yet. They might still not work when you do as I never tested if it works in the template.

REMEMBER THIS VERSION IS ONLY FOR FEEDBACK AND TESTING, DO NOT USE IT ON A LIVE WEBSITE!
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Robbo_

I am finishing this mod for a client and then not suporting it for anyone but my client. If anyone with descent experience with SMF and wants to take over this mod when I get it working properly then PM me.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

tfs

It probably turned into a real bear to cover all the bases on a mod like this.  SMF itself may need to make some changes to make a mod like this supportable.

Nonetheless, I'd like to  get a copy of whatever it is that you end up with, and I promise to not ask for support.  :)
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Arantor

I can't see SMF changing to suit a mod, but a mod that modifies SMF code should be supportable in theory.
Holder of controversial views, all of which my own.


tfs

Maybe SMF wouldn't change to support this mod in particular, but I could see it changing to help support the functionality that a mod like this is intended to add.  There's a real need for the ability to manage a site's menus through some type of GUI, as is possible with a CMS like Joomla or Drupal.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Arantor

Won't be in 2.0, doubtful in 2.1 either.

The general menu doesn't need to change all that much to be honest, and most mods add their own normally. But it would be good as a mod.
Holder of controversial views, all of which my own.


Robbo_

This mod isn't that big. It just loads links from the database instead of grabbing them from an array in a file. The beef of this mod is in the admin center which is will work fine regardless of how SMF works lol. I shouldn't need to support this mod when it is done anyway.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Arantor

Quote from: Robbo_ on December 13, 2009, 08:47:57 PM
I shouldn't need to support this mod when it is done anyway.

Unfortunately you know as well as I know that's not the case, heh.
Holder of controversial views, all of which my own.


Advertisement: