Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
2 registered (David Dreezer, 1 invisible), 17 Guests and 18 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 05/15/08
Posts: 1
Top Posters (30 Days)
Ruben Rocha 177
Gizmo 110
Rick 109
Thelockman 80
driv 48
AllenAyres 35
Ian 33
ntdoc 27
Sirdude 23
ScriptKeeper 21
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Page 1 of 3 1 2 3 >
Topic Options
Rate This Topic
#216481 - 08/17/08 04:49 PM Topic Views
FREAK Offline
newbie
***

Registered: 05/13/06
Posts: 36
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 04:49 PM)

Top
#216483 - 08/17/08 07:18 PM Re: Topic Views [Re: FREAK]
AllenAyres Moderator Offline

****

Registered: 12/29/03
Posts: 1639
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/17/08 09:45 PM Re: Topic Views [Re: AllenAyres]
FREAK Offline
newbie
***

Registered: 05/13/06
Posts: 36
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 07:06 AM Re: Topic Views [Re: FREAK]
AllenAyres Moderator Offline

****

Registered: 12/29/03
Posts: 1639
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 06:01 PM Re: Topic Views [Re: AllenAyres]
FREAK Offline
newbie
***

Registered: 05/13/06
Posts: 36
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 05:23 PM Re: Topic Views [Re: FREAK]
FREAK Offline
newbie
***

Registered: 05/13/06
Posts: 36
For now... what can be done?

Top
#216545 - 08/20/08 10:55 AM Re: Topic Views [Re: FREAK]
Rick Administrator Online   content

*****

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.
_________________________
UBB.threads™ Developer
My Personal Website · StogieSmokers.com

Top
#216550 - 08/20/08 08:36 PM Re: Topic Views [Re: Rick]
FREAK Offline
newbie
***

Registered: 05/13/06
Posts: 36
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 04:50 AM Re: Topic Views [Re: FREAK]
Gizmo Moderator Offline

***

Registered: 06/04/06
Posts: 12002
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..
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#216566 - 08/21/08 01:03 PM Re: Topic Views [Re: Gizmo]
Rick Administrator Online   content

*****

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:

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.
_________________________
UBB.threads™ Developer
My Personal Website · StogieSmokers.com

Top
Page 1 of 3 1 2 3 >


Shout Box

Today's Birthdays
brushie, cass, Monte G., twebman, White Gold Wielder
Recent Topics
Font and column shifts occuring
by Bill B
Yesterday at 06:21 PM
changing colors in quoted thread box
by sbserves
Yesterday at 07:08 AM
[7.3.1] Image Not Found
by BellaOnline
11/29/08 09:48 PM
Private topic (PM) to a user that doesn't exist...
by bakerzdosen
11/29/08 10:56 AM
Forum Permissions - Can see forum
by Geoff
11/29/08 08:55 AM
Forum Stats
4261 Members
33 Forums
30528 Topics
154942 Posts

Max Online: 978 @ 06/24/07 08:19 PM