Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Unique Reads
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Wildland
New Member

USA
74 Posts

Posted - 07 January 2009 :  12:17:15  Show Profile  Visit Wildland's Homepage
Is there a way to count only unique reads so that if the same person clicks on the same topic 10 times it only counts it as 1 read for that topic?

Thanks in advance<

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 07 January 2009 :  12:21:35  Show Profile  Visit HuwR's Homepage
no.<
Go to Top of Page

Wildland
New Member

USA
74 Posts

Posted - 07 January 2009 :  12:36:37  Show Profile  Visit Wildland's Homepage
Oh well I was hoping it would be as simple as changing a line of code to assign a vale to the cookie, but if it can't be done, it can't be done, thanks for your quick answer.<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 07 January 2009 :  13:01:35  Show Profile  Visit SiSL's Homepage
What HuwR means, it can't be done with current forum features. You can as well do it with modification written for this sole purpose. Nothing is impossible<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 07 January 2009 :  13:10:28  Show Profile  Visit AnonJr's Homepage
Most things are possible... but just because you can do something doesn't mean you should.

While it is technically possible, you're going to add a fair amount of processing overhead to the forum.<
Go to Top of Page

Wildland
New Member

USA
74 Posts

Posted - 07 January 2009 :  13:20:48  Show Profile  Visit Wildland's Homepage
I guess that makes since because the server would have to keep a list of everyone who has looked at each topic and check it before making a count.<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 07 January 2009 :  13:28:44  Show Profile
A quick, slimline way to do it, while not exactly what you're looking for is to create a session variable that holds the ID of the last topic viewed and then check that against the current topic ID before updating the view count. This prevents people from hammering away on the refresh button and bumping up the view count. Also, returning to a topic after posting a reply will not count as an additional view.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Wildland
New Member

USA
74 Posts

Posted - 07 January 2009 :  13:34:51  Show Profile  Visit Wildland's Homepage
That would defiantly be useful and very much along the line of what I am interested in. I just got no idea how to do it.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 07 January 2009 :  18:19:51  Show Profile
Keeping a table of topics viewed (by topic) with records of every member who viewed each? Can you imagine how fast the database would grow ... and how much the forum would slow down with all those additional calls to verify/write?<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 07 January 2009 :  18:27:35  Show Profile  Visit SiSL's Homepage
quote:
Originally posted by Carefree

Keeping a table of topics viewed (by topic) with records of every member who viewed each? Can you imagine how fast the database would grow ... and how much the forum would slow down with all those additional calls to verify/write?



That's how most popular forums like vBulletin or phpbb out there does, to handle "You have read that topic" log...

Could be handled by deleting stuff after certain period of time...<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 07 January 2009 18:28:16
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 08 January 2009 :  04:28:18  Show Profile
quote:
Originally posted by Wildland
That would defiantly be useful and very much along the line of what I am interested in. I just got no idea how to do it.
Find the following beginning on line 477 of topic.asp:
	'## Forum_SQL
	strSql = "UPDATE " & strActivePrefix & "TOPICS "
	strSql = strSql & " SET T_VIEW_COUNT = (T_VIEW_COUNT + 1) "
	strSql = strSql & " WHERE (TOPIC_ID = " & Topic_ID & ")"

	my_conn.Execute (strSql),,adCmdText + adExecuteNoRecords
And replace it with the following:
	if session("lasttopic") <> Topic_ID then
		'## Forum_SQL
		strSql = "UPDATE " & strActivePrefix & "TOPICS "
		strSql = strSql & " SET T_VIEW_COUNT = (T_VIEW_COUNT + 1) "
		strSql = strSql & " WHERE (TOPIC_ID = " & Topic_ID & ")"

		my_conn.Execute (strSql),,adCmdText + adExecuteNoRecords
		session("lasttopic") = Topic_ID
	end if
If you wanted, you could add an additional check to that if statement so that views by admins (and moderators) are never counted.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Wildland
New Member

USA
74 Posts

Posted - 08 January 2009 :  14:10:41  Show Profile  Visit Wildland's Homepage
I will try this as soon as I get home tonight.

Just a thought, doesn't the forum have a way to keep track of things you have read already? whenever you log on it tells you which posts are new to you, or dose this work in a completely different way?<
Go to Top of Page

Wildland
New Member

USA
74 Posts

Posted - 08 January 2009 :  18:55:46  Show Profile  Visit Wildland's Homepage
count still goes up every time and when you hit refresh.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 08 January 2009 :  20:38:50  Show Profile
That's not possible with the way Shaggy changed it. Post a link to your "topic.asp" in .txt format and we'll have a look.<
Go to Top of Page

Wildland
New Member

USA
74 Posts

Posted - 08 January 2009 :  21:21:40  Show Profile  Visit Wildland's Homepage
www.roleplayingmaps.net/topic.txt<
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 08 January 2009 :  23:02:55  Show Profile
You modified the wrong bit of code. In your file, you should have modified lines 639-643 (as it is now).<
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07