Author |
Topic |
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 15 March 2003 : 17:52:24
|
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 |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 15 March 2003 : 19:37:46
|
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 |
|
|
rsoxhater
Junior Member
120 Posts |
Posted - 18 March 2003 : 18:06:03
|
Worked great with the SQL server - thanks! |
|
|
forumnewbee
Starting Member
Netherlands
42 Posts |
Posted - 21 March 2003 : 16:32:18
|
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 |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 21 March 2003 : 18:20:29
|
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 |
|
|
forumnewbee
Starting Member
Netherlands
42 Posts |
Posted - 22 March 2003 : 14:47:40
|
Yes with help from assy I have the online/offline status on the forum now !!!!
THX |
Body & Fitness Forum |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 29 May 2003 : 12:03:00
|
Thanks for the easiest MOD that I have had to install to date! Fantastic!
|
Nick |
|
|
Michaelos
Starting Member
Ireland
45 Posts |
Posted - 29 May 2003 : 14:01:28
|
Is there any add-on that tells you what a user is doing, like say, user xxxx:posting new topic etc?
|
Michael |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 29 May 2003 : 14:08:36
|
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 |
|
|
nickw
Junior Member
Ireland
193 Posts |
Posted - 29 May 2003 : 14:16:42
|
Hi,
I think he meant for it to be displayed if you "click" on the online button in the topic itself.
Cheers,
Nick |
Nick |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 29 May 2003 : 17:51:24
|
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 |
|
|
Faizan
Average Member
United Kingdom
592 Posts |
Posted - 29 May 2003 : 23:18:45
|
Nice MOD, I'll be using it soon. Thanks David.
Is there a downloadable ZIP available? |
»Snitz Graphics
|
|
|
lofty
Junior Member
USA
158 Posts |
Posted - 30 May 2003 : 12:12:26
|
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! |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 30 May 2003 : 19:06:19
|
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 |
|
|
Faizan
Average Member
United Kingdom
592 Posts |
Posted - 30 May 2003 : 22:28:32
|
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
|
|
|
Topic |
|