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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 ADDON: Pop-up Topic Statistics 1.5
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 4

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 16 November 2004 :  16:34:54  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Current Version: 1.5
Description: Will display a pop-up window listing all users who have viewed and/or replied to a certain topic with a link back to their personal profile. Also includes number of times somebody has viewed/replied to a topic.

Added in 1.5

Added feature to enable/disable viewing of topic stats by member level (admin, admin/mod, mem only, all viewers)
Full Access, SQL Server, and MySQL database support

Note: The view count per viewer will be inaccurate for back-filled data (posts before you installed the mod) - there is nothign I can do about that.

Installation and upgrading instructions in readme file

To change who's able to view the topic stats, just go to your admin home, click "Feature Configuration" and scroll down to "misc features"

Demo
Download
Readme

View File Changes New beta feature
Scroll on each file until you see code highlighted in yellow, this is the altered code
admin_config_features.asp
config.asp
inc_func_common.asp
forum.asp
active.asp
topic.asp

HELP ME posts should be in the Help: MOD Implementation forum

Many thanks to Dayve for helping me work some annoying bugs out

Screenshots
Dayves site
(hope you dont mind)




-Stim

Edited by - Da_Stimulator on 23 December 2004 18:15:00

dayve
Forum Moderator

USA
5820 Posts

Posted - 16 November 2004 :  17:53:31  Show Profile  Visit dayve's Homepage
Not sure if it is as detailed as yours, but I believe this does the same thing:

http://www.snitzbitz.com/mods/details.asp?Version=All&mid=122

Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 16 November 2004 :  20:43:31  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Well... no its not as detailed as mine, and I released this thing way back on 3.2 or 3.3, so it was mine before it was anyone elses....

This show's who has viewed it, and who has replied. Bit more modification needed than that one.

-Stim
Go to Top of Page

aspwiz
Junior Member

250 Posts

Posted - 17 November 2004 :  07:17:59  Show Profile  Visit aspwiz's Homepage
Stim, may i make a suggestion. The topic 'Awwww' in your example has 24 replies by two people ('da_stimulator' and 'test') ... next to each one of those usernames, you could easily add the number of replies they have made... this info is available to you.

Similarly, the way you are collecting the 'viewers' member id's, would allow you to do the same for the viewers stats... something like:-

da_stimulator : 56 views
test : 12 views
Unregistered Users : 24 views

I think all the info you need is there already to do this with the possible exception of unregistered user stats, but that should be easy to collect / calculate.

If you are gonna do something, do it properly... ROFLMAO!

lol


Oh, by the way.... nice mod!

Edited by - aspwiz on 17 November 2004 07:19:53
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 17 November 2004 :  14:19:23  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
I thought of that, thats why I stuck "beta release" in there :)

-Stim
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 17 November 2004 :  17:18:29  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Updated with that stuff :P

-Stim
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 17 November 2004 :  18:54:43  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
A couple of observations.

In your first screenshot 8+3+2 = 13 views
Why does it say 12?

I take it the a view isn't counted when someone replies from "reply to topic" link from forum.asp?

Should anonymous users be listed? e.g.

da_stimulator 8
test 3
cripto9t 2
anonymous views 1

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 17 November 2004 :  23:34:47  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Anonymous users now listed, counts now accurately displayed

-Stim

Edited by - Da_Stimulator on 18 November 2004 01:34:33
Go to Top of Page

Gargoyle
Junior Member

USA
280 Posts

Posted - 18 November 2004 :  12:20:12  Show Profile  Visit Gargoyle's Homepage
What database's is this MOD compatable with ?

Here is a link to my Snitz powered Drag Racing site.
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 November 2004 :  12:50:19  Show Profile  Visit dayve's Homepage
he's using it on an Access db and I will be testing it on SQL Server tomorrow.

Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 19 November 2004 :  00:53:22  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
I recommend checking the querystring for valid data.
I'd replace
putTopicID = Cint(request.querystring("TOPIC_ID"))
putViewType = Cint(request.querystring("VIEW")) '1 = views, 2 = replies

if (putTopicID<>0) and (putViewType<3) and (putViewType>0) then

with
bolTopicIDOK = False
If isNumeric(Request.Querystring("TOPIC_ID")) Then
	putTopicID = CLng(Request.QueryString("TOPIC_ID"))
	bolTopicIDOK = True
End If
If isNumeric(Request.QueryString("VIEW")) Then
	putViewType = CInt(Request.QueryString("TOPIC_ID")) '1 = views, 2 = replies
End If

If bolTopicIDOK and (putViewType = 1 or putViewType = 2) Then


You might also want to add a check if the given topic exists.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz

Edited by - OneWayMule on 19 November 2004 03:28:20
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 19 November 2004 :  02:06:40  Show Profile  Visit dayve's Homepage
quote:
Known Bug: For some reason when you click a link to go back to the user's profile, the pop-up window goes blank. If anybody knows how to fix this please let me know! :)


I would convert this:
<a href="javascript:self.opener.location='topic.asp?TOPIC_ID=25'">test</a>

to this:
<a href="#" onclick="javascript:self.opener.location='topic.asp?TOPIC_ID=25';return false;">test</a>


This is the preferred method.

Update: I just added the return false; just because it is a good habit to use this. For pages that have links like this towards the bottom of the page (as your viewed/replied list may get), it will prevent the page from popping to the top....


Edited by - dayve on 19 November 2004 02:16:15
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 19 November 2004 :  03:21:52  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Download updated, thx dayve

-Stim
Go to Top of Page

jensen
New Member

United Kingdom
97 Posts

Posted - 19 November 2004 :  11:53:30  Show Profile
The bit of code you have as

<a href=""#"" onclick=""javascript:self.opener.location='topic.asp?TOPIC_ID=25';return false;"">" & _
  putSubject  & "</a>


is meant to do what?

if it was this..

<a href=""#"" onclick=""javascript:self.opener.location='topic.asp?TOPIC_ID="& puttopicID & "';return false;"">" & _
  putSubject  & "</a>


It would be more helpfull, as it takes you to the topic you are looking at.
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 19 November 2004 :  12:13:34  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
sorry about that, download updated.

-Stim
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 19 November 2004 :  19:55:42  Show Profile  Visit dayve's Homepage
SQL Server Syntax Error

	  strsql = "ALTER TABLE " & strTablePrefix & "TOPICS ADD COLUMN"
	  strsql = strsql & " T_MEMVIEWED "
	  if strDBType = "access" then
	    strsql = strsql & "memo "
	  else
	    strsql = strsql & "VARCHAR "
	  end if

should be

	  strsql = "ALTER TABLE " & strTablePrefix & "TOPICS ADD "
	  if strDBType = "access" then
	    strsql = strsql & "COLUMN T_MEMVIEWED memo; "
	  else
	    strsql = strsql & "T_MEMVIEWED VARCHAR(255); "
	  end if

The VARCHAR(255) could actually be TEXT(16) if you wanted a SQL Server Memo field.


Edited by - dayve on 19 November 2004 20:19:23
Go to Top of Page
Page: of 4 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 0.6 seconds. Powered By: Snitz Forums 2000 Version 3.4.07