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

Dizkus

Goto page: 1 - 2 - 3 [+1]

Bottom
Module Development HOWTO
  • Posted: 10.01.2006, 01:20
     
    jbirchett
    rank:
    Helper Helper
    registered:
     November 2002
    Status:
    offline
    last visit:
    29.05.07
    Posts:
    203
    FYI - I'm starting my pnGWBattleTracker module and I'm documenting the process in order to come up with something for would-be developers to use as a HOWTO. I'm doing it from scratch, but I've also used ctimmer's ModGen to generate a set of files to use as a reference when I get stuck. I will probably use ModGen for all future modules, but I wanted to make sure I had a functioning set of core files to look at while I'm building my own.
  • Posted: 10.01.2006, 20:46
     
    jediping
    rank:
    Helper Helper
    registered:
     November 2004
    Status:
    offline
    last visit:
    12.03.07
    Posts:
    387
    That's great news! Blessings on your head for doing all this documentation!

    No worries in using a ModGen-type program, so long as you plan the structure before hand. Getting the basics done by something else is a nice thing. :)
  • Posted: 10.01.2006, 21:24
     
    ctimmer
    rank:
    Helper Helper
    registered:
     February 2003
    Status:
    offline
    last visit:
    11.06.08
    Posts:
    226

    Quote

    I've also used ctimmer's ModGen to generate a set of files to use as a reference


    Keep in mind that ModGen is based on the same (lack of) documentation you are working from. Please let me know if you find anything ModGen does incorrectly or unnecessarily.

    Thanks,
  • Posted: 11.01.2006, 00:17
     
    jbirchett
    rank:
    Helper Helper
    registered:
     November 2002
    Status:
    offline
    last visit:
    29.05.07
    Posts:
    203
    The only thing I'm noticing so far is that the Example module uses ADODB data dictionary calls to do its DB work and ModGen doesn't seem to.

    As far as planning goes, the first portion of the Doc is on planning. I had my DB schema worked out and my interfaces drawn on paper before I ever did anything on the PC. So far, I have only done the pnversion.php, pntables.php, and I've started pninit.php.
  • Posted: 13.01.2006, 03:25
     
    come
    rank:
    Helper Helper
    registered:
     December 1969
    Status:
    offline
    last visit:
    01.07.08
    Posts:
    137
    Please use tableless XHTML-CSS layout for the templating examples instead of the table-layout the ModGen creates.
    The latest documentations should use the most recent standards so that upcoming modules from newbies will support the design philosophy of web-standards-compliance that the PostNuke CMS is following.

    --
    greetings,

    O. Encke

    ASUS Notebook Forum
  • Posted: 13.01.2006, 05:00
     
    ctimmer
    rank:
    Helper Helper
    registered:
     February 2003
    Status:
    offline
    last visit:
    11.06.08
    Posts:
    226

    Quote

    instead of the table-layout the ModGen creates

    Are you referring to the default templates generated? Those templates were only intended to be a template stub for the generated module/block.

    I am just getting started with tableless layouts... If you (or anyone) could rework one of the generated templates into a tableless XHTML-CSS format I would be glad to include it in ModGen. It would be a big help.

    Thanks
  • Posted: 13.01.2006, 05:07
     
    jbirchett
    rank:
    Helper Helper
    registered:
     November 2002
    Status:
    offline
    last visit:
    29.05.07
    Posts:
    203
    Keep in mind that this is the first time I am coding anything for PostNuke. I am basically using the example module as my guide. Whenever something goes outside of that, I will be posting on forums to ask for direction on what the "right" way is.

    The guide will be based on a module that I am creating from scratch and I haven't even gotten to any templating yet, but when I do, I will keep it in mind. I don't have a lot of experience with CSS, but I would rather research proper XHTML compliant methodology than hack up a mess with tables, so don't be too concerned.

    It's going to take me a long time to create this module while documenting EVERY phase of it. :) I'm currently on the init phase of pninit.php and I'm doing an interactive init. I've documented the init() portion, but I've only started the interactive portion. I know it sounds backwards but it makes sense (to me.)

    I think the resulting document is not really going to be a HOWTO, but it will create a foundation for one. When I'm done, I'll need to go back and look at ways to generalize it and then make it a Wiki. That way, the community can add things to it that I never thought of.
  • Posted: 13.01.2006, 08:46
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    23.11.08
    Posts:
    1676
    Your justs amazing man... nice going!

    --
    Under Construction!
  • Posted: 13.01.2006, 11:50
     
    jbirchett
    rank:
    Helper Helper
    registered:
     November 2002
    Status:
    offline
    last visit:
    29.05.07
    Posts:
    203
    Thanks for the compliment. I was an English major with a technical writing concentration, so I'm not averse to writing. I ended up going into IT, so my technical writing skills went virtually unused for many years, as is probably evident to any "fresh" technical writers out there, but I am still able to crank out volumes of rubbish at a pretty fast clip, so it's really not that amazing.

    I'm just a frustrated "developer" who wants to see PostNuke continue to thrive and I think the way to do that is to load it up with quality 3rd party modules. There are a lot of people out there creating modules based on what's already out there and using techniques that have been outdated for some time, like using pnHTML instead of pnRender in a new module, so I see a real need for this type of document. A quick search of this forum will show you that as well. I figured since I was going to persist in learning this stuff, I may as well write it down as I go along and share it with others who may need it. Also, I've been using PostNuke for quite awhile now and I'm happy to finally be contributing to it.

    Don't judge anything until the document is done, though. LOL. ;)
  • Posted: 13.01.2006, 18:57
     
    come
    rank:
    Helper Helper
    registered:
     December 1969
    Status:
    offline
    last visit:
    01.07.08
    Posts:
    137

    jbirchett

    I was an English major with a technical writing concentration, so I'm not averse to writing.

    That explains the high quality and fast creation of the Anatomy-document.

    I have to say that what you are doing here is one of THE most needed contributions to the PN community. Thanks a lot.

    I also just started with module development (with the help of your docs) but have already gathered some experience with PN theme design (i.e. the flexi-themes are coming from me).

    What I have discovered missing in the example module is the directory /pnstyle with a style.css in it. In it one can declare specific CSS-classes for the module that are loaded by the theme in the master/home.htm via the [modulestylesheet XHTML=true]-tag.

    --
    greetings,

    O. Encke

    ASUS Notebook Forum
  • Posted: 13.01.2006, 20:53
     
    jbirchett
    rank:
    Helper Helper
    registered:
     November 2002
    Status:
    offline
    last visit:
    29.05.07
    Posts:
    203
    Cool. I'll check in to that. I am woefully ignorant of Xanthia at the moment. I used AT for awhile, but I'm trying to stick to Xanthia for everything I do in the future.
  • Posted: 13.01.2006, 22:49
     
    jbirchett
    rank:
    Helper Helper
    registered:
     November 2002
    Status:
    offline
    last visit:
    29.05.07
    Posts:
    203
    By the way, the .761 Example module does have a pnstyle/ folder with a style.css style sheet in it. The content is not exactly overwhelming, but it's there:

    Code

    /*
    This is an example of a module stylesheet. It is used to hold css definitions used within the module templates

    The stylesheet will be used by xanthia themes assuming the tag <!--[modulestylesheet]--> is in the header of the
    page templates. Other theme types will automatically make use of this as the header_footer module templates have this
    tag.

    A module stylesheet can be overrriden by a theme by creating a copy of the stylesheet in
    themes/<theme name>/style/<module>/style.css.

    To avoid clashes with other css definitions it's best to use the module name within module class and id names

    All styles in this stylesheet should be considered as examples only not recommendations of styling to be used
    within a module
    */


    /* This style adds a black dotted border around the place holder for the list of items held by the module */
    div.example_itemlist {
        margin-top: 5px;
        border: 1px dotted black;
    }


    It's got enough meat to let people know how to use it.
  • Posted: 14.01.2006, 01:25
     
    jediping
    rank:
    Helper Helper
    registered:
     November 2004
    Status:
    offline
    last visit:
    12.03.07
    Posts:
    387
    One note about tables--there IS a place for them. Not to make layout, but to convey information in a spread-sheet-like format. Took me a while to come to terms with that, since my initial knee-jerk reaction is to avoid tables at all costs. :)
  • Posted: 14.01.2006, 19:22
     
    come
    rank:
    Helper Helper
    registered:
     December 1969
    Status:
    offline
    last visit:
    01.07.08
    Posts:
    137
    @jbirchett:
    Yes, you are right, I still had the .760 version in mind.

    @jediping:
    I completely agree with you.
    The web standards say that HTML-tags are for structure and CSS is for layout.

    So if you want to present table structured data then tables are the right way to display them.
    BUT for any layout and positioning purposes like a three-column-website CSS is the right way.

    Often it is enough to style the h(x),p,a,ul, etc tags with CSS classes or if necessary div and span tags can be added.
    For maximum browser compatibility it is best to first reset everything with

    Code

    * {margin:0; padding:0;}
    and avoid using padding as much as possible (because of wrong box model in IE).
    Of course this should happen in the theme, not in the module stylesheet.

    --
    greetings,

    O. Encke

    ASUS Notebook Forum
  • Posted: 15.01.2006, 02:22
     
    Paustian
    rank:
    Helper Helper
    registered:
     May 2005
    Status:
    offline
    last visit:
    20.11.08
    Posts:
    129
    I would be willing to volunteer a little bit of time for this. I have written extensively in the sciences and program in bioinfomatics, so I hope I can be of some help. Let me know if you want someone to look over stuff or need a shove to break the writers block.

Goto page: 1 - 2 - 3 [+1]

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula