 |
 |
 |
 |
Registered: 06/05/06
Posts: 709
|
|
|
 |
 |
 |
 |
|
 |
 |
 |
 |
|
Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#216545 - 08/20/08 01:55 PM
Re: Topic Views
[Re: FREAK]
|
Post-a-holic
|
Registered: 06/04/06
Posts: 10164
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
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#216550 - 08/20/08 11:36 PM
Re: Topic Views
[Re: Rick]
|
journeyman
|
Registered: 05/13/06
Posts: 58
|
|
Rick thanks for the reply, but that's not happening. I clicked on a topic from last week in the SP area left the site entirely and went back and the topic view stayed the same. If I went to this site and I am not spamming for them but only using them as an example... http://www.majorwager.com/forums/race-track/170704-saratoga-8-16-a.htmlAnd opened that topic and refreshed 5 times... it shows as 5 views. If you try it you'll see what I mean, and they have the qucik reply option as well and it counts as a view. I have tested it against mine. That is my post there so I know it works as I described and tested the multiple refresh to see if the views went up and it did everytime. So either that board is what I really need or I need to find a way to have my board work that way. I don't know the answer so hence why I am here where I have been with you guys since I started the forum over 10 years ago. Thanks for your help. FREAK
|
|
Top
|
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#216566 - 08/21/08 04:03 PM
Re: Topic Views
[Re: Gizmo]
|
Post-a-holic
|
Registered: 06/04/06
Posts: 10164
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
|
|
|
|
|
 |
 |
 |
 |
|
|