|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
Currently I have version 7.1.1
My question is how can I change the topic views to count everytime someone clicks on a topic rather than it being a unique count per person.
Example if I click on a topic 5 times during the day, I want it to count as a hit 5 times instead of just 1.
I need to show the amount of times a topic has been clicked and reviewed rather than by the number of unique hits.
All of my peer competition has this set up but me and I am looking at no advertising revenue as my peers are getting it due to the advertisers are looking at the number of hits overall compared to unique.
This is a major problem for me and I am losing out big time. I need to know step by step what to do so I can be in line with my peers.
I am in need of help badly. I am not smart when it comes to doing this stuff so I could use the help.
Thanks and I look forward to your help.
FREAK
Last edited by FREAK; 08/17/2008 7:49 PM.
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
It does how you ask - every click is counted as a view, it may cache for a few minutes before the number is updated, but every click counts.
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
I don't believe that to be the case Allen. http://www.freaksforum.com/forum/ubbthreads.php/ubb/postlist/Board/25Look at some of the lopsided numbers compared to posts and views. In the past a post counted as a view because you had to pull up the topic to post. For example look at SP 8/15 71 replies but only 32 views. I know for fact that if I go to a topic, leave it and go back, it doesn't increase by 1 because it recognizes me as a viewer already. If I go to a thread and just keep hitting refresh of the topic, it doesn't go up at all. Other sites forums do.
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
That's not the way it was designed - looks like you have a bug. I'd update to current code (when 7.3.2 comes out) then follow-through if you aren't seeing progress. You'll benefit from the improved SE-friendliness of current code too.
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
Well.... it's been that way since day 1 when it was installed. Not sure what the deal is, but someone I know installed it for me.
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
For now... what can be done?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
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.
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
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
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Well, that site isn't a UBB forum; so obviously it's not the same tracking code in play for calculating view counts..
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
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.
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
Interesting...
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
Well it's official... post views have come to a complete stop. I have no idea of knowing how many views are taking place.
Any ideas?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
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).
|
|
|
|
Joined: Apr 2008
Posts: 33
newbie
|
newbie
Joined: Apr 2008
Posts: 33 |
IME the views number doesn't always update properly, even here at UBBCentral. For instance, I went to the Pre-Sales Questions forum and read the Running in a cluster at the web server level? post, and 15 minutes later the number of views still says 0. Cleared Firefox's cache just in case that was involved but no change.
Running UBB.threads 7.5.5 as of May 23 2010
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
The views do not update in real time. They only update when a post has been made somewhere else on the forum. As you can see, the views have updated now, though I do still need to respond to your question.
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
And it can't be you unless you remove your cookie and log back in. It needs to be another user(s) posting to see the change.
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
I made a plea for help at the DEV side hopefully something can come of it. I don't want to leave UBB to have to compete with other forums that operate the way I need to. I have been with UBB for 10 years.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
This is probably something I'll put an option for in our next feature version. Maybe something you can just choose, so it will track the way it currently does or track every click. It will still use a caching system to prevent table locks from updating the views live however.
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
|
|
|
|
Joined: May 2006
Posts: 169
Member
|
Member
Joined: May 2006
Posts: 169 |
Well I went in and took out the // where it was different in the two spots it was added into, and as of right now it's still not updating.
Unless I totally missed something else it didn't go back to as it was as of right now.
What a mess. It's pretty embarassing to say the least.
|
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
1 members (Ruben),
881
guests, and
187
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|