Print Page | Close Window

online/offline status

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=7300
Printed Date: 08 April 2026 at 7:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: online/offline status
Posted By: randomind
Subject: online/offline status
Date Posted: 15 November 2003 at 5:45pm

Can u add the online/offline status in the post field in the next version???

The patches for this don't work with version 7.51a




Replies:
Posted By: dj air
Date Posted: 16 November 2003 at 8:01am

heres my code

   response.write ("<br/>Status : ")

Dim rsUserOnline

Set rsUserOnline = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblActiveUser.* FROM tblActiveUser WHERE tblActiveUser.Author_ID=" & lngUserID

rsUserOnline.Open strSQL, strCon
 

If rsUserOnline.EOF Then
 Response.Write "Offline"

ElseIf CBool(rsUserOnline("Hide")) = True  Then Response.Write "Offline"
Else
 Response.Write "Online"
End If

i have added it on line 727 of forum posts

just cut and paste ... you can see a working demo on my site



Posted By: wfusco
Date Posted: 07 December 2003 at 6:39am

Hey Dj air,

I added your MOD but it shows me as off line? Did I do something wrong?

Wayne



Posted By: Badaboem
Date Posted: 07 December 2003 at 6:58am
It works fine on my site Wayne.


Posted By: wfusco
Date Posted: 07 December 2003 at 7:08am
I wonder why its not working for me? I copied it just as it is here.
I know that is a strech but got any ideas?

Wayne


Posted By: dj air
Date Posted: 07 December 2003 at 7:35am

have you got a demo so i can see ?

right i copyed this off of my version

 response.write ("<br/>Status : ")

Dim rsUserOnline

Set rsUserOnline = Server.CreateObject("ADODB.Recordset")

'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblActiveUser.Hide FROM tblActiveUser WHERE tblActiveUser.Author_ID=" & lngUserID

rsUserOnline.Open strSQL, strCon
 

If rsUserOnline.EOF Then
 Response.Write "Offline"

ElseIf CBool(rsUserOnline("Hide")) = True  Then Response.Write "Offline"
Else
 Response.Write "Online"
End If

i have just gone to my site and checked to see if its working and it is

so copy the above and see if it works it shouls



Posted By: wfusco
Date Posted: 07 December 2003 at 7:49am

Sure http://forums.dhs-alumni.com - http://forums.dhs-alumni.com

Username: test
Password: test



Posted By: wfusco
Date Posted: 07 December 2003 at 9:27am

 

I see you vistited, any ideas?



Posted By: kleintje
Date Posted: 07 December 2003 at 9:56am
If you use the version 7.6 then tblActiveuser isn't in use anymore,so this little mod don't work.It uses Applicationvariables now to keep track of logged in users


Posted By: wfusco
Date Posted: 07 December 2003 at 10:04am
How are they doing it here then?


Posted By: kleintje
Date Posted: 07 December 2003 at 11:49am

Replace the code with these:

   Dim intActiveUser
   intActiveUser = 0
          Response.Write ("<br />" & "User is: ")
   
   For intArrayPass = 1 To UBound(saryActiveUsers, 2)
   
   If saryActiveUsers(2, intArrayPass) = strUsername Then
   
   intActiveUser = intArrayPass
  
   End If

   Next
   
   If intActiveUser > 0 then
    Response.Write " Online" 
   Else
    Response.Write " Offline" 
   End If


And it should work


Posted By: MadDog
Date Posted: 07 December 2003 at 12:44pm

There is a mod already done in the mods section.

Do a search!



-------------
http://www.iportalx.net" rel="nofollow">


Posted By: kleintje
Date Posted: 07 December 2003 at 12:56pm

i've looked into the mod section and indeed there's one, but not working for version 7.6 to my knowledge, perhaps i overlooked it.

So i posted my code to get it worked on version 7.6



Posted By: MadDog
Date Posted: 07 December 2003 at 1:06pm
There is one for v7.6 because im the one that created it.

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: FreeMen
Date Posted: 02 May 2004 at 2:55pm

Mad dog is right, BUT...

The mod by Mad Dog show the Guest account as online, when guest are visiting your site and the other by kleintje doesn't...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net