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)
 See the number of Users active in the past 30 days
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kyodai
New Member

Azerbaijan
74 Posts

Posted - 06 February 2011 :  00:14:41  Show Profile  Reply with Quote
If you're curious about how many users have been active in the past 30 days then this is for you...

Might as well put it in your default.asp if you want everyone to see it, but i made it so only mods and admins can check the page...

Not too useful, only interesting for statistics fans. It simply counts the rows where "M_LASTLOGINDATE" is larger than Current date minus 30 days.


Enjoy!





http://www.tankraider.com/userup/1296989102.zip

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 February 2011 :  06:36:51  Show Profile  Reply with Quote
I incorporated your idea (and added a month-to-date statistic) into active users program, seems a good place for it.


In "LangMODS_Ls3kAU4_1033.asp",

Look for the following lines (appx 56-58):

strLangMOD_Ls3kAU_00090 = "at"
strLangMOD_Ls3kAU_00100 = "Members Online"
strLangMOD_Ls3kAU_00110 = "None"

Below them, insert these:

strLangMOD_Ls3kAU_00120 = "last 30 days"
strLangMOD_Ls3kAU_00130 = "so far this month"

In "config.asp",

Look for the following lines (appx 164-178):

intAURecord = cint(Application(strCookieURL & "INTAURECORD"))
strAURecordDate = Application(strCookieURL & "STRAURECORDDATE")
strAUAnon = Application(strCookieURL & "STRAUANON")
strAUAnonOverride = Application(strCookieURL & "STRAUANONOVERRIDE")
strAUPAllow = Application(strCookieURL & "STRAUPALLOW")
strAUPCollapse = Application(strCookieURL & "STRAUPCOLLAPSE")
strAUAllow = Application(strCookieURL & "STRAUALLOW")
strAURefresh = Application(strCookieURL & "STRAUREFRESH")
strAUIP = Application(strCookieURL & "STRAUIP")
strAUUA = Application(strCookieURL & "STRAUUA")
strAULocal = Application(strCookieURL & "STRAULOCAL")
strAUTimeout = Application(strCookieURL & "STRAUTIMEOUT")
strAUPIsland = Application(strCookieURL & "STRAUPISLAND")
strAUAdminColor = Application(strCookieURL & "STRAUADMINCOLOR")
strAUModColor = Application(strCookieURL & "STRAUMODCOLOR"

After them, insert the following:

intActMon = Application(strCookieURL & "INTACTMON")
intThisMon = Application(strCookieURL & "INTTHISMON")


Look for the following lines (appx 125-126):

'############## Active Users Mod ################
Dim strAURecord, strAURecordDate, strAUAnon, strAUAnonOverride, strAUPAllow, strAUPCollapse, intActMon, intThisMon
Dim strAUAllow, strAURefresh, strAUIP, strAUUA, strAULocal, strAUTimeout, strAUPIsland, strAUAdminColor, strAUModColor
'############## Active Users Mod End ############


Replace them with these:

'############## Active Users Mod ################
Dim strAURecord, strAURecordDate, strAUAnon, strAUAnonOverride, strAUPAllow, strAUPCollapse, intActMon, intThisMon
Dim strAUAllow, strAURefresh, strAUIP, strAUUA, strAULocal, strAUTimeout, strAUPIsland, strAUAdminColor, strAUModColor
'############## Active Users Mod End ############


In "inc_activeusers.asp",

Look for the following lines (appx 171-172):

    response.write "            <br>" & VBNewLine & _
                   "            " & fLang(strLangMOD_Ls3kAU_00070) & ": " & intAURecord & " | " & fLang(strLangMOD_Ls3kAU_00080) & ": " & ChkDate(strAURecordDate," " & fLang(strLangMOD_Ls3kAU_00090) & " ",true) & VBNewLine & _

After them, insert the following:

				"            <br>" & VBNewLine & _
				"            " & fLang(strLangMOD_Ls3kAU_00040) & " " & fLang(strLangMOD_Ls3kAU_00120) & ": " & intActMon & ", " &  fLang(strLangMOD_Ls3kAU_00130) & ": " & intThisMon & vbNewLine & _

Finally, look for the following lines (appx 99-101):

intTotalActiveUsers = intTotalActiveUsers + intActiveGuests

'## Ls3k - Ok, now it is time to check the record, cause it would be cool if we broke it!

After those, insert the following:

	strSql = "SELECT COUNT(MEMBER_ID) AS ACTMON FROM " & strMemberTablePrefix & "MEMBERS WHERE M_LASTHEREDATE > " & DateAdd("d", -30, strCurrentTime)
	Set rsMonth = my_Conn.Execute(strSql)
	If NOT rsMonth.EOF Then
		intActMon = rsMonth("Actmon")
		rsMonth.Close
	End If
	Set rsMonth = Nothing
	strSql = "SELECT COUNT(MEMBER_ID) AS ACTMON FROM " & strMemberTablePrefix & "MEMBERS WHERE MID(M_LASTHEREDATE,5,2) = '" & MID(DatetoStr(strForumTimeAdjust),5,2) & "'"
	Set rsMonth = my_Conn.Execute(strSql)
	If NOT rsMonth.EOF Then
		intThisMon = rsMonth("Actmon")
		rsMonth.Close
	End If
	Set rsMonth = Nothing
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07