Author |
Topic  |
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 16 December 2000 : 15:54:16
|
I have updated the active users to where I believe that it will work much easier. This script will allow you to tell where anyone is on your forum.
Some things I <b>hopefully</b> updated are.... <ul><li>Delete the Guest name if they login</li><li>they are removed after 10 minutes of inactivity</li><li>will display when they first signed in</li><li>will display last time they accessed a page</li></ul>
One thing I did not add, which I think would be a nice add-on is the total time online. I think this would have to use dates to, cause if they signed on at 11:30 pm and accessed a page at 1:30 am, it would give a negative number.
Please give me feedback on this and hopefully it will work for everyone.
http://www.freeaspcode.net/active_users.zip
<b>Brad</b> http://www.freeaspcode.net
Brad |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 16 December 2000 : 16:03:58
|
In the zip you say <BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Run the active_users_setup.asp. If you allready have a table for your online users, you need to delete it <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
That file is not included
<font color=red>Da_Stimulator</font id=red> Stimmy's Forums - Using 3.1 SR2 "We all die someday, but your goin down before I do" - Me |
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 16 December 2000 : 16:14:07
|
You might wanna edit it again and comment out the lines <pre id=code><font face=courier size=2 id=code> ' strSql = "DROP TABLE " & strTablePrefix & "ONLINE" ' my_Conn.Execute strSql </font id=code></pre id=code>
I already did, but you get an error if ya dont.
<font color=red>Da_Stimulator</font id=red> Stimmy's Forums - Using 3.1 SR2 "We all die someday, but your goin down before I do" - Me |
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 16 December 2000 : 16:21:22
|
I've done the same before :) have that Drop table at the top cuz you screw up somewhere and need to reset the table. I forgot to remove that from my smiles mod too. Nothing to worry about.
<font color=red>Da_Stimulator</font id=red> Stimmy's Forums - Using 3.1 SR2 "We all die someday, but your goin down before I do" - Me |
 |
|
Mondo2000
Starting Member
7 Posts |
Posted - 16 December 2000 : 19:26:34
|
Where is a good place to drop the code into the inc_top.asp file? keep getting errors..
Thanks
<b><font color=red>Been There Done That</b></font id=red> |
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 16 December 2000 : 20:03:00
|
I added the code right above this line of code....
<html>
<head> <title><% =strForumTitle %></title> <meta name="copyright" content="This code is Copyright (C) 2000 Michael Anderson"> <script language="JavaScript">
<b>does anyone else have any comments or suggestions on this?</b>
Brad |
 |
|
Mondo2000
Starting Member
7 Posts |
Posted - 16 December 2000 : 20:16:33
|
Placed right above and recived this nice note.
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. /fxf_asp/inc_top.asp, line 151
Browser Type: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Page: GET /fxf_asp/default.asp
<b><font color=red>Been There Done That</b></font id=red> |
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 16 December 2000 : 20:22:30
|
are you using Access or SQL Server?
This is MOD works with SQL Server 7. I am not sure if it works with anything else so maybe someone can look at the code, and make it work for all other types of databases.
Brad |
 |
|
RichardKinser
Snitz Forums Admin
    
USA
16655 Posts |
Posted - 16 December 2000 : 20:25:44
|
It worked on mine using Access DB.
I placed that code right after the:
</head>
Edited by - Richard Kinser on 16 December 2000 21:52:18 |
 |
|
Mondo2000
Starting Member
7 Posts |
Posted - 16 December 2000 : 21:42:05
|
Using MySQL on NT. Ok will wait and hope someone works on the code for My SQL can't be much different <img src=icon_smile.gif border=0 align=middle>
<b><font color=red>Been There Done That</b></font id=red> |
 |
|
dwalker
Starting Member
4 Posts |
Posted - 16 December 2000 : 23:29:27
|
I just installed this MOD and this is what I get when I go to VIEW or POST a message:
Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression ''Viewing Message ' <a href="topic.asp?TOPIC_ID=2&FORUM_ID=1&CAT_ID=1&Topic_Title=Welcome&Forum_Title=The+Forum">Welcome to the Forum</a> '''. /forums/inc_top.asp, line 167
when I look at line 167 I see:
my_Conn.Execute (strSql)
if I comment this line out it seems to work.
What I'm I doing wrong? I've added the mod for Private Messages and the one to sort the forums. Could they be causing the problem?
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 17 December 2000 : 00:38:16
|
I think it has to do with inserting ' into your database. Try changing the following lines of code in your inc_top.asp from....
ElseIf lcase(Right(strOnlinePathInfo, 9)) = "topic.asp" Then strOnlineLocation = "Viewing Message ' <a href=""topic.asp?" & strOnlineQueryString & """>" & Request.QueryString("Topic_Title") & "</a> '" ElseIf lcase(Right(strOnlinePathInfo, 8)) = "post.asp" Then If Request.QueryString("method") = "Reply" Then strOnlineLocation = "Replying To Message ' <a href=""topic.asp?" & strOnlineQueryString & """>" & Request.QueryString("Topic_Title") & "</a> '" ElseIf Request.QueryString("method") = "Topic" Then strOnlineLocation = "Posting New Topic in ' <a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a> '" Else strOnlineLocation = "Unknown" End If
<b>To.....</b>
ElseIf lcase(Right(strOnlinePathInfo, 9)) = "topic.asp" Then strOnlineLocation = "Viewing Message <a href=""topic.asp?" & strOnlineQueryString & """>" & Request.QueryString("Topic_Title") & "</a>" ElseIf lcase(Right(strOnlinePathInfo, 8)) = "post.asp" Then If Request.QueryString("method") = "Reply" Then strOnlineLocation = "Replying To Message <a href=""topic.asp?" & strOnlineQueryString & """>" & Request.QueryString("Topic_Title") & "</a>" ElseIf Request.QueryString("method") = "Topic" Then strOnlineLocation = "Posting New Topic in <a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a>" Else strOnlineLocation = "Unknown" End If
Brad |
 |
|
dwalker
Starting Member
4 Posts |
Posted - 17 December 2000 : 02:30:05
|
You hit the nail on the head. That fixed it perfectly. Thank You!!
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 17 December 2000 : 02:35:49
|
Great,
Glad I could help. Does anyone else have any questions or comments about this?
Richard and Da_Stimulator, what do you think of this? Anything I left out or you think this MOD is great?
Brad |
 |
|
Topic  |
|