Ticket #629 (closed enhancement: wontfix)

Opened 3 months ago

Last modified 3 months ago

Two new menu hooks in "adminhandler.php"

Reported by: msi Owned by:
Priority: minor Milestone: Undetermined
Component: Habari Core Software Version: SVN
Keywords: Cc:

Description

I wrote this patch to create two more menu hooks. One hook can be used to extend the create menu, the other one can be used to extend the admin menu. This would allow me and other plugin authors to create a menu entry (or more entries) before the logout command. The old hook is still available for backward compatibility with existing plugins.

Attachments

adminhandler.patch (1.7 kB) - added by msi 3 months ago.

Change History

Changed 3 months ago by msi

follow-up: ↓ 3   Changed 3 months ago by skippy

  • status changed from new to closed
  • resolution set to wontfix

I think the goal is to NOT permit arbitrary additions to the main menu. Otherwise, every plugin under the sun will add menu items, making the menu far less useful than it is intended to be.

Marking wontfix for now.

  Changed 3 months ago by michaeltwofish

It is currently possible to add arbitrary items to the menu. As things stand, they just get added to the bottom. Perhaps we should let users reorder their own menu, rather than relying on us or plugin authors to know how they want things ?

in reply to: ↑ 1   Changed 3 months ago by msi

Michael, I was about to say the same thing. It is currently possible to add a menu entry, and my patch would just be an extension to put a new "Create whatever" in the create menu. I could need the behaviour for my blogroll plugin.

Replying to skippy:

I think the goal is to NOT permit arbitrary additions to the main menu. Otherwise, every plugin under the sun will add menu items, making the menu far less useful than it is intended to be.

True. But what are you going to do? Sometimes a plugin must add a menu entry.

follow-up: ↓ 6   Changed 3 months ago by michaeltwofish

msi, I haven't looked at the patch, but the "Create ..." and "Manage ..." are added automatically based on content types. While if we allow plugins to create menu items we can't stop them manually adding "Create blah" I certainly don't think that should be encouraged.

As I say, perhaps we're looking at this incorrectly. They might not be being added in the right place now, but I don't think it's up to plugin creators to say what the right place is. Users should be able to reorder menu items.

  Changed 3 months ago by arthus

Just wanted to chime in and point that in terms of creation the /right/ way is almost always to build off the default FormUI for content-types and modify it with the plugin hooks. This helps to keep the UI consistent.

in reply to: ↑ 4   Changed 3 months ago by msi

Replying to michaeltwofish:

msi, I haven't looked at the patch, but the "Create ..." and "Manage ..." are added automatically based on content types.

I have a "Create link category" entry and a "Create link" entry. It is not a content type like page or post because both classes are only used in my plugin. It just makes more sense having both in the create menu and not after logout.

Users should be able to reorder menu items.

If this is possible, I have nothing to complain about. ;-)

Note: See TracTickets for help on using tickets.