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)
 question about Who's Online mod ...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bugzy
Junior Member

USA
147 Posts

Posted - 22 November 2000 :  03:07:27  Show Profile  Visit bugzy's Homepage
If i were to contect the code from whos_online.asp into a different page in a different directory from /forum ... say the root / directory ...

how would i go about changing the Where column to display something else ?!
what is telling the whos online code where each user is ?
so if i wanted to display them viewing the index.asp of the parent of /forum ?

how can i do that ?

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 22 November 2000 :  03:20:55  Show Profile
The code that you added to <b>forum.asp</b> is writing the information to the database. All you would need to do is include the same code in a page and change the information so that it would write the correct data to the database.

The code is also in the <b>online2.asp</b> file and the <b>whos_online.asp</b> file.

Edited by - Richard Kinser on 22 November 2000 03:22:13
Go to Top of Page

bugzy
Junior Member

USA
147 Posts

Posted - 22 November 2000 :  03:34:28  Show Profile  Visit bugzy's Homepage
so i would add the following into for example my /index.asp file

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Dim objConn, strConn, CheckInTime, SQL, User, Timedout, Date
Dim objRS, strSQL, houron, minon, Datec
Dim OnlineLocation
OnlineLocation = "<a href=forum.asp?" & Request.QueryString & ">" & Request.QueryString("Forum_Title") & "</a>"
if Request.cookies("User")("Name") = "" then
User = Request.ServerVariables("REMOTE_ADDR") & "Guest"
else
User = Request.cookies("User")("Name")
end if

Date = DateToStr(strForumTimeAdjust)
CheckInTime = DateDiff( "s", CDate("01/01/1970"), Now)

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

strSql = "SELECT " & strTablePrefix & "ONLINE.UserID "
strSql = strSql & " FROM " & strTablePrefix & "ONLINE "
strSql = strSql & " WHERE " & strTablePrefix & "ONLINE.UserID = '" & user & "'"

set rsWho = my_Conn.Execute (strSql)


Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = strConnString
objConn.Open
SQL = "UPDATE FORUM_ONLINE SET M_BROWSE = '" & OnlineLocation & "' , DateCreated = '" & Date & "' WHERE UserID = '" & User & "'"
objConn.Execute SQL



TimedOut = CheckInTime - 3600 'time out the user

SQL = "DELETE FROM FORUM_ONLINE WHERE CheckedIn < '" & TimedOut & "'"
objConn.Execute SQL
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

and which is the variable i need to edit to tell the code the name of the page ?!
i was guessing "forum_title" ... but not how id give the value

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 22 November 2000 :  03:55:38  Show Profile
OnlineLocation is what would need to be changed.
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.1 seconds. Powered By: Snitz Forums 2000 Version 3.4.07