The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
This adds a page that allows the moderators access specific admin funtions or other information.
I am using it to give moderators access to the statistics on the site (this is an intranet site and the managers only have moderator access but love to hear the statistics). It is pretty simple and should be easy to tweak for what you want site moderators to have access to.
Note: <font color="orange">This is not a secure page!</font id="orange"> It only uses a mlev check for security, so I highly recommend not putting anything sensative or potentially damaging on or linked from the page. If anyone knows of a better check that I should be using for security, please post it here.
In inc_header.asp look for:
Just before it add this to create a link to the moderator page similar to admin options:
Then create a page named <b>moderator_home.asp</b> modeled after the admin_home.asp page. Like the following:
Lastly, to allow moderators access to what is normally an admin only page. change the check for the admin login for that page from:
to:
<font size="1">- editted: typo</font id="size1">
I am using it to give moderators access to the statistics on the site (this is an intranet site and the managers only have moderator access but love to hear the statistics). It is pretty simple and should be easy to tweak for what you want site moderators to have access to.
Note: <font color="orange">This is not a secure page!</font id="orange"> It only uses a mlev check for security, so I highly recommend not putting anything sensative or potentially damaging on or linked from the page. If anyone knows of a better check that I should be using for security, please post it here.
In inc_header.asp look for:
Code:
if (mlev = 4) or (lcase(strNoCookies) = "1") then
Response.Write " <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>"Just before it add this to create a link to the moderator page similar to admin options:
Code:
if (mlev = 3) then
Response.Write " <tr>" & vbNewLine & _
" <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""moderator_home.asp""" & dWStatus("Access the Forum Moderator Functions...") & " tabindex=""-1"">Moderator Options</a>" & _
" <br /><br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end ifThen create a page named <b>moderator_home.asp</b> modeled after the admin_home.asp page. Like the following:
Code:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.05
'#################################################################################
'## Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<%
If Mlev < 3 then
Response.Write "<BR><FONT COLOR=""RED"" SIZE=""+7""><CENTER>YOU DO NOT BELONG HERE!</CENTER></FONT><BR>"
Else
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " Moderator Section<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine & _
" <table border=""0"" width=""50%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Moderator Functions</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""top""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
" </UL><p><b>Forums Statistics:</b>" & vbnewline & _
" <LI><span class=""spnMessageText""><a href=""sitestat.asp"">View Basic Statistics Table</a></span></LI>" & vbNewLine & _
" <LI><span class=""spnMessageText""><a href=""member_stats.asp"">View Detailed Statistics Tables</a></span></LI>" & vbNewLine & _
" </UL></p>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine
'Response.Write " <tr>" & vbNewLine & _
'" <td bgcolor=""" & strForumCellColor & """ valign=""top"" colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
'" <p><b>Important Information from Snitz Forums 2000:</b>" & vbNewLine & _
'" <script type=""text/javascript"" src=""http://forum.snitz.com/forum/syndicate.asp""></script></p></font></td>" & vbNewLine & _
'" </tr>" & vbNewLine
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine & _
" <center><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><a href=""default.asp"">Back to Forums</a></font></center><br />" & vbNewLine & _
" <br />" & vbNewLine
End If
WriteFooter
Response.End
%>
Lastly, to allow moderators access to what is normally an admin only page. change the check for the admin login for that page from:
Code:
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end ifCode:
if Mlev <> 3 and Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if<font size="1">- editted: typo</font id="size1">
lblNoReplies