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)
 Active Users add-on (User Status)
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 15 March 2003 :  17:52:24  Show Profile
David,

Thanks for the code. It almost worked, but it came up with some Data type mismatch in criteria expression and worked around it as shown below at the line with strSql = strSql & "AND " & strTablePrefix & "MEMBERS.M_AUHIDE <> 0 which I put in red.

< Start code >
function AUGetOnlineMembers()
	strSql ="SELECT " & strTablePrefix & "ACTIVE_USERS.MEMBER_ID " 
	strSql = strSql & " FROM " & strTablePrefix & "ACTIVE_USERS "
	if strAUAnon and not(bolOverride) then
	    strSql = strSql & ", " & strTablePrefix & "MEMBERS WHERE "
	    strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "ACTIVE_USERS.MEMBER_ID "
	    strSql = strSql & "AND " & strTablePrefix & "MEMBERS.M_AUHIDE <> '0'"
	end if
	set rsOnline = my_Conn.Execute(strSql)
	If NOT rsOnline.EOF Then AUGetOnlineMembers = rsOnline.GetRows()
	rsOnline.close
	set rsOnline = nothing
end function

function AUMemberStatus(OnlineMembers, CurrentMember)
	if IsArray(OnlineMembers) then
		for intRow = 0 to UBound(OnlineMembers, 2)	
			if OnlineMembers(0,intRow) = CurrentMember then
				AUMemberStatus = "<font color=green><b>online</b></font>"
				exit function
			end if
		next
	end if
	AUMemberStatus = "<font color=red>offline</font>"
end function
< End code >

I also did a small mod to show users online in bold green and offline users in red.

Great job and thanks for the help.

Cheers,

David Greening
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 15 March 2003 :  19:37:46  Show Profile
no probs, it needs some work to get it working on all databases, i've only tested on SQL Server unfortunately and don't really have time to test on others. The font colour is a good idea, could also use graphics as another member previously mentioned.
The access code 'should' work on SQL Server too although a join would be more efficient but the difference wouldn't be noticable. If antone can try this with MySql i'll update the code to work for all db's

The UK MkIVs Forum
Go to Top of Page

rsoxhater
Junior Member

120 Posts

Posted - 18 March 2003 :  18:06:03  Show Profile
Worked great with the SQL server - thanks!
Go to Top of Page

forumnewbee
Starting Member

Netherlands
42 Posts

Posted - 21 March 2003 :  16:32:18  Show Profile  Visit forumnewbee's Homepage
Oops real asp newbee here I guess there is something wrong in topic.asp. The status is there but it is not in the avatar array but on top of the page ?

Somebody knows what to do ?

Thx in advance Perry (http://forum.body-fitness.nl)

Body & Fitness Forum
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 21 March 2003 :  18:20:29  Show Profile
Forumnewbee,

I found the same happened with me when I first installed it. Turns out to be operator error (was my error).
quote:
Originally posted by forumnewbee

Oops real asp newbee here I guess there is something wrong in topic.asp. The status is there but it is not in the avatar array but on top of the page ?

Somebody knows what to do ?

Thx in advance Perry (http://forum.body-fitness.nl)

I did not replace all the lines and it put a </td where it was not meant to be. Best to copy the lines as DavidRhodes listed and replace all the lines and not try to add only the extra line as the code is different.

Cheers,

David Greening
Go to Top of Page

forumnewbee
Starting Member

Netherlands
42 Posts

Posted - 22 March 2003 :  14:47:40  Show Profile  Visit forumnewbee's Homepage
Yes with help from assy I have the online/offline status on the forum now !!!!

THX

Body & Fitness Forum
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 29 May 2003 :  12:03:00  Show Profile
Thanks for the easiest MOD that I have had to install to date! Fantastic!

Nick
Go to Top of Page

Michaelos
Starting Member

Ireland
45 Posts

Posted - 29 May 2003 :  14:01:28  Show Profile
Is there any add-on that tells you what a user is doing, like say, user xxxx:posting new topic etc?


Michael
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 29 May 2003 :  14:08:36  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message
just go to the activeusers page, if you set it up in the config to tell you where the member is, it should tell if the person is viewing topic, forum, posting a topic or replying to one.
you need the active users mod and I assume you have it by posting in this topic.

coaster crazy
Go to Top of Page

nickw
Junior Member

Ireland
193 Posts

Posted - 29 May 2003 :  14:16:42  Show Profile
Hi,

I think he meant for it to be displayed if you "click" on the online button in the topic itself.

Cheers,

Nick

Nick
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 29 May 2003 :  17:51:24  Show Profile
I think it would be possible to do, wouldn't like to do it myself though as it would require an extra database call for each post, it is possible though, and shouldn't be too difficult

The UK MkIVs Forum
Go to Top of Page

Faizan
Average Member

United Kingdom
592 Posts

Posted - 29 May 2003 :  23:18:45  Show Profile  Visit Faizan's Homepage  Send Faizan an AOL message  Send Faizan an ICQ Message  Send Faizan a Yahoo! Message
Nice MOD, I'll be using it soon.
Thanks David.

Is there a downloadable ZIP available?


»Snitz Graphics
Go to Top of Page

lofty
Junior Member

USA
158 Posts

Posted - 30 May 2003 :  12:12:26  Show Profile  Visit lofty's Homepage
For consistency with other snitz code, you should probably change all references to:
& strTablePrefix & MEMBERS...

To:
& strMemberTablePrefix & MEMBERS...

Other than that, it looks really nice!
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 30 May 2003 :  19:06:19  Show Profile
There's no download Faizan as there is only a few bits of code to add.
Cheers lofty, didn't think of that

The UK MkIVs Forum
Go to Top of Page

Faizan
Average Member

United Kingdom
592 Posts

Posted - 30 May 2003 :  22:28:32  Show Profile  Visit Faizan's Homepage  Send Faizan an AOL message  Send Faizan an ICQ Message  Send Faizan a Yahoo! Message
OK, thanks for reapling David, actauuly I was too lazy to look back again n again But I'll install your MOD, thanks for that, its great!


»Snitz Graphics
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page | 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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07