Suggestions for improvements to module-API for 2.0

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm
Location: Denmark

Suggestions for improvements to module-API for 2.0

Post by Silmarillion »

Hi all module-developers

Doing quite a bit of modules lately and finding myself thinking that I do lots of the same stuff everytime I start off a new one, I wondered if we should collect our ideas for improvements to the module-api for the upcoming 2.0 version. I volenteer to collect suggestions into the wiki if someone gather ideas in this thread.
I can start off with dividing my suggestions (sofar) into some categories:
1. core-functions
- a function which confirms a pageid/alias and returns either false or a confirmed pageid.
- easy function to check for data sent from preferenceform and saving to proper preferences (already in there for 2.0, sorry)
- some simpler redirect-functions... I always have to look up the parameters... why should be bother with $id and £$returnid everytime? In 98% of the cases I just want to return to defaultadmin and show either a message or an error...

2. frontend-layout-functions
- Some smooth way of maintaining smarty-templates without having to do the whole import-from-file-save-to-db-manage-textareas-saving-changes-to-db stuff every time. Some simple function to manage templates should be made. Actually I think it should go into the template-menu, possibly with a tab for module-template or something like that.
- Visa versa with module-stylesheets, which are a hazzle now, getting them imported to the stylesheet list etc...

3. admin-layout-functions
- tabbed design improved to support multiple levels (I haven't gottenit to work, anyway...)
- A formalized way of showing "you do not have acces to this adminpage"-stuff
- some easy way to do standard "label"-"input" sort of admin-pages without having to do templates/smarty/php stuff every time. (already in there for 2.0, sorry)
- some easy way to do standard table layout without having to remember table-classes, row0/1 stuff etc.
These things would also make it easier to maintain a (fairly) standardized layout of the admin-section, resulting in easier themability of this.

Some of these suggestions should perhaps not be module api, but included classes or core-stuff, but I mention them here as those are some of the time-wasters whenever I start off a new module.

If some of these are already implemented, I'm sorry for not finding them. Hope it's not all of them ;-)

Best regards
Morten/Silmarillion
Last edited by Silmarillion on Tue Jan 30, 2007 11:16 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Suggestions for improvements to module-API for 2.0

Post by calguy1000 »

Yes, we need classes, or easy ways to code some of the following:
    a) Displaying a simple table based on a couple of SQL queries, with pagination and sorting in the columns. 
        This should work in the backend, and optionally in the frontend.
    b) A simple way to create/add/edit multiple different templates for one thing in the database. 
        i.e: so you can have multiple templates in the database for the news summary, or the news detail and manage them without
              ever touching ftp.
        I have some code that could be wrapped into a class or two to handle this, just gotta get at it.
    c) A way to redirect output from a module to a specific content block, rather than to {content}

There, that's my $0.02CDN for a couple o days.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm
Location: Denmark

Re: Suggestions for improvements to module-API for 2.0

Post by Silmarillion »

Just adding a small thing for myself again. There's some nice nonwysiwyg bu syntax highlighting codeeditors out there for css/template-editing, so I think it would be nice to let a module register itself as CodeHelper (or something like that) in the same way as the wysiwyg modules does now. And let an admin-user choose which codehelper he would like to use.

Just another idea, and I'll be glad to implement it, if I get a go from someone...

Sil.
Post Reply

Return to “Modules/Add-Ons”