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):

PHP Code
// ------------------------------------------------------------
	// If this is our first visit to this topic, update the counter
	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.

PHP Code
// ------------------------------------------------------------
	// If this is our first visit to this topic, update the counter
	//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'];
	//}
  



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.


The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)