Loading content from new table

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
Jay7

Loading content from new table

Post by Jay7 »

I am trying to edit the cmsms code so that somebody can edit an existing page and save it unpublished for approval at a later date.

I have added a save button next to submit, apply and cancel in editcontent.php that when clicked stores the content in a new table called content_props_temp. If I click submit or apply the content is stored in the content_props table and the existing entry is overwritten. Basically, I have two tables, content_props that stores the content shown on the front end and content_props_temp that stores edited content before it is approved and published. So far, so good.

When somebody attempts to edit a page they should see the most recent version displaying unpublished edits and not the version that is being displayed on the front end. This is where I am having a problem. I can't seem to work out how to load the content from content_props_temp on the back end while keeping the content for the front end loading from content_props.

Can anyone help?

Thanks!
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Loading content from new table

Post by Elijah Lofgren »

I may be able to take a look at this if you'd please post your code so far. I'm also interested in setting up approval like this.

New workflow capabilities in CMSMS 1.1 ( once it is completed) should make this possible without code hacking.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Jay7

Re: Loading content from new table

Post by Jay7 »

I would have replyed sooner but I was not notified of a reply to this thread.

I did get this sorted although it isn't as efficient as it could be. I will dig through the files to find the edits I made.
Post Reply

Return to “Developers Discussion”