Author |
Topic |
|
pokemon
Junior Member
151 Posts |
Posted - 18 November 2003 : 16:55:37
|
Hi all,
i'm using Elex's complaint to moderator mod. Everything is great, but i would love to ask you how do i set up an authentication or required user login with their username and password before send a complaint to moderator. In this way i will know who is complaining and very easy to keep track with. Thanks in advanced
here is a complaint_to_moderator.asp
<%
dim action
action = Request.QueryString("action")
message = Request.Form("msg")
ForumID = Request.QueryString("FORUM_ID")
TopicID = Request.QueryString("TOPIC_ID")
TopicTitle = Request.QueryString("TOPIC_TITLE")
ReplyID = Request.QueryString("REPLY_ID")
CatID = Request.QueryString("CAT_ID")
ReporterID = Request.QueryString("ReporterID")
IsTopic = Request.QueryString("IsTopic")
if action ="SAVE" then
call SaveMessage
else
%>
<center>
<A href="topic.asp?TOPIC_ID=<%=TopicID%>&FORUM_ID=<%=ForumID%>&CAT_ID=<%=CatID%>" ><%=TopicTitle%></A>
<br><TABLE WIDTH="50%" BORDER=0 CELLSPACING=1 CELLPADDING=1 style="HEIGHT: 99px; WIDTH: 433px">
<TR>
<TD>
<P><STRONG>Report spam and inappropriate posts only,
please help us keep this forum as clean as we
can.
</STRONG>
</P>
<P><STRONG>Thank You</STRONG> ,</P>
</TD>
</TR>
</TABLE>
<FORM action="complaint_to_moderator.asp?IsTopic=<%=IsTopic%>&action=SAVE&FORUM_ID=<%=ForumID%>&TOPIC_ID=<%=TopicID%>&CAT_ID=<%=CatID%>&ReporterID=<%=ReporterID%>&REPLY_ID=<%=ReplyID%>" id=FORM method=post name=FORM>
<TABLE WIDTH="50%" BORDER=1 CELLSPACING=0 CELLPADDING=0 style="HEIGHT: 171px; WIDTH: 434px" align=center>
<TR>
<TD bgcolor="<% =strForumFirstCellColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Message To Moderator</font></TD>
</TR>
<TR>
<TD align=middle><TEXTAREA cols=40 name=msg rows=7 style="HEIGHT: 118px; WIDTH: 432px"></TEXTAREA></TD></TR>
<TR>
<TD align="middle">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
</TD>
</TR>
</TABLE></FORM>
<br><br>
<%
end if
writefooter
function SaveMessage
dim RS
dim SQL
if ReplyID = "" then ReplyID = 0
SQL = "INSERT INTO "& strTablePrefix & "COMPLAINTS(ForumID, TopicID, CatID, Message, ReporterID, IsTopic, ReplyID, Solved)"
SQL = SQL & " VALUES(" & ForumID & ", " & TopicID & ", " & CatID & ", '" & message & "', " & ReporterID & ", " & IsTopic & ", " & ReplyID & ", " & 0 & ")"
'Response.Write SQL
my_Conn.execute SQL
Response.Write "<center><b>Thank you for keeping this forum clean....... <br><br> Back to Forum" & _
"<meta http-equiv='refresh' content='3;url=default.asp'>"
end function
%>
</center></BODY></HTML>
|
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 18 November 2003 : 17:05:57
|
you can perhaps add this to the top of it
<%
if mlev=0 Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>You Must Be Registered And Logged In To View This Page.</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
Response.End
end if
%>
that is assuming that it is posted after the inc_header, config.asp and so on include files, that code above checks to see if the user is logged in, if not, then they get a message saying: You Must Be Registered And Logged In To View This Page.
I use this code personally on my site. |
coaster crazy |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 18 November 2003 : 20:08:23
|
I would suggest adding WriteFooter to the line before Response.End, so as to end the page correctly when shown and to close the myConn object correctly.
Besides that, I would say that WWSs code should do the trick, although you could change You Must Be Registered And Logged In To View This Page. to You Must Be Registered And Logged In To Alert A Moderator. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
ascension
New Member
50 Posts |
Posted - 19 January 2004 : 03:34:38
|
Could someone please tell me where the original files for this "Complaint to Moderator" MOD is??? I would be very happy to get it for my forum! |
|
|
indianBoy
New Member
56 Posts |
Posted - 03 February 2004 : 16:35:41
|
can some one tell me where can i find this mod? |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 03 February 2004 : 16:59:42
|
Im not sure if this mod is available anymore. If you do a search in the MOD Add-On Forum (W/Code) archive, you will find a couple of topics about this type of mod. Unfortunately, none of the download links in them works. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
zeth
Junior Member
United Kingdom
117 Posts |
|
zeth
Junior Member
United Kingdom
117 Posts |
|
weeweeslap
Senior Member
USA
1077 Posts |
Posted - 03 February 2004 : 18:37:22
|
I have found the files for this mod, I'll upload them to snitzbitz in a sec. |
coaster crazy |
|
|
weeweeslap
Senior Member
USA
1077 Posts |
|
zeth
Junior Member
United Kingdom
117 Posts |
Posted - 03 February 2004 : 19:49:00
|
Well done that man. Perhaps someone could now move this topic to the MOD With Code Forum? Since if people search for this MOD then they will probably search there. |
THEOLOGY.ME.UK CROSSRING.COM |
|
|
adslonline
Starting Member
Netherlands
38 Posts |
Posted - 24 February 2004 : 09:06:49
|
I am having some trouble with this mod. There are two small pieces of code that need to be inserted in topic.asp which seemed easy.
However the example given in the instruction.txt is very vague since it refers to text below/above the paste area of a modified topic.asp file. Is there someone who has already got this mod mod installed and working?
it might be this mod is not adjusted for snitz 3.4.04.... |
www.adslforum.nl |
Edited by - adslonline on 24 February 2004 09:08:41 |
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 24 February 2004 : 11:11:07
|
I use this, though on a SHN forum. It was a long time since I installed it so I don't remember if I had any problems.. |
/Tribaliztic - www.gotlandrace.se -
|
|
|
|
Topic |
|