Author |
Topic |
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 21 December 2000 : 05:04:19
|
Capt Dunzell,
Try this:
In the code that you added to <b>inc_top.asp</b>
Look for this:
<font size=1><pre id=code><font face=courier size=2 id=code>' SET WHEN TO TIMEOUT THE USER ' DO THIS IN SECONDS strOnlineDate = DateToStr(Date) strOnlineCheckInTime = DateToStr(Now())</font id=code></pre id=code></font id=size1>
Change it to this:
<font size=1><pre id=code><font face=courier size=2 id=code>' SET WHEN TO TIMEOUT THE USER ' DO THIS IN SECONDS strOnlineDate = DateToStr(strForumTimeAdjust) strOnlineCheckInTime = DateToStr(strForumTimeAdjust)</font id=code></pre id=code></font id=size1>
Now just download this file:
http://www11.ewebcity.com/dssdbs/files/active_users_fixed.zip
I also changed it so that it will show the dates in the format that you have chosen for the rest of the dates on your forum. |
|
|
Capt_Dunzell
Junior Member
USA
160 Posts |
Posted - 21 December 2000 : 11:11:44
|
Outstanding!
Works perfectly!
Thank you Richard!! <img src=icon_smile_big.gif border=0 align=middle>
http://www.dunzellsden.com/forum/ |
|
|
Hopper
Junior Member
192 Posts |
Posted - 21 December 2000 : 11:15:02
|
Still not seeing the user IP. Did this ever get fixed.
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 21 December 2000 : 11:24:10
|
Hopper, try downloading the file again.
then run the setup again as it adds a field to the database to hold the IP #. |
|
|
Hopper
Junior Member
192 Posts |
Posted - 21 December 2000 : 11:42:44
|
Ok, a few things on this.. first, when someone logs off it should remove them from the online list.. right now it leaves them in the online list until they time out (default 11 minutes later). Is there a better way to tell if they are still online? How much processor time would it take to fully rebuild the list every time the active users page is refreshed/reloaded.
Good news is, the IPS are showing up *laugh*
Edited by - Hopper on 21 December 2000 12:22:19 |
|
|
bugzy
Junior Member
USA
147 Posts |
Posted - 21 December 2000 : 12:54:04
|
would be nice if it was easy to convert IP to domain names
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 21 December 2000 : 13:25:37
|
bugzy,
Here is how you can do that:
open the <b>active_users_setup.asp</b>
find this line:
<font size=1><pre id=code><font face=courier size=2 id=code> strSql = strSql & "UserIP varchar (<font color=red>40</font id=red>) , "</font id=code></pre id=code></font id=size1>
change the <font color=red>40</font id=red> to a higher #, probably 100 will do.
Then re-rerun the active_users_setup.asp so that the database will be updated.
Now, in the code that you added to <b>inc_top.asp</b>
Find this line:
<font size=1><pre id=code><font face=courier size=2 id=code>strOnlineUserIP = Request.ServerVariables("<font color=red>REMOTE_ADDR</font id=red>")</font id=code></pre id=code></font id=size1>
change <font color=red>REMOTE_ADDR</font id=red> to <b>REMOTE_HOST</b>
What this will do is to show the domain name if it exists. If not it will just show the IP #.
Like my IP address isn't registered to a domain name so either way mine always shows up as the IP #. |
|
|
frankie
Junior Member
Vatican City
304 Posts |
Posted - 21 December 2000 : 18:54:57
|
Richard,
How is it done to make the active users
names shown in the default page link to their
profile? if you have time though!! <img src=icon_smile.gif border=0 align=middle>
ô¿~ |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 22 December 2000 : 03:49:21
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Ok, a few things on this.. first, when someone logs off it should remove them from the online list.. right now it leaves them in the online list until they time out (default 11 minutes later). Is there a better way to tell if they are still online? How much processor time would it take to fully rebuild the list every time the active users page is refreshed/reloaded.
Good news is, the IPS are showing up *laugh*
Edited by - Hopper on 21 December 2000 12:22:19 <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
This will only work if they physically logout by hitting the logout graphic.
In inc_top.asp, look for <pre id=code><font face=courier size=2 id=code><b> case "logout" Call ClearCookies()</b> </font id=code></pre id=code>
add the following imediately after the <font color=blue>call ClearCookies</font id=blue>, and above the <font color=blue>end select</font id=blue> <pre id=code><font face=courier size=2 id=code><b> 'delete online user if exists SQL = "DELETE FROM " & strTablePrefix & "ONLINE WHERE " & strTablePrefix & "ONLINE.UserID = '" & strDBNTUserName & "'" my_conn.Execute SQL</b> </font id=code></pre id=code>
<font color=blue>'Resistance is futile'</font id=blue> |
|
|
bugzy
Junior Member
USA
147 Posts |
Posted - 22 December 2000 : 18:24:32
|
Richard, the ip to domain isnt working for me did as you told me hmmm
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 23 December 2000 : 17:40:48
|
Still getting this error:<pre id=code><font face=courier size=2 id=code>Microsoft VBScript compilation error '800a03ea' Syntax error /beta/31_sr2/inc_top.asp, line 55 Function OnlineSQLencode(byVal strPass) ^</font id=code></pre id=code>Matthew had reported getting this error also but didn't see a fix posted for it. Installing it on v3.1 sr2.
<center><font color=green>*----*----*----*----*----*----*----*----* <font size=2>"To Get To Heaven, It's Who You Know That Counts."</font id=size2> *----*----*----*----*----*----*----*----*</font id=green></center> |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 23 December 2000 : 20:04:35
|
Hi.. I need some help setting up Active Users and Who's Online. Also want to display number of Registered Users. I'm running the Snitz forum with the update in it. Also it's running off a Access 2000 database. I've read everything in here and nothing seems to work :( I'm not good with ASP I'm a just starting to learn it... So be easy on me. :)
Please let me know if you can help Email me at rick@rick7165.com
Thanks Rick
|
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 24 December 2000 : 10:54:48
|
Davio,
It seems that when something in the script is using the SQLOnlineencode its either passing no information to it, or is passing to much. the only way i can see for you to fix it is in the Function put the following line...
Function OnlineSQLencode(byVal strPass) Response.Write("test-" & strPass & "<br>")
That way it will output what is being passed by the OnlineSQLencode
Brad
Brad |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 24 December 2000 : 16:46:22
|
redbrad, it doesn't pass that first line "Function OnlineSQLencode(byVal strPass)". It throws the error and doesn't continue, so it doesn't even reach the "Response.Write" command.
<center><font color=green>*----*----*----*----*----*----*----*----* <font size=2>"To Get To Heaven, It's Who You Know That Counts."</font id=size2> *----*----*----*----*----*----*----*----*</font id=green></center> |
|
|
Topic |
|