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)
 ActiveUsers Mod - Repackaged
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

@tomic
Senior Member

USA
1790 Posts

Posted - 31 August 2001 :  13:56:23  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Excellent job GauravBhabu. I noticed an immediate performance boost upon installing this. I also liked the way it cleaned up inc_top.asp

It helped me noticed a couple more unclosed recordsets in the inc_top code.

@tomic



Go to Top of Page

SalmanKhana
Average Member

USA
961 Posts

Posted - 01 September 2001 :  10:37:18  Show Profile
GB , your free Tshirt Affiliate program from cj is cancelled. That was a fake one that did not pay nothing as they had 1800 number on their site instead of getting a lead they made visitors call them.. so no commission.



Go to Top of Page

SalmanKhana
Average Member

USA
961 Posts

Posted - 01 September 2001 :  11:06:48  Show Profile
doesn't work good.. shows only 1 user no matter how many r logged on.

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 September 2001 :  11:15:39  Show Profile
I have it on my site and have no problems. May be something wrong adding files. Recheck your implementation. I would like to see, If you can put up a Link?


Share A Square at forumSquare

GauravBhabu
There is only one miracle...That is LIFE!
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Raichelle
Junior Member

370 Posts

Posted - 01 September 2001 :  15:39:26  Show Profile
nice mod GauravBhabu
i have a question.. on your forum how did you changed the age field so that users can just add there birthdate instead of there age?
i asked about that before long time ago but no answer and i thought they would have changed that on the new version i guess they didn't

think u can give out the code for that and tell me which files i need to edit

Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 01 September 2001 :  18:37:52  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I was wondering if anyone knew how to merge this with Active Chatters? I have been able to add the code for inc_top.asp into inc_activeusers. But it would probably work a lot better if the queries and recordets were somehow combined.

If no one sees an easy way to do this I will tackle it when I can.

@tomic

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 September 2001 :  18:55:38  Show Profile
I have not seen code for active chatters. But if combined it may be a problem if someone does not want to install both the Mods

Share A Square at forumSquare

GauravBhabu
There is only one miracle...That is LIFE!
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 01 September 2001 :  19:22:43  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
This is all that I have added to inc_activeusers.asp for the Active Chatter MOD:

First...

ElseIf lcase(Right(strOnlinePathInfo, 8)) = "chat.asp" Then
strOnlineLocation = "<a href=""/chat/chat.asp"">Chat Room</a>"

then at the bottom above where you close the recordsets.


' Get Chatter count for display on Default.asp

if strDBType = "access" then
strSqL = "SELECT count(UserID) AS [Chatters] "
else
strSqL = "SELECT count(UserID) AS Chatters "
end if
strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
strSql = strSql & " WHERE " & strMemberTablePrefix & "ONLINE.M_BROWSE = '<a href=""/chat/chat.asp"">Chat Room</a>' "

Set rsChatters = my_Conn.Execute(strSql)
Chatters = rsChatters("Chatters")
strOnlineChattersCount = rsChatters("Chatters")

rsChatters.Close
set rsChatters = nothing


As you can see, it is basically the active users code. In fact, it is that same code modified. While not everyone would want to use this, for those that do, joining them together better would further optimize the speed of their forum.

The rest of the code for Active Chatters is completely separate. I just thought it would be cool to have to versions of Active Users. One with Active Chatters integrated and one without.

@tomic

Go to Top of Page

fpgal
New Member

93 Posts

Posted - 01 September 2001 :  20:14:23  Show Profile

I hope I'm asking this in the right spot.

I'm trying to include the Active Users display in my inc_top.asp file so it will show up on every page, right under the links. So I simply created a copy of the inc_activeusers3.asp file with a few small formatting changes and included it in my inc_top.asp file, like this:

<!--#include file="inc_activeusers0.asp"-->

It's working everywhere except on the topic pages. Sometimes it shows the users' names and sometimes not. Is there some other code I should be including? I just assumed that when the topic.asp file opened that it would call the inc_top.asp file, which would in turn call the inc_activeusers0.asp file. Am I wrong in thinking that?

And GauravBhabu, thanks for helping me figure out which files to update to get rid of the multiple users problem. It's working fine.


Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 September 2001 :  21:00:01  Show Profile
Hi @tomic and others,

Note:I have made further Modifications in Active Users Mod, I am testing this on my live site. I need To see if it is working Okay. Need Members to Login and Logout to check if it is working as expected. The Modification also integrates Active Chatters with Active Users. Sep 1, 2001

If anyone wants to try on his/her own site see below:
Step 1:

inc_activeusers.asp

Comment out the following statements in Green




'set rsOnline = Server.CreateObject("ADODB.Recordset")

'if strDBType = "access" then
' strSqL = "SELECT count(UserID) AS [onlinecount] "
'else
' strSqL = "SELECT count(UserID) AS onlinecount "
'end if
'
'strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
'Set rsOnline = my_Conn.Execute(strSql)
'onlinecount = rsOnline("onlinecount")
'strOnlineUsersCount = rsOnline("onlinecount")

' Get Guest count for display on Default.asp
'set rsGuests = Server.CreateObject("ADODB.Recordset")
'if strDBType = "access" then
' strSqL = "SELECT count(UserID) AS [Guests] "
'else
' strSqL = "SELECT count(UserID) AS Guests "
'end if
'strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
'strSql = strSql & " WHERE Right(UserID, 5) = 'Guest' "
'
'Set rsGuests = my_Conn.Execute(strSql)
'Guests = rsGuests("Guests")
'strOnlineGuestsCount = rsGuests("Guests")
'
'
' Get Member count for display on Default.asp
'set rsMembers = Server.CreateObject("ADODB.Recordset")
'if strDBType = "access" then
' strSqL = "SELECT count(UserID) AS [Members] "
'else
' strSqL = "SELECT count(UserID) AS Members "
'end if
'strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
'strSql = strSql & " WHERE Right(UserID, 5) <> 'Guest' "

'Set rsMembers = my_Conn.Execute(strSql)
'Members = rsMembers("Members")
'strOnlineMembersCount = rsMembers("Members")




Step 2:

Find the following statements in inc_activeusers.asp

' LETS DELETE ALL INACTIVE USERS
SQL = "DELETE FROM " & strTablePrefix & "ONLINE WHERE LastChecked < '" & strOnlineTimedOut & "'"
Sql = Sql & " OR (" & strTablePrefix & "ONLINE.UserIP='" & strOnlineUserIP & "' AND " & strTablePrefix & "ONLINE.UserID <> '" & strOnlineUser & "')"
my_Conn.Execute SQL



Step 3:
Just below the above statements add the following statements.



' Get Active Users count for display on Default.asp
sCountType = "U"
onlinecount = GetActiveOnlineCounts(sCountType)
strOnlineUsersCount = onlinecount
'Get Guest count for display on Default.asp
sCountType = "G"
Guests = GetActiveOnlineCounts(sCountType)
strOnlineGuestsCount = Guests
' Get Member count for display on Default.asp
sCountType = "M"
Members = GetActiveOnlineCounts(sCountType)
strOnlineMembersCount = Members
' Get Chatter count for display on Default.asp
sCountType = "C"
Chatters = GetActiveOnlineCounts(sCountType)
strOnlineChattersCount = Chatters





function GetActiveOnlineCounts(sCountType)
strSql = ""
if strDBType = "access" then
strSqL = "SELECT count(UserID) AS [ActiveCount] "
else
strSqL = "SELECT count(UserID) AS ActiveCount "
end if
strSql = strSql & "FROM " & strTablePrefix & "ONLINE "
Select case sCountType
Case "U"
strSql = strSql
Case "G"
strSql = strSql & " WHERE Right(UserID, 5) = 'Guest' "
Case "M"
strSql = strSql & " WHERE Right(UserID, 5) <> 'Guest' "
Case "C"
strSql = strSql & " WHERE lcase(Right(M_BROWSE, 8)) = 'chat.asp' "
Case else
'Do nothing
end select
Set rsActiveOnlineCounts = my_Conn.Execute(strSql)
GetActiveOnlineCounts = rsActiveOnlineCounts("ActiveCount")

end function




Step 4:
Comment the following statements at the end of inc_activeusers.asp


'rsOnline.close
'set rsOnline = nothing
'rsGuests.close
'set rsGuests = nothing
'rsMembers.close
'set rsMembers = nothing




It should work without any problem, let me know.


Share A Square at forumSquare

GauravBhabu
There is only one miracle...That is LIFE!
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.


Edited by - GauravBhabu on 01 September 2001 22:59:04
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 September 2001 :  21:17:39  Show Profile
quote:


I hope I'm asking this in the right spot.

I'm trying to include the Active Users display in my inc_top.asp file so it will show up on every page, right under the links...



Do This:

Find the following statement in inc_top.asp Around Line 162

<% call sForumNavigation() %>

Just below the above line add the following statement

<br>ActiveUsers: <%=onlinecount%>




Share A Square at forumSquare

GauravBhabu
There is only one miracle...That is LIFE!
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

fpgal
New Member

93 Posts

Posted - 01 September 2001 :  22:11:42  Show Profile
quote:


Do This:

Find the following statement in inc_top.asp Around Line 162

<% call sForumNavigation() %>

Just below the above line add the following statement

<br>ActiveUsers: <%=onlinecount%>




Share A Square at forumSquare

GauravBhabu
There is only one miracle...That is LIFE!
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.



I'll try that, GauravBhabau, and thanks for the help. One question, though. Won't that only show the total number of users online? I wanted to list their names, that's why I was trying to call the copy I made of the inc_activeusers3.asp page.

Thanks!

Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 01 September 2001 :  22:15:59  Show Profile
Yest that is only for Number of users.

Share A Square at forumSquare

GauravBhabu
There is only one miracle...That is LIFE!
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous 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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07