Looks like the files were deleted...
Here are the snippets:
Changes for index.php (look up the beginnings and ends of the code):
Code: Select all
...
$pageinfo = PageInfoOperations::LoadPageInfoByContentAlias($page);
//Cache mod by Jatinder starts. Part 1
//mod by Vin - removed 'timer', mod for pretty urls, $page -> $pageinfo->content_id
//28 Apr 2007, 12:58
if($pageinfo->cachable) {
$mcv = './tmp/cache/thind_' . md5($pageinfo->content_id) . '.inc.php';
if (file_exists($mcv) && !isset($_REQUEST['mact'])) {
readfile($mcv);
$endtime = microtime();
$db =& $gCms->GetDb();
echo "<!-- Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple (cached) using ".(isset($db->query_count)?$db->query_count:'')." SQL queries -->\n";
exit();
}
}
//Mod by Jatinder ends
if (isset($pageinfo) && $pageinfo !== FALSE)
...
Code: Select all
...
//Cache mod by Jatinder starts. Part 2
//mod by Vin - removed 'timer', mod for pretty urls, $page -> $pageinfo->content_id
//28 Apr 2007, 12:58
if($pageinfo->cachable) {
if (!isset($_REQUEST['mact'])) {
$file = fopen($mcv,'w');
fwrite($file, $html);
fclose($file);
}
}
//Mod by Jatinder ends
Events::SendEvent('Core', 'ContentPostRender', array('content' => &$html));
...
Without timer, sorry.
and for admin/editcontent.php:
Code: Select all
...
audit($contentobj->Id(), $contentobj->Name(), 'Edited Content');
//Mod by Thind starts
//13 Apr 2007
@unlink('../tmp/cache/thind_' . md5($contentobj->mId) . '.inc.php');//Mod by Vin
clearstatcache();//Mod by Vin 14 Apr 2007
//Mod by Thind ends
if ($submit)
...
New: When editing template, changes don't take effect, as you have to clear cache to delete the cached pages to see the changed layout, same for HTML blobs (global content blocks) in the template. Hence you need a User Defined Tag like this appended to the
[EDIT - Just realized this needs to be pre] [EDIT2 Really sorry, it should be:] EditTemplatePreCompile and GlobalContentPreCompile event
(All right, I little misunderstood the meaning of these events, I hope I wouldn't do a mistake again)
... to these events:
EditGlobalContentPost,
EditTemplatePost:
Code: Select all
global $gCms;
$contentops =& $gCms->GetContentOperations();
$contentops->ClearCache();
EDIT: Looks like changes to stylesheet don't take effect when using {static_stylesheet} tag, solution:
append the UDT above to EditStylesheetPost event.