Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - display whos online on default.asp
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

display whos online on default.asp

 Post Reply Post Reply
Author
8ball View Drop Down
Newbie
Newbie


Joined: 14 March 2003
Location: Canada
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote 8ball Quote  Post ReplyReply Direct Link To This Post Topic: display whos online on default.asp
    Posted: 21 May 2003 at 2:36pm

Ok, Im sure it's already been asked, but I searched and cant find my answer. I would like to display the names of who's online right on my default.asp.

something like:

users online: sexygirlthatwants8ball, sexygirlssisterthatwants8ball etc...

heehe anyone?

thx

Back to Top
Allan_Young View Drop Down
Newbie
Newbie


Joined: 18 May 2003
Location: United Kingdom
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Allan_Young Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2003 at 5:14pm

I know there was a MOD for this, but I can't find it!

Copied the code from my navigation_bottons page as follows - view it working at http://www.nwcld.org/index2.htm (please let me know what you think)

Active
                  members: </span>
                  <%
Dim rsActiveMemberName
Dim strMemberName
Dim rsActiveUsers
Dim strRedTextColour
Dim strProfileWindowWidth
Dim strProfileWindowHeight

'Intialise the ADO recordset object
Set rsActiveUsers = Server.CreateObject("ADODB.Recordset")

'Initialise the SQL variable with an SQL statement to get the configuration details from the database
strSQL = "SELECT tblActiveUser.* FROM tblActiveUser WHERE NOT tblActiveUser.Author_ID = 2;"
 
'Query the database
rsActiveUsers.Open strSQL, strCon

If NOT rsActiveUsers.EOF Then
 Do Until rsActiveUsers.EOF
  Set rsActiveMemberName = Server.CreateObject("ADODB.Recordset")

  strSQL = "SELECT tblAuthor.* FROM tblAuthor WHERE tblAuthor.Author_ID = " & rsActiveUsers("Author_ID") & ";"
 
  rsActiveMemberName.Open strSQL, strCon

  If NOT rsActiveMemberName.EOF Then
   strMemberName = ("<font color=""#FF0000"">></font><a href=""javascript:openWin('pop_up_profile.asp?PF=" & rsActiveUsers("Author_ID") & "','profile','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425')"" class=""smltext"">") & rsActiveMemberName("Username") & ("</a>")
  End If
%>
                  <% = strMemberName %>
                  &nbsp;
                  <% 
 rsActiveUsers.Movenext
 Loop

'Reset server objects
rsActiveMemberName.Close
Set rsActiveMemberName = Nothing

End If
%>

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2003 at 8:06pm
you also want to add AND tblActiveUser.Hide = 0; on your sql query, that way if the users doesn't add himself to the active users list it won't show.
FeRnAN
Back to Top
Allan_Young View Drop Down
Newbie
Newbie


Joined: 18 May 2003
Location: United Kingdom
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Allan_Young Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2003 at 2:21am

Which sql query should I make the change on please?

The code above was a MOD which I included and changed a bit, only changed the bits I knew about!

Thanks

Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2003 at 4:44am

doesnt MadDog have this on his site?

or is that where ya got it from?

Back to Top
Allan_Young View Drop Down
Newbie
Newbie


Joined: 18 May 2003
Location: United Kingdom
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote Allan_Young Quote  Post ReplyReply Direct Link To This Post Posted: 22 May 2003 at 5:33am
I did originally say it was from a published MOD, couldn't actually remember where it came from, so appologies if I have upset anyone.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.