Topic: blog post view hit counter?
how to change this:
private static function hits($id, $hits) {
if (Session::exists('hits'.$id) == false) {
$hits++;
if(News::$news->updateWhere('[id='.$id.']', array('hits' => $hits))) {
Session::set('hits'.$id, 1);
}
}return $hits;
}
to make blog post view hit counter?
the above code is from kanekt news plugin