Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 See the number of Users active in the past 30 days

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
kyodai Posted - 06 February 2011 : 00:14:41
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
1   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 06 February 2011 : 06:36:51
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

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07