Welcome Guest, Not a member yet? Register   Sign In
CMS with a Publishing Layer
#1

[eluser]BradEstey[/eluser]
I'm getting ready to write a new CMS system with a lot of new time saving features, like batch editing and record duplication, etc. This new CMS will have a built-in permissions system where I can manage which users have access to manage what sections. My main problem at the moment is that I'd like to give some users access to add and edit records in certain sections, but the changes need to be approved by me before they get published to the site.

This is more of a Database organization question than a code question, but maybe there's a CodeIgniter helper or something.... All of the sections have different fields and structures so it wouldn't work to have one table in the database to track the changes for all of these sections. Nor do I want to create a changes table for every table or create new records for every change.

Has anyone here created a solution like is before? At the moment, I'm thinking my best option is to create temporary .txt files on the server with an array of the changes or something like that...Maybe temporary tables in the database... I'm really not sure how to approach this.
#2

[eluser]flaky[/eluser]
I've created such a solution, basically what you need to do is add some columns to the table you want to add that feature. The columns I've added are
Code:
-page_active_version - tells me if this is the actual active version of the page
-page_parent_id - tells me from which page this version has been created
-page_version_approved_by - tells me by whom has the change been approved, when approved the page becomes the active version and is displayed to the public

basically with this structure, I can maintain a history of changes in the pages
#3

[eluser]n0xie[/eluser]
[quote author="Bradillac" date="1272361457"]I'm getting ready to write a new CMS system [/quote]
Why go through all the trouble? Try Pyrocms or Drupal.
#4

[eluser]BradEstey[/eluser]
n0xie: We've spent a lot of time researching the alternatives and to remain competitive our best option is to write a system from scratch rather than attempt to tweak a one-size-fits-all system to meet our specific needs.

flaky: I'm not sure if that's the best solution. I don't think I want a paper trail of changes since that's the point of having administrative approval. I'd rather admins be alerted to which changes are awaiting approval, review them, and then push them though. I will probably keep one simple table to track history storing only:

- changed by userid
- approved by userid
- sectionid
- pageid
- date changed
- date approved

I want to avoid the chance that someone will change one entry 10 times and in effect that one entry taking up 10x the amount of space in the DB it needs to. Multiply that by the 2000+ pages we have and it could be a monster.. I don't need a wiki. Smile I'd rather a change be made, some small history kept, and all the changed data be discarded. That's why I was thinking temporary txt files or maybe temporary tables?




Theme © iAndrew 2016 - Forum software by © MyBB