 |
 |
 |
 |
Registered: 06/07/06
Posts: 728
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
#216545 - 08/20/08 10:55 AM
Re: Topic Views
[Re: FREAK]
|
   
Registered: 06/04/06
Posts: 7898
Loc: Aberdeen, WA
|
Well, it seems to be behaving normally.
For example, the SP 8/18 post. 36 replies and 27 views. While there are 36 replies, there were only a total of 4 people that posted in the thread, and many of them came from the same person in a very short time-span, possibly via quick reply. So these wouldn't be counted as views. So, it just looks like not very many people have actually viewed the topic.
Same thing with the SP 8/15 post. Lots of replies, but those only came from a total of 3 people, so the view count isn't going to be that high.
You're more active ones seem to be normal. The posts under the Bad Man 2008 forums have pretty normal looking replies/views ratio.
As for clicking on a topic 5 times, and it only counting one. It basically 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 one view.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#216566 - 08/21/08 01:03 PM
Re: Topic Views
[Re: Gizmo]
|
   
Registered: 06/04/06
Posts: 7898
Loc: Aberdeen, WA
|
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. It's a modification necessary to get it to count every click on a topic. Normally we don't post modifications here, only on UBBDev, but since it's a quick little change, I'll go ahead. Around line 411 of showflat.inc.php, you'll see this:
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 that, to this:
$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'];
You're just commenting out the conditional, so it's always going to update the topic instead. And remember, that topic views won't update until a new post is made somewhere on the forum.
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#216914 - 09/10/08 08:59 AM
Re: Topic Views
[Re: FREAK]
|
   
Registered: 06/04/06
Posts: 7898
Loc: Aberdeen, WA
|
Originally it was working as it should, like I explained in the one post, since it was only a couple people posting in the topic, the views were much lower than the replies. So that was normal, so not much can be done on the official support side. For now, I'd go back to the stock code, remove the change, so it at least tracks the way it should stock. What you're looking for really, is a modification, and it looks like that's where the problem lies at this point. Couple options would be to either hit UBBDev as there are a few people that specialize in modifications. If you can't find anyone to take up the task there, you can PM me here as I do smaller ones on a case by case basis as I have the time (which isn't much).
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#216976 - 09/12/08 05:37 PM
Re: Topic Views
[Re: Rick]
|
newbie
 
Registered: 05/13/06
Posts: 36
|
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
|