feha
Posts: 712
|
Posted: 01/18/2006, 2:16 PM |
|
Also if you use on your page a Page Views counter
Be sure to place it On Cache Event in order to count Page Views
Simple counter code:
//Page_Content_Block_inc_OnCache @1-69F3A2A2
function Page_Content_Block_inc_OnCache(& $sender)
{
$Page_Content_Block_inc_OnCache = true;
$Component = & $sender;
$Container = CCGetParentContainer($sender);
global $Page_Content_Block_inc; //Compatibility
//End Page_Content_Block_inc_OnCache
//Custom Code @53-2A29BDB7
// -------------------------
// Write your own code here.
if(CCGetParam("pid","") > 0)
{
$db = new clsDBddd();
$pagesSQL="UPDATE __cms_pages SET views=views+1 WHERE pid=".CCGetParam("pid","");
$db->query($pagesSQL);
$db->close();
}
// -------------------------
//End Custom Code
_________________
Regards
feha
www.vision.to
feedpixel.com |