Previous Thread
Next Thread
Print Thread
Hop To
#216481 08/17/2008 7:49 PM
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.
FREAK #216483 08/17/2008 10:18 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.


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #216484 08/18/2008 12:45 AM
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/25

Look 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.

FREAK #216488 08/18/2008 10:06 AM
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.


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #216517 08/18/2008 9:01 PM
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. smile

FREAK #216537 08/19/2008 8:23 PM
Joined: May 2006
Posts: 169
Member
Member
Joined: May 2006
Posts: 169
For now... what can be done?

FREAK #216545 08/20/2008 1:55 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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.

Rick #216550 08/20/2008 11:36 PM
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.html

And 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

FREAK #216554 08/21/2008 7:50 AM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
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..


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Gizmo #216566 08/21/2008 4:03 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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:

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 that, to this:

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'];
	//}
 

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.

Rick #216568 08/21/2008 5:28 PM
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
Pooh-Bah
Joined: Dec 2003
Posts: 1,796
Interesting... smile


- Allen
- ThreadsDev | PraiseCafe
AllenAyres #216882 09/08/2008 8:14 PM
Joined: May 2006
Posts: 169
Member
Member
Joined: May 2006
Posts: 169
Thanks for the update, actually had it updated yesterday. Problem is it doesn't appear that any topic views are now registering in the entire forum.

This one has 3 replies and 0 views which I think would be impossible.

http://www.freaksforum.com/forum/ubbthreads.php/ubb/postlist/Board/2/page/1

I have a topic that has 75 posts but 5 views and these views were from before yesterday..

http://www.freaksforum.com/forum/ubbthreads.php/ubb/postlist/Board/25/page/1

I can allow you to go in and poke around. I can really use some help here.


FREAK #216903 09/09/2008 7:45 PM
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?

FREAK #216914 09/10/2008 11:59 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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).

Rick #216934 09/11/2008 10:57 AM
Joined: Apr 2008
Posts: 33
R
newbie
newbie
R Offline
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
Rascal #216936 09/11/2008 11:58 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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.

Rick #216951 09/11/2008 7:35 PM
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.

ntdoc #216952 09/11/2008 7:42 PM
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.

FREAK #216956 09/12/2008 9:43 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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.

Rick #216976 09/12/2008 8:37 PM
Joined: May 2006
Posts: 169
Member
Member
Joined: May 2006
Posts: 169
Thanks Rick

FREAK #216993 09/13/2008 11:27 PM
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.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (rootman), 641 guests, and 112 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)