Fork me on GitHub

Modifying News Module  Bottom

  • Over the last several months, I have been attempting to teach myself PHP/MySQL and have even written several little programs. Now I am wanting to dive into altering the News module into something else (it is a good starting point). I hope to eventually start writing my own Zikula modules from scratch.

    Anyway, the basic functionality of the News module is what I need, except for one little thing -- I want to track what articles are submitted by whom (if they are not registered, maybe record the IP address), and registered users should be able to view and edit a list of articles posted by themselves.

    Any initial thoughts on where to start looking and the best way to tackle this? I'm not looking for someone to just slap some code on me -- I mean, that would be great, but I want to know what gets changed and why so I can learn from it. I hope to one day return the favor by writing a module or two.

    Thanks!

    P.S. I should have mentioned that I have read through the Wiki regarding module development. Thank you!



    edited by: Wendell, Jan 14, 2009 - 01:47 PM
  • Well, News is a little hard to start, but if you need a functionality like that, well...
    A complete rename is not easy neither: table, lang defines, function names. Even with eclipse Search+Replace takes some time being care to avoid errors.

    To track anonymous submits you may need a new database field to store all the info want to save, and modify the user_new function and related stuff.

    To edit own articles, i've though on an additional permission check to a rule like: Stories:editown: | :: and process the rest with that $editown flag.

    Well, that's just the beggining icon_wink
    I'm working on the Example stuff to propose a base and begin to play with the O.O. stuff, looking forward to Zikula 2.0 and preparing our brains! icon_razz

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Seems like my first module, PrayerPost, I started with the FAQ module, because it was the closest to what I needed, and with my new version I'm working on, that's where I started. FirstVisit, which is close to done, I started with Blank, and then scavenged Settings, and a few others to figure out how to get the right template and code.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Basically what I am trying to do is this:
    • Users fill out a form;
    • After submitting, the next page shows a preview -- at that point, they have the option of saving the article or editing;
    • If the user chooses to edit, they are taken back to the form but with the previous data still in place;
    • If the user chooses to save, they are taken to a page that displays a textarea containing the code from the preview page.


    Thanks Michael and Mateo for your help. :) I think I will end up stealing bits and pieces from other modules.



    edited by: Wendell, Jan 15, 2009 - 12:27 AM

This list is based on users active over the last 60 minutes.