Author |
Topic |
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 11 October 2002 : 10:39:45
|
Mod Member List Filters Author : Rakesh Jain (GauravBhabu) Date : Oct 29, 2002 For Snitz versions 3.4xx Should work with earlier versions also.
Filters the Member List to show:- Administrators Only
- Moderators Only
- New Members Today
- Members Visited Today
- Members Posted Today
DEMO username: snitz password: snitz
Modifications required to be made in members.asp Step 1: Find the following statement on Line 604
if srchLName <> "" then Response.write(" <input type=""hidden"" name=""LastName"" value=""" & srchLName & """>" & vbNewLine) Add the following statement just below the above statement
if varFilter <> "" then Response.write(" <input type=""hidden"" name=""Filter"" value=""" & varFilter & """>" & vbNewLine)
Step 2: Find the following statement on Lines 317-320
strNames = "UserName=" & srchUName &_
"&FirstName=" & srchFName &_
"&LastName=" & srchLName &_
"&INITIAL=" &srchInitial & "&" Modify the above statements as shown below:
strNames = "UserName=" & srchUName &_
"&FirstName=" & srchFName &_
"&LastName=" & srchLName &_
"&INITIAL=" & srchInitial &_
"&Filter=" & varFilter & "&"
Step 3: Find the following statement on Lines 293-305
Response.Write " </td>" & vbNewline & _
" </form>" & vbNewline & _
" </tr>" & vbNewline & _
" <tr bgcolor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <td colspan=""3"" align=""center"" valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <a href=""members.asp""" & dWStatus("Display ALL Member Names") & ">All</a> " & vbNewLine
for intChar = 65 to 90
if intChar <> 90 then
Response.Write " <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1" & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & chr(intChar) & "</a> " & vbNewLine
else
Response.Write " <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1" & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & chr(intChar) & "</a><br /></font></td>" & vbNewLine
end if
next Modify/Replace the above statements as shown below:
Response.Write (vbNewLine & _
" </td>" & vbNewline & _
" </form>" & vbNewline & _
" </tr>" & vbNewline & _
" <TR bGColor=""" & strcategoryCellColor & """>" & vbNewLine & _
" <TD COLSPAN=""3"" ALIGN=""Center"" VALIGN=""Top"">" & vbNewLine & _
" <A HREF=""members.asp""" & dWStatus("Display ALL Members") & ">" & vbNewLine & _
" <FONT FACE=""" & strDefaultFontFace & """ SIZE=""" & strFooterFontSize & """ COLOR=""" & strCategoryFontColor & """>All Members</FONT></A> :: " & vbNewLine & _
" <A HREF=""members.asp?Filter=3""" & dWStatus("Show Administrators") & ">" & vbNewLine & _
" <FONT FACE=""" & strDefaultFontFace & """ SIZE=""" & strFooterFontSize & """ COLOR=""" & strCategoryFontColor & """>Administrators</FONT></A> :: " & vbNewLine & _
" <A HREF=""members.asp?Filter=2""" & dWStatus("Show Moderators") & ">" & vbNewLine & _
" <FONT FACE=""" & strDefaultFontFace & """ SIZE=""" & strFooterFontSize & """ COLOR=""" & strCategoryFontColor & """>Moderators</FONT></A> :: " & vbNewLine & _
" <A HREF=""members.asp?Filter=New""" & dWStatus("Show New Members Today") & ">" & vbNewLine & _
" <FONT FACE=""" & strDefaultFontFace & """ SIZE=""" & strFooterFontSize & """ COLOR=""" & strCategoryFontColor & """>New Members</FONT></A> :: " & vbNewLine & _
" <A HREF=""members.asp?Filter=VisitToday""" & dWStatus("Show members who visited today") & ">" & vbNewLine & _
" <FONT FACE=""" & strDefaultFontFace & """ SIZE=""" & strFooterFontSize & """ COLOR=""" & strCategoryFontColor & """>Members Visited Today</FONT></A> :: " & vbNewLine & _
" <A HREF=""members.asp?Filter=PostedToday""" & dWStatus("Show members who posted today") & ">" & vbNewLine & _
" <FONT FACE=""" & strDefaultFontFace & """ SIZE=""" & strFooterFontSize & """ COLOR=""" & strCategoryFontColor & """>Members Posted Today</FONT></A>" & vbNewLine & _
" </TD>" & vbNewLine & _
" </TR>" & vbNewLine & _
" <tr bgcolor=""" & strCategoryCellColor & """>" & vbNewLine & _
" <td colspan=""3"" align=""center"" valign=""top"">")
for intChar = 65 to 90
strChar = chr(intChar)
if chr(intChar) = SearchName then strChar = "<B>" & strChar & "</B>"
strSpacer = " "
if intChar = 90 then strSpacer = "<BR /></td>"
Response.Write (vbNewLine & _
" <a href=""members.asp?mode=search&M_NAME=" & chr(intChar) & "&initial=1&Filter=" & varFilter & strSortMethod & """" & dWStatus("Display Member Names starting with the letter '" & chr(intChar) & "'") & ">" & vbnewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ Color=""" & strCategoryFontColor & """>" & strChar & "</font></a>" & strSpacer)
next
Step 4: Find the following statement on Lines 156
select case SortMethod
Add the following statement just before the above statement
dim strNoRecordsMsg, strListTitle, strFiltered, varFilter
strNoRecordsMsg = "No Records Found"
strListTitle = "All Members"
strFiltered = ""
varFilter = Request.QueryString("Filter")
if varFilter = "" then varFilter = Request.Form("Filter")
if isNumeric(varFilter) then
if varFilter > 0 then
strSql3 = strSql3 & " AND M_LEVEL=" & varFilter
end if
Select case varFilter
Case 1
strListTitle = "All Members"
Case 2
strListTitle = "Moderators"
Case 3
strListTitle = "Administrators"
end select
elseif varFilter = "New" then
strListTitle = "New Members"
strNoRecordsMsg = "No New Members Today"
strSql3 = strSql3 & " AND M_DATE >='" & DateToStr(DateValue(strForumTimeAdjust)) & "'"
elseif varFilter = "VisitToday" then
strListTitle = "Members Visited Today"
strNoRecordsMsg = "No Members Visited Today"
strSql3 = strSql3 & " AND M_LASTHEREDATE >='" & DateToStr(Datevalue(strForumTimeAdjust)) & "'"
elseif varFilter = "PostedToday" then
strListTitle = "Members Posted Today"
strNoRecordsMsg = "No Members Posted Today"
strSql3 = strSql3 & " AND M_LASTPOSTDATE >='" & DateToStr(DateValue(strForumTimeAdjust)) & "'"
end if
if srchInitial = "1" then strFiltered = " (Filtered by initial: <b>" & SearchName & "</b>)"
That's It.
Note: Post help Questions in Mod Implementation Forum. |
Edited by - GauravBhabu on 11 October 2002 11:28:49 |
|
GauravBhabu
Advanced Member
4288 Posts |
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 11 October 2002 : 11:09:06
|
I like it, i'll install it later |
De Priofundus Calmo Ad Te Damine |
|
|
sy
Average Member
United Kingdom
638 Posts |
Posted - 11 October 2002 : 11:16:54
|
Some great ideas there GauravBhabu, I too will install it later :) |
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails
|
|
|
Da_Stimulator
DEV Team Forum Moderator
USA
3373 Posts |
Posted - 11 October 2002 : 14:25:48
|
I had this part way done too.... I just had to sleep.... |
-Stim |
|
|
Raziel
New Member
97 Posts |
Posted - 11 October 2002 : 14:31:02
|
GREAT MOD!!!
Really good work! Very simple, and yet very good... It took less than five minutes to install...
Simply great! |
|
|
user_99
Starting Member
Austria
10 Posts |
Posted - 14 October 2002 : 14:33:16
|
Looks great! Is great! THX for the MOD...
Armin |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 14 October 2002 : 15:02:06
|
very nice as always ... |
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 14 October 2002 : 21:39:33
|
just installed it, works as advertised... did anyone notice that G displayed the changes from the end to the beginning? |
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 14 October 2002 : 21:55:27
|
up for a challenge? I have a script that shows Top 20 Posters of the current month which can be viewed here (it is normally in a popup window)
http://www.burningsoulsforum.com/forum/pop_top_20.asp
Thought it would be cool to implement into your script. The SQL statement I am using is here:
strSql = "SELECT TOP 20 R_AUTHOR, M_NAME, MAX(R_POSTS) AS T_MAX, COUNT(R_AUTHOR) AS T_POSTS FROM "
strSql = strSql & "(SELECT R_AUTHOR, M_NAME, R_DATE, R_POSTS FROM (" & strMemberTablePrefix &"MEMBERS INNER JOIN " & strTablePrefix & "REPLY ON "
strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID="& strTablePrefix & "REPLY.R_AUTHOR) WHERE R_DATE LIKE '"& year(date()) & month(date())& "%'" & vbCrLf
strSql = strSql & " UNION " & VbCrLf
strSql = strSql & "SELECT T_AUTHOR, M_NAME, T_DATE, T_POSTS FROM (" & strMemberTablePrefix & "MEMBERS INNER JOIN " & strTablePrefix & "TOPICS ON "
strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID="& strTablePrefix & "TOPICS.T_AUTHOR) WHERE T_DATE LIKE '"& year(date()) & month(date()) & "%') As MyView "
strSql = strSql & "GROUP BY R_AUTHOR,M_NAME ORDER BY Count(R_AUTHOR) DESC;"
I'm trying to think of the best approach for integrating this and would definately welcome any ideas. |
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 14 October 2002 : 23:58:24
|
quote: Originally posted by dayve
just installed it, works as advertised... did anyone notice that G displayed the changes from the end to the beginning?
Yes! that keeps the line numbers in order. |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 15 October 2002 : 00:15:37
|
quote: Originally posted by dayve
up for a challenge? I have a script that shows Top 20 Posters of the current month which can be viewed here (it is normally in a popup window)
http://www.burningsoulsforum.com/forum/pop_top_20.asp
Thought it would be cool to implement into your script. The SQL statement I am using is here:
strSql = "SELECT TOP 20 R_AUTHOR, M_NAME, MAX(R_POSTS) AS T_MAX, COUNT(R_AUTHOR) AS T_POSTS FROM "
strSql = strSql & "(SELECT R_AUTHOR, M_NAME, R_DATE, R_POSTS FROM (" & strMemberTablePrefix &"MEMBERS INNER JOIN " & strTablePrefix & "REPLY ON "
strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID="& strTablePrefix & "REPLY.R_AUTHOR) WHERE R_DATE LIKE '"& year(date()) & month(date())& "%'" & vbCrLf
strSql = strSql & " UNION " & VbCrLf
strSql = strSql & "SELECT T_AUTHOR, M_NAME, T_DATE, T_POSTS FROM (" & strMemberTablePrefix & "MEMBERS INNER JOIN " & strTablePrefix & "TOPICS ON "
strSql = strSql & strMemberTablePrefix & "MEMBERS.MEMBER_ID="& strTablePrefix & "TOPICS.T_AUTHOR) WHERE T_DATE LIKE '"& year(date()) & month(date()) & "%') As MyView "
strSql = strSql & "GROUP BY R_AUTHOR,M_NAME ORDER BY Count(R_AUTHOR) DESC;"
I'm trying to think of the best approach for integrating this and would definately welcome any ideas.
davye, if the Top 20 Posters idea is discussed in a separate topic that will be better. A good idea though. |
|
|
havvoc
New Member
92 Posts |
Posted - 16 October 2002 : 20:17:28
|
How difficult would it be to add a search FOR: IP address ? Just an idea but it would be real nice to be able to type an IP in the search for box and get that member. I know dynamic IPs change but anymore with cable... most of my members are static. It would be ideal if a partial IP address is submited and get a list of all members with the partial IP. This maybe seems useless to some, but I would find it of real use for knowing who is who. Just a suggestion. Thanks for the nice mod Havvoc |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 17 October 2002 : 01:17:33
|
I think havvoc's idea is a good one, also ... When behaviour is suspiciously like that of someone recently banned or censored - a search by IP could lend evidence more quickly than any other. |
|
|
|
Topic |
|