Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Quickstart Module Development Module - Any Interest?
  • Posted: 12.06.2005, 23:42
     
    jmfpub
    rank:
    Helper Helper
    registered:
     July 2004
    Status:
    offline
    last visit:
    12.06.05
    Posts:
    114
    I've been using something like this for myself for some time now (since the company I work for decided to use PostNuke for all its sites), and I was thinking that maybe I'd clean it up and make it available for everyone if there's any interest...

    The part of developing a module that I've always hated is writing the code necessary to get to the first successful initialization of the module. pnversion.php is easy, of course, but the database setup is a pain in the butt, especially for large modules with multiple tables. So, I wrote a quick and dirty script that generates a pninit.php and pntables.php file from data input into a web-based form.

    Currently, the script I'm using generates code that was compliant with the original 0.75 API, but it could fairly easilly be adapted to the new, more complete ADODB implementation.

    The way it would work is pretty simple. You'd open up a web-based form and fill out basic information like the name of the module you're developing, the table prefix you want to use, and things like that. You submit that form and you're presented with a second form where you are asked to name your first table and define its fields. When you're done, you click one of two submit buttons. The first one stores your input and presents you with another form exactly like the one you just filled out so that you can create a second table. The other one takes you to the last form, where you define your module variables.

    After submitting the third form, you are presented with a final HTML form with textareas containing the contents of each of the files generated so all you have to do is copy and paste into your favorite editor. The pninit.php file would include an upgrade function placeholder (basically, the function would be defined, but would simply return true).

    For simplicity's sake, I would probably just go ahead and set it up to collect the information needed for pnversion.php as well. That way, someone could run through the process one time and have enough code generated to do the first initialization of the module without any additional steps.

    I could also, I suppose, write it so that the files generated get zipped up and a download is forced, so you download the resulting files rather than copying them from a web form.

    Anyway, let me know if there's any interest in this. If there is, then I'll take the script and turn it into an actual module.

    Ed
  • Posted: 13.06.2005, 04:06
     
    craigh
    rank:
    Professional Professional
    registered:
     June 2003
    Status:
    offline
    last visit:
    27.08.08
    Posts:
    1147
    sounds cool. If you got the code, release it. then its more useful! :)
  • Posted: 13.06.2005, 04:44
     
    alarconcepts
    rank:
    Professional Professional
    registered:
     April 2004
    Status:
    offline
    last visit:
    21.01.08
    Posts:
    2723
    I think it sounds good...and vote for the zip download option.
    :)

    --
    Photography | PHP | Other
  • Posted: 13.06.2005, 14:32
     
    Simon
    rank:
    Steering Committee Steering Committee
    registered:
     December 2002
    Status:
    offline
    last visit:
    09.11.08
    Posts:
    13413
    sounds like it could be very useful...

    --
    Regards,
    Simon

    itbegins.co.uk - Zikula Consulting

    Please read the Support Guide
  • Posted: 13.06.2005, 18:10
     
    sunadmn
    rank:
    Helper Helper
    registered:
     October 2004
    Status:
    offline
    last visit:
    01.03.06
    Posts:
    437
    IN, sounds like a great idea, I also vote for the zip/download method. Release away I think this would be a great tool for the community.



    -SUNADMN
  • Posted: 13.06.2005, 21:38
     
    alexan
    rank:
    Softmore Softmore
    registered:
     November 2004
    Status:
    offline
    last visit:
    06.03.06
    Posts:
    66
    it would be very useful!

    in the future maybe it could handle table updates ... too

    so maybe store the tables in a per module conf file and then
    just preload the settings and allow to edit or add new tables
    to generate new pntables and pninit everytime there is an
    update
  • Posted: 18.06.2005, 00:49
     
    sunadmn
    rank:
    Helper Helper
    registered:
     October 2004
    Status:
    offline
    last visit:
    01.03.06
    Posts:
    437
    jrmpub so do you have expected date for release of this or even a "SNEAK PEAK" maybe in mind???



    -SUNADMN
  • Posted: 05.07.2005, 08:28
     
    tag06
    rank:
    Freshman Freshman
    registered:
     November 2004
    Status:
    offline
    last visit:
    05.07.05
    Posts:
    9
    As jmfpub's Partner, I thought everyone would be interested in knowing that this mod does work but is being re written to be more .8 API Compliant. Once he has it finished, I am sure either him or myself will let you guys know.

    PN Theme and Module Development
    Visit Tag Dev!

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula