Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I like the idea of splitting the mapi into two modules, one for the administration, which can be setup, and the other for the general functioning. So that's not a problem, we'll do that in the next module version.
The patch, although it deals specifically with the menu items themselves, does not provide a way to deal with the forms themselves, which take arguments dependent on the location (i.e. arg(4) == 'derivatives'), and since now that's changed, changing the module would involve changing literally all the references to administration processes throughout all the modules that utilize MAPI.
It'll end up needing some more thought, so I'll look into it before I begin really trying to code something.
These args should be passed using the 'callback arguments' property hook_menu(). Maybe you should use the regular menuitem structure in hook_media_admin() (also gives back the possibilty not to use drupal_get_form)
A solution is to define a constant containing the length of basepath of media-pages. Something like this:
I like the constants provided, since they allow for configurable URL locations for the media section. One of the reasons I was trying to simply the menu system, was to wipe out a lot of extra text, which takes up precious script memory. Unfortunately I think I sacrificed readability while I was at it.
I'll provide the menu items exactly the same as in the hook_menu, since learning a different way of doing them seems rather a burden for people already familiar with the system.
I think in general the system that you've got worked out here will work well.
I'm currently implementing the administration section as part of mapi_ui, and the rest will be part of mapi.
Comments
Comment #1
casey commentedOw wrong title, first I wanted to suggest splitting the mapi into the actual mapi module and an ui module.
Comment #2
rhys commentedI like the idea of splitting the mapi into two modules, one for the administration, which can be setup, and the other for the general functioning. So that's not a problem, we'll do that in the next module version.
The patch, although it deals specifically with the menu items themselves, does not provide a way to deal with the forms themselves, which take arguments dependent on the location (i.e. arg(4) == 'derivatives'), and since now that's changed, changing the module would involve changing literally all the references to administration processes throughout all the modules that utilize MAPI.
It'll end up needing some more thought, so I'll look into it before I begin really trying to code something.
Comment #3
casey commentedOw didn't see that.
These args should be passed using the 'callback arguments' property hook_menu(). Maybe you should use the regular menuitem structure in hook_media_admin() (also gives back the possibilty not to use drupal_get_form)
A solution is to define a constant containing the length of basepath of media-pages. Something like this:
Comment #4
rhys commentedI like the constants provided, since they allow for configurable URL locations for the media section. One of the reasons I was trying to simply the menu system, was to wipe out a lot of extra text, which takes up precious script memory. Unfortunately I think I sacrificed readability while I was at it.
I'll provide the menu items exactly the same as in the hook_menu, since learning a different way of doing them seems rather a burden for people already familiar with the system.
I think in general the system that you've got worked out here will work well.
I'm currently implementing the administration section as part of mapi_ui, and the rest will be part of mapi.
Comment #5
rhys commentedOk, so this will be coming out in the upcoming update, so I'm going to consider this fixed.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.