Author |
Topic |
Wizz
New Member
United Kingdom
70 Posts |
Posted - 21 April 2003 : 13:13:53
|
Ive managed to get the code to work now, it seems that their was no else clause in the members recordset loop.
Anyway. can someone help me adjust this so that only the usernames in "chat room" are displayed.
take a look at this: http://www.mixologist.co.uk/au.txt
-WizzKidd |
www.promotioncity.co.uk - A cost effective solution for Promoters, DJ's and MC's. Clubbing Pics, Chat, Forums, Raving/Clubbing Guide, A-Z Clubs & Winebars listing etc + much more!
|
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 21 April 2003 : 14:54:33
|
To get only those members who are in the chat area, use the following sql-query (I haven't tested it myself, but it should work):
'## Ls3k - Get Online Members information, and print whatever we get
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, AU.AU_LOGINTIME AU.AU_LASTPAGE, AU.AU_QUERYSTRING " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID AND AU.AU_LASTPAGE = 'newchat.asp'"
set rsAM = my_conn.execute (strSql)
The above query will only return those members who are in the chat (and no one else).
I don't now how you are going present the results, but Im sure that you can get this working. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
Wizz
New Member
United Kingdom
70 Posts |
Posted - 21 April 2003 : 18:34:25
|
Thanks a lot.
Where abouts is the code that does the INSERT? surley there is some code somewhere that INSERTS the page name into the database? because Im guessing i need to include it in the header of my newchat.asp no?
-WizzKidd |
www.promotioncity.co.uk - A cost effective solution for Promoters, DJ's and MC's. Clubbing Pics, Chat, Forums, Raving/Clubbing Guide, A-Z Clubs & Winebars listing etc + much more!
|
|
|
Wizz
New Member
United Kingdom
70 Posts |
Posted - 21 April 2003 : 20:19:28
|
nevermind, i found out that the inserts were added into the inc_func_common.asp for the mod to be installed (i just forgot i put it there) so all my newchat.asp needs are the appropiate includes and code: <!-- #INCLUDE VIRTUAL="forum/config.asp" --> <!-- #INCLUDE VIRTUAL="forum/inc_func_common.asp" --> <!-- #INCLUDE VIRTUAL="forum/inc_header_strip.asp" --> <% AUHandleLoging() ActiveUserTracker() %>
that should solve it. i'll let you know.
-WizzKidd |
www.promotioncity.co.uk - A cost effective solution for Promoters, DJ's and MC's. Clubbing Pics, Chat, Forums, Raving/Clubbing Guide, A-Z Clubs & Winebars listing etc + much more!
|
|
|
Wizz
New Member
United Kingdom
70 Posts |
Posted - 21 April 2003 : 21:12:03
|
Ok i think this might be the last post or so...
It works 99.99% now with this code here
But if a user suddenly closes the window (ie doesn't logout) then the users details are still in the database, therefore they're still displayed. How can i stop this? do i set the timeout on the active users config to a lower value like 1 minute?
-WizzKidd |
www.promotioncity.co.uk - A cost effective solution for Promoters, DJ's and MC's. Clubbing Pics, Chat, Forums, Raving/Clubbing Guide, A-Z Clubs & Winebars listing etc + much more!
|
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 22 April 2003 : 16:42:38
|
They will time out automatically after the timeout value and be removed, as you call deleteinactiveusers on the root default.asp and your normal forum-pages.
Remember that the timeout-value will govern all of your members, even those who browse the forum. If you set the timeout value very low (like one minute), all members will have very short online periods, unless they spend time in the chat. It can easily take up to ten minutes to read a topic with many posts.
If you are unsure on what to set, test with one minute, five minutes and ten minutes, and use whatever suits your site best. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
Edited by - masterao on 22 April 2003 16:48:07 |
|
|
Wizz
New Member
United Kingdom
70 Posts |
Posted - 23 April 2003 : 17:40:33
|
ah ok, ive set my timeout to 10 minutes and recreated my newchat.asp page to use frames (0,*) the "*" frame is the original chat page (without the code that runns the au handling functions), and the "0" frame is the frame that meta refreshes every 3 minutes and uses the au handling functions, this means that so long as your on the chat page, the au handling functions are getting called every 3 minutes, thus keeping you "loged into chat" no matter how long your idle for on the chat room! ;)
-WizzKidd |
www.promotioncity.co.uk - A cost effective solution for Promoters, DJ's and MC's. Clubbing Pics, Chat, Forums, Raving/Clubbing Guide, A-Z Clubs & Winebars listing etc + much more!
|
|
|
masterao
Senior Member
Sweden
1678 Posts |
|
Topic |
|
|
|