Updating content without publishing
Posted: Sun Nov 19, 2006 9:30 pm
I am setting up CMSms 1.0.2 for a client and as they will have several staff members updating content they would like to be able to save updated content without the changes being published until it is reviewed and approved by other staff members.
I have added a new "Save" button next to the "Apply" button in the edit view and have duplicated the content_props table and named it content_props_temp. My thinking is that I need to save the content to the content_props_temp table and when reviewed and approved overwrite the existing entry in content_props to make it live.
At the top of editcontent.php I added
$savetemp = false;
if (isset($_POST["savebutton"])) $savetemp = true;
On line 264 of editcontent.php I added
if ($savetemp){
$contentobj->Savetemp();
}else{
$contentobj->Save();}
Then in class.content.inc.php I duplicated the Save() function, named it Savetemp and changed the name of the table to which the function saves data to content_props_temp.
I am obviously doing something wrong because nothing gets stored. Can anyone offer advice on how best to achieve what I am trying to achieve? ThanksÂ
I have added a new "Save" button next to the "Apply" button in the edit view and have duplicated the content_props table and named it content_props_temp. My thinking is that I need to save the content to the content_props_temp table and when reviewed and approved overwrite the existing entry in content_props to make it live.
At the top of editcontent.php I added
$savetemp = false;
if (isset($_POST["savebutton"])) $savetemp = true;
On line 264 of editcontent.php I added
if ($savetemp){
$contentobj->Savetemp();
}else{
$contentobj->Save();}
Then in class.content.inc.php I duplicated the Save() function, named it Savetemp and changed the name of the table to which the function saves data to content_props_temp.
I am obviously doing something wrong because nothing gets stored. Can anyone offer advice on how best to achieve what I am trying to achieve? ThanksÂ
