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)
 Who Read Topic MOD
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 6

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 08 April 2003 :  17:31:26  Show Profile
As a result of a request from this topic, I've created the "Who Read Topic" MOD.

First off, let me say, it makes me very nervous to release a mod. I've tested it, but not on a busy forum, so I can't say how it will perform. Also, I've done a lot of cutting and pasting from existing code, so hopefully I'm not misusing certain variables and such. I also have no idea what this will do to the size of the database since a record is created for every member who reads a topic. So, maximum records in the new table = number of topics x number of members.

Phew, now that I have that off my chest here's what the mod does. It allows admins and moderators to view a list of members who have read a particular topic by clicking the binoculars icon. Also, admins and individual members can view a listing of all non-archived topics that the member has read available through the member's profile.

Click here to grab the mod. Please let me know if you encounter any problems!

<edit>08 April 2003 18:29:04 - Zip files corrected as per Hamlin's post below.</edit>

<edit>09 April 2003 13:59:28 - Zip files updated as per post with same time stamp below.</edit>

<edit>14 April 2003 : 21:24:59 - Zip files updated as per post with same time stamp below.</edit>

<edit>19 July 2003 : 19:21:06 - Zip files updated as per post with same time stamp below.</edit>


Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~

Edited by - Nikkol on 30 November 2003 17:40:03

Ez4arab
Junior Member

479 Posts

Posted - 08 April 2003 :  17:45:39  Show Profile  Visit Ez4arab's Homepage
Is this mod like Who Viewed This!

Ez4arab web site Ez4arab |
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 08 April 2003 :  18:02:25  Show Profile
Just a little change I had to make Nikkol, I'm using a mySQL database, and sql statement shown below was giveing me problems...
quote:

UPDATE FORUM_READ_TOPICS SET LAST_READ_DATE = '20030408225104' WHERE MEMBER_ID = 1AND TOPIC_ID = 1


I added a space after the 1, which means editing this piece of code in topic.asp...
'===================================WHO READ MOD============================================
	'check for existance of record in table for this topic and member
	strSql = "SELECT COUNT(*) FROM " & strMemberTablePrefix & "READ_TOPICS " &_
		"WHERE MEMBER_ID = " & MemberID & " AND TOPIC_ID = " & Topic_ID
	set rsChkLR = my_Conn.execute(strSql)
	intChkLR = rsChkLR(0)
	rsChkLR.close
	set rsChkLR = Nothing
	if intChkLR > 0 then	'update record
		strSql = "UPDATE " & strMemberTablePrefix & "READ_TOPICS " &_
			"SET LAST_READ_DATE = '" & DateToStr(strForumTimeAdjust) & "' " &_
			"WHERE MEMBER_ID = " & MemberID &_
			"<space>AND TOPIC_ID = " & Topic_ID
	else	'insert record
		strSql = "INSERT INTO " & strMemberTablePrefix & "READ_TOPICS " &_
			"(MEMBER_ID, TOPIC_ID, LAST_READ_DATE) VALUES " &_
			"(" & MemberID & ", " & Topic_ID & ", '" & DateToStr(strForumTimeAdjust) & "')"
	end if                  
	my_Conn.execute(strSql)
'===========================================================================================


EDIT - Very nice little mod though

Edited by - Hamlin on 08 April 2003 18:04:14
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 08 April 2003 :  18:20:29  Show Profile
oops ... thanks Hamlin. I'll make the changes to the zip file.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 08 April 2003 :  18:26:03  Show Profile
Ez4arab, from the quick look I had at the other mod, there are some differences. Namely, only admins and moderators can view the list of people who have read (to protect anonymity of members) and also members can pull up a list of the topics they have read (which I thought would be good since sometimes you want to follow a topic, but don't want to participate).

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 April 2003 :  13:59:28  Show Profile
Updated the zip file to account for archived topics, fixed a layout problem, and a missing include file.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 09 April 2003 :  14:06:30  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
Nikkol-

Do you have a demo of your mod available anywhere for us to look at?

-Spy

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 April 2003 :  14:09:58  Show Profile
Sure. Go to www.nikkol.net/forum

To test as a regular user, logon as "Test Snitz User" (without the quotes) with the password snitzuser. To test as a moderator, logon as "Test Snitz Mod" with the password snitzmod.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 09 April 2003 :  14:45:45  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
quote:
Originally posted by Nikkol

Sure. Go to www.nikkol.net/forum

To test as a regular user, logon as "Test Snitz User" (without the quotes) with the password snitzuser. To test as a moderator, logon as "Test Snitz Mod" with the password snitzmod.


I'm getting invalid username/password for both of these logins.

-Spy

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 April 2003 :  14:52:02  Show Profile
oops, i think the passwords are testuser and testmod ... bad memory for only creating them yesterday

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 09 April 2003 :  15:07:46  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
For the more visual people such as myself:



Nikkol-

I noticed two columns of users who have viewed it, I'm assuming it just wraps between those two columns as more users view it?

Also I was curious, is it possible to have guests listed to? (maybe not by default though since it could potentially kick a very large page out).

Nice job, I think I may use this one.

-Spy

PS - If you want to keep that screenshot move it to another server, I'm only going to leave it up for a few days so I'm not killing bandwidth indefinetly.

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 09 April 2003 :  15:28:33  Show Profile
Thanks for the image. I might include it in the zip instead of here. Users are added to the columns as it grows. The number of columns is also customizable by hard-coding into who_read.asp. I suppose it could be modified to include guests, but it would overwrite the guest entry everytime a different person viewed it, so I'm not sure it would be that handy. Did you check out the profile page as well? I'll show a couple of screen shots of that in a minute.




Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~

Edited by - Nikkol on 09 April 2003 15:46:22
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 14 April 2003 :  15:45:54  Show Profile
Thanks a lot, was thinking about making it myself, no time, how to do it, etc, and there it is, created by someone else :)
Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 14 April 2003 :  20:34:06  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
Alright I took the time today to try and impliment this on my forum and now I get this error when trying to view any topic. This is running on a live instance of the forum DB but a test instance of the asp code using MySQL for the DB.

Microsoft VBScript compilation (0x800A03EA)
Syntax error
/forumtest/topic.asp, line 412, column 38


Link to forum:
http://ahanw.dhs.org/forumtest
Link to topic.asp:
http://ahanw.dhs.org/forumtest/topic.asp.txt

-Spy

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

spyordie007
Junior Member

USA
408 Posts

Posted - 14 April 2003 :  20:35:55  Show Profile  Visit spyordie007's Homepage  Send spyordie007 an AOL message
just checked, that is the line within your code that reads:
		strSql = "UPDATE " & strTablePrefix & & "LAST_READ " &_

-Spy

Power - The only narcotic controlled by the SEC, not the FDA.

Prosperity without pollution! The American Hydrogen Association - http://www.ahanw.org
Questions about Hydrogen? Post them on our forum - http://www.ahanw.org/forum
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 14 April 2003 :  20:47:38  Show Profile
quote:
Originally posted by spyordie007

just checked, that is the line within your code that reads:
		strSql = "UPDATE " & strTablePrefix & & "LAST_READ " &_

-Spy

Take out the ampersand I highlighted in red.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page
Page: of 6 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.24 seconds. Powered By: Snitz Forums 2000 Version 3.4.07