Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
5 registered (SteveS, driv, A-GATE, Iann128, GregK), 42 Guests and 17 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 06/05/06
Posts: 709
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 13
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 3 1 2 3 >
Topic Options
#216481 - 08/17/08 07:49 PM Topic Views
FREAK Offline
journeyman
Registered: 05/13/06
Posts: 58
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


Edited by FREAK (08/17/08 07:49 PM)
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#216483 - 08/17/08 10:18 PM Re: Topic Views [Re: FREAK]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
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
Top
#216484 - 08/18/08 12:45 AM Re: Topic Views [Re: AllenAyres]
FREAK Offline
journeyman
Registered: 05/13/06
Posts: 58
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.
Top
#216488 - 08/18/08 10:06 AM Re: Topic Views [Re: FREAK]
AllenAyres Offline

Registered: 12/29/03
Posts: 1995
Loc: Texas
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
Top
#216517 - 08/18/08 09:01 PM Re: Topic Views [Re: AllenAyres]
FREAK Offline
journeyman
Registered: 05/13/06
Posts: 58
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
Top
#216537 - 08/19/08 08:23 PM Re: Topic Views [Re: FREAK]
FREAK Offline
journeyman
Registered: 05/13/06
Posts: 58
For now... what can be done?
Top
#216545 - 08/20/08 01:55 PM Re: Topic Views [Re: FREAK]
Rick Offline
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]
FREAK Offline
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.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
Top
#216554 - 08/21/08 07:50 AM Re: Topic Views [Re: FREAK]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
Well, that site isn't a UBB forum; so obviously it's not the same tracking code in play for calculating view counts..
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#216566 - 08/21/08 04:03 PM Re: Topic Views [Re: Gizmo]
Rick Offline
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:

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.
Top
Page 1 of 3 1 2 3 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image