All,
I’ve been thinking over the past few weeks about gui hooks and the
complete lack of a working framework in this area that we currently have.
Tier_1 was showing me some code he’s done over the weekend that forced me
to think about harder / quicker about it
I’ve tried a few things over the w/e and finally settled on one idea I
kinda like. I’ve started doing some code to try and show the ‘concept’ of
my idea and I’ve attached some files to this email.
I hope there is enough there so you can ‘get’ what I’m trying to do here,
basically I’ve tried to come up with a solution that will allow any module
to hook into any part of any other module / core’s config page, under any
section.
A good example of why this is required is the voicemail. At the moment
we’ve got nearly all the voicemail (gui) functionality coded into the
extensions and users pages (yes it’s duplicated as well!). So if somebody
didn’t want voicemail for any reason the only thing we can do right now is
put some horrible code in there to detect if the voicemail module is
installed. However using my proposed solution the voicemail module would
just add it’s html elements into the ‘users’ and ‘extensions’ components
(as i’ve called it) and the relevant HTML would be generated as part of
those pages, if Voicemail is enabled/installed.
The code attached does work, however it is by no means complete. For a
start I’ve not done anything around the processing of the $_REQUEST object
or anything yet and all that is still done in the page.users.php file,
once I’m done that will also be hooked into the class. Also the
Javascript bits just don’t work as I’ve had a bit of a re-think in that
area so got some re-coding to do on that.
So long as I don’t receive any major objections to this idea, I’ll
continue coding this during this coming week and hopefully have something
that can be commited to HEAD by the end of next weekend.
Any questions, just email me or I should be around on IRC at some point
during the week.
There are half a dozen reason I can think of now why this is a good idea…
- Standard template for the gui
- Less changes needed if we decide to change the gui in a major way.
- Easier/faster development for non core developers to add modules.
- Standard form validation
- Modules can add gui elements to any other modules config page
Mark
(wozto1s)
Amportal-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-devel
Post generated using Mail2Forum (http://www.mail2forum.com)