Skip to the content
Documentation

view_count is not working by default

No ratings yet

view_count apparently needs extra magick to work. Either by analyzing apache log in cronjob http://ez.no/doc/ez_publish/techn.../the_cronjob_scripts#updateviewcount
or if you want live updating this code from advancedforums extension (svn) could be helpful:
count.php

$Module =& $Params['Module'];

if ( $Params[ 'NodeID' ] )
{
        include_once( "kernel/classes/ezviewcounter.php");
        $counter = eZViewCounter::fetch( $Params[ 'NodeID' ] );
        if ( !is_object( $counter ) )
        {
                $counter = eZViewCounter::create( $Params[ 'NodeID' ] );
        }
        $counter->increase();
}
eZExecution::cleanExit();