|
|
Joined: Dec 1999
Posts: 30,867
Master Elite Member
|
UBBThreads normally only counts thread-views under certain circumstances (see below). This modification enables the software to count every every click on a topic: scripts/showflat.inc.php (~ line 411) (BEFORE):if ($_SESSION['current_topic'] != $topic_info['TOPIC_ID']) {
$query = "
insert into {$config['TABLE_PREFIX']}TOPIC_VIEWS
(TOPIC_ID)
values
( ? )
";
$dbh -> do_placeholder_query($query,array($topic_info['TOPIC_ID']),__LINE__,__FILE__);
$_SESSION['current_topic'] = $topic_info['TOPIC_ID'];
}
Change to this (AFTER):You basically just comment out the "if" conditional so that every topic click is counted. $query = "
insert into {$config['TABLE_PREFIX']}TOPIC_VIEWS
(TOPIC_ID)
values
( ? )
";
$dbh -> do_placeholder_query($query,array($topic_info['TOPIC_ID']),__LINE__,__FILE__);
$_SESSION['current_topic'] = $topic_info['TOPIC_ID'];
Here's how topic clicks are counted in the stock code:UBBThreads tracks your last visited topic. If you visit topic A, then visit topic B, then go back to topic A, it will count 2 hits on topic A. If you just click Topic A 5 times in a row, it's just going to count it as 1 view. Even leaving the site completely (unless you've closed your browser or clicked on another topic before returning to that same topic) your session is still going to track your last visited topic, so it's not going to count it.
|
|
|
|
|