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)
 Topic View and Reply Voyeur MOD for 3.3
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 4

extrafree
New Member

54 Posts

Posted - 20 November 2001 :  08:08:55  Show Profile  Visit extrafree's Homepage
:( in my forum dosn't work..
help me!

http://www.extrafree.it/TESTforum/forum.asp?FORUM_ID=19&CAT_ID=2&Forum_Title=Contro+le+regole

the italian golden forum
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 20 November 2001 :  08:21:08  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Extrafree, support for the 3.1 version can be obtained Here

----
-Eric | Mod Resource | Test Area
Sleep: A completely inadequate substitute for caffeine
http://phpscriptcenter.com -Quality PHP Scripts
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 20 November 2001 :  09:04:44  Show Profile  Visit extrafree's Homepage
now it work but,
it show me the users after add this mod,
but the real problem is that the number of
viewed is toped

exemple read 60 times
if you entry inside to read 15 times
counter show always 60 times

if you want to try it
as a login menber
password : 0 username : m
http://www.extrafree.it/TESTforum/FORUM.asp?FORUM_ID=8&CAT_ID=2&Forum_Title=Incontri

the italian golden forum


Edited by - extrafree on 20 November 2001 09:05:49
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 20 November 2001 :  09:26:29  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Are you using the version from this topic, or are you using Dayve's modified version for 3.1?

If your using this version I highly recommend you switch to his, as he altered it specifically for 3.1.

People who viewed the topic before you installed the mod will not show up on the list, there is no way to fix that.

----
-Eric | Mod Resource | Test Area
Sleep: A completely inadequate substitute for caffeine
http://phpscriptcenter.com -Quality PHP Scripts
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 20 November 2001 :  09:42:35  Show Profile  Visit extrafree's Homepage
ok ok now it work perfecly!
thanks everybody!! thanks thanks!
in particular way thanks to DA_STIMULATOR that his help me paziently!


the italian golden forum
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 20 November 2001 :  10:13:46  Show Profile  Visit extrafree's Homepage
just one problem :

if I insert dayve's code it work showing me when I read a post
but don't add the number of viewed.

if I isert the code in this topic it add number of viewed but
don't show me name of viewed!

the italian golden forum
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 20 November 2001 :  11:22:22  Show Profile  Visit extrafree's Homepage
now it's ok!
the problem was this : in your readme.txt(dayve's code)
say:

~~Find the following code:

'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "TOPICS "
strSql = strSql & " SET " & strTablePrefix & "TOPICS.T_VIEW_COUNT = (" & strTablePrefix & "TOPICS.T_VIEW_COUNT + 1) "
strSql = strSql & " WHERE (" & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") & ");"

~~Add the following code Directly below it

'--------------- TOPIC AND REPLY VIEW

etc... etc.......


but in my topic.asp work just if I insert it after the red script:

'## Forum_SQL
strSql = "UPDATE " & strTablePrefix & "TOPICS "
strSql = strSql & " SET " & strTablePrefix & "TOPICS.T_VIEW_COUNT = (" & strTablePrefix & "TOPICS.T_VIEW_COUNT + 1) "
strSql = strSql & " WHERE (" & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID") & ");"
my_conn.Execute (strSql)
'--------------- TOPIC AND REPLY VIEW



the italian golden forum
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 20 November 2001 :  11:24:28  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
yes that is correct - He must have missed something there

----
-Eric | Mod Resource | Test Area
Sleep: A completely inadequate substitute for caffeine
http://phpscriptcenter.com -Quality PHP Scripts
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 20 November 2001 :  17:56:35  Show Profile  Visit dayve's Homepage
just looked at the file, I didn't leave anything out. my_conn.Execute (strSql) is clearly shown in the zip file.

____________
dayve
http://www.nineinchnailz.com/forum
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 21 November 2001 :  15:29:13  Show Profile
Simplified the Code further and updated to remove the old members from the Read List (FIFO), when the limit of 255 is reached for the field.

 
Dim LenWhoViewed,Topic_WhoViewed,DoUpdate,TmpWhoViewed,UpdateTview,IDToDiscard
if MemberID = 0 or IsNull(MemberID) or MemberID < 0 then
'dont update anything
else
DoUpdate = True
strsql = "SELECT T.T_WHOVIEWED FROM " & strActivePrefix & "TOPICS T WHERE "
strsql = strsql & "T.TOPIC_ID=" & Topic_ID
set tviewRS = Server.CreateObject("ADODB.RecordSet")
tviewRS.open strsql, my_conn, 3
Topic_WhoViewed = tviewRS("T_WHOVIEWED")
tviewRS.close
set tviewRS = nothing
if IsNull(Topic_WhoViewed) or Topic_WhoViewed = "" or Topic_WhoViewed = "0" or Len(Trim(Topic_WhoViewed)) = 0 then
UpdateTview = MemberID
else
LenWhoViewed = len(Topic_WhoViewed)
arrWhoViewed = split(Topic_WhoViewed,",",-1,1)
'CHECK if the MemberID already Exists
if IsArray(arrWhoViewed) then
If Instr(1,Topic_WhoViewed, "," & MemberID & ",",1) > 0 or _
Trim(arrWhoViewed(lbound(arrWhoViewed))) = Trim(MemberID) or _
Trim(arrWhoViewed(ubound(arrWhoViewed))) = Trim(MemberID) then
DoUpDate = false
end if
else
if Trim(Topic_WhoViewed) = Trim(MemberID) then DoUpdate = false
end if
'CHECK if Field is Full. If Full then discard the
'Oldest MemberID(FIFO)
if DoUpdate = True then
if (LenWhoViewed + len(MemberID) = 255) or _
(LenWhoViewed + len(MemberID) > 255) then 'Max Limit
IDToDiscard = left(Topic_WhoViewed,(instr(len(MemberID),Topic_WhoViewed,",",1)))
if IDToDiscard <> MemberID & "," then
TmpWhoViewed = Replace (Topic_WhoViewed,IDToDiscard,"",1,1,1)
Topic_WhoViewed = TmpWhoViewed
DoUpdate = True
else
DoUpdate = false
end if
end if
end if
if DoUpDate = True then
UpdateTview = Topic_WhoViewed & "," & MemberID
end if
end if
'UPDATE the Database
if DOUpdate = true then
strsql = "UPDATE " & strActivePrefix & "TOPICS "
strsql = strsql & "SET " & strActivePrefix & "TOPICS.T_WHOVIEWED = '" & UpdateTview & "' WHERE "
strsql = strsql & strActivePrefix & "TOPICS.TOPIC_ID = " & Topic_ID
my_conn.execute(strsql)
end if
LenWhoViewed = ""
end if




GauravBhabu
There is only one miracle...That is LIFE! | It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.


Edited by - GauravBhabu on 21 November 2001 15:40:55
Go to Top of Page

blackinwhite
Average Member

Turkey
657 Posts

Posted - 21 November 2001 :  16:12:14  Show Profile
I have followed the instructions given in the .zip file.
It works fine for me.

____
e? - Online Life and Design Culture-new!!
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 21 November 2001 :  17:53:23  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
zip has been updated with changes by GauravBhabu - Thx

----
-Eric | Mod Resource | Test Area
Sleep: A completely inadequate substitute for caffeine
http://phpscriptcenter.com -Quality PHP Scripts
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 22 November 2001 :  03:53:10  Show Profile  Visit rick7165's Homepage
Dropped right in!

Thanks


Test Site:
EastPasco running on Huw's Code 3.3.10 SQL 2000
Need a Snitz MOD? Click Here: Snitz Mod Resource
Go to Top of Page
Page: of 4 Previous Topic Topic Next Topic  
Previous 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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07