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

Dizkus

Bottom
My first module some questions.
  • Posted: 24.03.2005, 22:18
     
    edfel
    rank:
    Professional Professional
    registered:
     December 1969
    Status:
    offline
    last visit:
    02.09.07
    Posts:
    831
    Hi All:

    I have decided to put my hands on and develop my first PN module. Altough I have developed some dirty hacks, this will be my first experience.

    The module I want to develop basically consists of writing the newspaper Headline and classify (TOPIC) if it is related with Crime, Politics, Economics, etc...

    As I want to enter HEADLINES from various months back, the DATE field must be defined and data entry manually. I also want to be able to search HEADLINES using date. So users should be able to search with date (using from and to).

    How I define the date field that allows to what I want? Also should I create a separate NEWSPAPERS TABLE TO OPTIMIZE or use a newspaper field withing tha main table. The same applies with TOPIC, I could predefine the TOPICS and have it on a separate table too.

    THE 'ADVANCE FEATURES' I PLAN INCLUDE:
    1- Be able to display stats related with how many headlines are for each topic -- How I do this?? I think the stats module could be a good example.

    or...

    2- How I can pass the values to JPGRAPH to have graphic capabilities

    Users will only be able to read or see the information. Only admins will enter the Headlines.

    Finally, Is this too much for a newbie??

    TIA :wink:
  • Posted: 25.03.2005, 06:52
     
    csteelatgburg
    rank:
    Helper Helper
    registered:
     October 2002
    Status:
    offline
    last visit:
    23.01.07
    Posts:
    192
    In the spirit of "and the first shall be last...", I'll start by saying, in my opinion, nothing is too much for a newbie. It may take longer than you like, and you may need to work on small pieces at a time, but nothing is too much. I often separate my modules into little pieces, which also makes budgeting time easier (tonight, I just want to get this form done, so I can enter whatever, tomorrow, I will display whatever).

    Anyway, I would recommend using a mysql timestamp field for the timestamp. That should make it easier to take advantage of the mysql functions for your searching. You can enter a timestamp manually by submitting the value just like any other data type, just make sure you create the timestamp correctly.

    Second, the more you plan ahead and put in tables (your newspapers, topics, etc) and write functions to add/edit/remove, the easier it will be to maintain those items in the future. Keep in mind that you may be writing something that others might want to use, and their topics won't be the same as yours. If you hard code them into the module, chances are they won't know how to change them, and either they won't use it, or, they'll pester you for minor changes. :)

    Third, Good luck.

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula