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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Modifying News Module
-
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
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
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!
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
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
-
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Apr 02, 2010
- Posts: 1208
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
- Moderated by:
- Support
