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)
 MOD: Offline/online icon for posts (from Dayve)
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

RDoGG™
Junior Member

USA
329 Posts

Posted - 29 June 2001 :  17:07:02  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
This is my first mod, which I coded after I saw it on Dayve's website.

i don't think anyone coded this yet but Alan (AZNknight) commented about it.

This mod shows whether certain users are online or offline.

You can implement it in users profiles or posts (topic.asp).

Download:

- icon_offline.gif

- icon_online.gif


now, where you want to show whether the user is online or offline, add this code:


<%

dim strUserName
strUserName = rs("M_NAME")

set rsOnline = Server.CreateObject("ADODB.Recordset")
strOnlineSql ="SELECT *"
strOnlineSql = strOnlineSql & " FROM FORUM_ONLINE"
strOnlineSql = strOnlineSql & " WHERE FORUM_ONLINE.UserID = '" & strUserName & "'"

dim rsOnlineMember
set rsOnlineMember = my_Conn.Execute (strOnlineSql)
If rsOnlineMember.EOF or rsOnlineMember.BOF then
%>

<img src="icon_offline.gif" width="42" height="16">

<%
Else
%>

<img src="icon_online.gif" width="42" height="16">
<% end if %>
<% set rsOnlineMember = nothing %>


you can place links to the PM mod if you want to.

any comments are appreciated.



Edited by - RDoGG™ on 29 June 2001 17:18:37

Freeman II
Junior Member

232 Posts

Posted - 29 June 2001 :  17:16:17  Show Profile
you forgot to set rsOnlineMember =nothing

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 29 June 2001 :  17:19:24  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

you forgot to set rsOnlineMember =nothing



fixed.

Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 29 June 2001 :  18:00:01  Show Profile
This is odd, I'm getting a missing end statement but for the life of me, I don't see where. Thought I'd see how this works but it doesn't like this LOL.

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/topic.asp, line 651

dim strUserNamestrUserName = rs("M_NAME")set rsOnline = Server.CreateObject("ADODB.Recordset")strOnlineSql ="SELECT *"strOnlineSql = strOnlineSql & " FROM FORUM_ONLINE"strOnlineSql = strOnlineSql & " WHERE FORUM_ONLINE.UserID = '" & strUserName & "'" dim rsOnlineMemberset rsOnlineMember = my_Conn.Execute (strOnlineSql)If rsOnlineMember.EOF or rsOnlineMember.BOF then
---------------------------^


Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 29 June 2001 :  19:20:33  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

This is odd, I'm getting a missing end statement but for the life of me, I don't see where. Thought I'd see how this works but it doesn't like this LOL.

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/topic.asp, line 651

dim strUserNamestrUserName = rs("M_NAME")set rsOnline = Server.CreateObject("ADODB.Recordset")strOnlineSql ="SELECT *"strOnlineSql = strOnlineSql & " FROM FORUM_ONLINE"strOnlineSql = strOnlineSql & " WHERE FORUM_ONLINE.UserID = '" & strUserName & "'" dim rsOnlineMemberset rsOnlineMember = my_Conn.Execute (strOnlineSql)If rsOnlineMember.EOF or rsOnlineMember.BOF then
---------------------------^





did u "separate" the code?

can u put the statement in [code] and [/code] statements?

i got errors, too, with other mods when i did this.

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 29 June 2001 :  19:33:52  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

quote:

This is odd, I'm getting a missing end statement but for the life of me, I don't see where. Thought I'd see how this works but it doesn't like this LOL.

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/topic.asp, line 651

dim strUserNamestrUserName = rs("M_NAME")set rsOnline = Server.CreateObject("ADODB.Recordset")strOnlineSql ="SELECT *"strOnlineSql = strOnlineSql & " FROM FORUM_ONLINE"strOnlineSql = strOnlineSql & " WHERE FORUM_ONLINE.UserID = '" & strUserName & "'" dim rsOnlineMemberset rsOnlineMember = my_Conn.Execute (strOnlineSql)If rsOnlineMember.EOF or rsOnlineMember.BOF then
---------------------------^





did u "separate" the code?

can u put the statement in [code] and [/code] statements?

i got errors, too, with other mods when i did this.





ok...it looks like the error is in the first line.

without line breaks, the code looks like:

dim strUserNamestrUserName =


it should be:


dim strUserName
strUserName =


of course, when you dim, you can't put an equal sign.

i found this out when i put [code] brackets around the code.

it returned:


dim strUserNamestrUserName = rs("M_NAME")
---------------------------^


Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 29 June 2001 :  19:35:31  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
I recommend you copy my code into an editor like WordPad and then copy that over to Notepad.

If you copy the code directly into Notepad, the spacing gets messed up.

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 29 June 2001 :  21:33:36  Show Profile
I've actually had this on my forum (http://kinser.121host.net/v31sr4/default.asp) for awhile and it was included in the forumcode I've had for download.
Go to Top of Page

Ribkick
Junior Member

USA
296 Posts

Posted - 30 June 2001 :  00:02:32  Show Profile
That must have been the trick, putting it in wordpad rather than notepad. Works with no errors now but only on the first post in every thread. Not showing on any replies in the threads.

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 30 June 2001 :  07:57:43  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

That must have been the trick, putting it in wordpad rather than notepad. Works with no errors now but only on the first post in every thread. Not showing on any replies in the threads.





you'd have to change the variable to have it work with all the users.

on each entry, change this variable:

strUserName


to the user's name


try also deleting:

set rsOnlineMember = nothing


and putting that at the end (after the topic loop)

Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 30 June 2001 :  18:48:44  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

I've actually had this on my forum (http://kinser.121host.net/v31sr4/default.asp) for awhile and it was included in the forumcode I've had for download.



oh...ok...

i didn't see it in the download of 3.1 SR4 though.

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 30 June 2001 :  23:41:44  Show Profile  Visit dayve's Homepage
I actually saw this at another forum and used my coding based on the active users mod to get mine to work with topic.asp. I don't really think I can take credit for anything...

Dayve
Go to Top of Page

Memorom
Starting Member

24 Posts

Posted - 10 July 2001 :  13:21:14  Show Profile
quote:

quote:

I've actually had this on my forum (http://kinser.121host.net/v31sr4/default.asp) for awhile and it was included in the forumcode I've had for download.



oh...ok...

i didn't see it in the download of 3.1 SR4 though.





Where was this included for download?



Edited by - Memorom on 10 July 2001 13:21:58

Edited by - Memorom on 10 July 2001 13:44:58
Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 10 July 2001 :  17:53:51  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
quote:

quote:

quote:

I've actually had this on my forum (http://kinser.121host.net/v31sr4/default.asp) for awhile and it was included in the forumcode I've had for download.



oh...ok...

i didn't see it in the download of 3.1 SR4 though.





Where was this included for download?



Edited by - Memorom on 10 July 2001 13:21:58

Edited by - Memorom on 10 July 2001 13:44:58



look for TOPIC2.ASP on Richard Kinser's test site - http://kinser.121host.net/v31sr4/default.asp

RDoGG™
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 12 July 2001 :  10:02:51  Show Profile
Shows me offline all the time.

I am logged in but the sign just shows Admin is offline.

gauravbhabu

There is only one miracle...That is LIFE!
Go to Top of Page

big9erfan
Average Member

540 Posts

Posted - 12 July 2001 :  11:05:47  Show Profile
I don't see the on-line / off-line mod on your forums.

Do you have a test site they are immplemented on?



http://www.ugfl.net/forums
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07