T O P I C R E V I E W |
JJenson |
Posted - 26 July 2007 : 19:06:10 I am trying to find out if someone has either done this or knows hows to do this.
Basically I want to have a form that people will fill out when they hit submit that will post into a Private Forum that only I can see. Each Submit on the form would creat a new topic that at that point I could post replys and keep track of what is going on with this.
I have looked around but cannot seem to find this anywhere.
Thanks < |
15 L A T E S T R E P L I E S (Newest First) |
MaD2ko0l |
Posted - 28 July 2007 : 09:02:31 no problems mate< |
JJenson |
Posted - 28 July 2007 : 01:44:54 Thanks so much Mad2kool This script works perfectly for what I needed. It was fairly easy to get it to say what I needed it to. Thanks again. < |
MaD2ko0l |
Posted - 27 July 2007 : 19:20:10 add an email field to the bug_reporter.asp (the form where they neter details)
and then add the following to bug_reporter_send.asp page where it you want it to be displayed in the message.
bugDesc = bugDesc & "<b>E-Mail:</b><br>" & ChkString(Request.Form("Email"),"message")
so it coudl look liek this
bugDesc = bugDesc & "<b>Your Name:</b> " & ChkString(Request.Form("Subject"),"hidden") &"<br> "
bugDesc = bugDesc & "<b>Custom Script Wanted:</b><br>" & ChkString(Request.Form("Message"),"message") &"<br> "
bugDesc = bugDesc & "<b>E-Mail:</b><br>" & ChkString(Request.Form("Email"),"message")
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (10"
< |
JJenson |
Posted - 27 July 2007 : 17:06:12 OK got it all working
My next step would be how do I get a field for them to insert their personal email?< |
JJenson |
Posted - 27 July 2007 : 17:03:54 Ok suprise suprise I ran into an error this is what it was
This is what is the section it is getting angry about.
I am sure I messed up the SQL statement somehow in modifying it to my needs.< |
MaD2ko0l |
Posted - 27 July 2007 : 16:49:08 what about this... demo: http://www.mad2kool.co.uk/na/snitzprivate/
user: admin pass: q
http://www.mad2kool.co.uk/na/snitzprivate/bug_report.zip for the 2 updated files< |
JJenson |
Posted - 27 July 2007 : 13:14:00 Yeah I am not sure how to do that. Can I use the message input but use it multiple times to get all the information or am I going down the wrong lines?
Thanks< |
Podge |
Posted - 27 July 2007 : 11:50:30 When you're finished they should be topics like any other normal topic.
You will also need to amend the subject or message to include the posters unique contact data.< |
JJenson |
Posted - 27 July 2007 : 11:28:43 OK great wasn't sure exactly how it was all going to work together I will get to that point and see what I need to show. Quick question with actually setting this up yet. Am I able to make replies to these posts?
Mainly I want the form to post and then from there I want to make replies for myself to that post. Mainly so I can keep track of what is happening with the question from the person who submitted it.
I will try and get these two pages made and modified and up so I can test from there. I will trya nd get that today but possible won't get it until tomorrow morning. Thanks Podge and Mad2Kool < |
Podge |
Posted - 27 July 2007 : 11:25:45 No. MaD2ko0l gave you code for two pages, bug_reporter.asp & bug_reporter_send.asp.
You should customize bug_reporter.asp to suit your needs (its the form page). bug_reporter_send.asp is the receiving page. You will need to replace the bit in red following with the code I posted and tweak it to suit your needs.
The first step will be to create those two pages.< |
JJenson |
Posted - 27 July 2007 : 10:07:14 Do I need to just add this code to my custom page I am doing or change some of the coding in post_info.asp? I amguessing I need to write the form with the SQL instert directly into my custom form page?< |
Podge |
Posted - 27 July 2007 : 09:21:59 Actually, this should help. Its an INSERT statement which you should be able to get the correct values to hardcode into your sql statement.
INSERT INTO FORUM_TOPICS (FORUM_ID, CAT_ID, T_SUBJECT, T_MESSAGE, T_AUTHOR, T_LAST_POST, T_LAST_POST_AUTHOR, T_LAST_POST_REPLY_ID, T_DATE, T_STATUS, T_IP, T_STICKY, T_SIG, T_ARCHIVE_FLAG, T_REPLIES, T_UREPLIES) VALUES (1, 1, 'test', 'test', 1, '20070727141922', 1, 0 , '20070727141922', 1 , '127.0.0.1', 0 , 0 , 1 , 0 , 0 ) < |
Podge |
Posted - 27 July 2007 : 09:17:57 This is taken directly from post_info.asp and should work with a little coaxing. I'm at work so I cannot test it at the moment.
You would substitute the actual forum id instead of FORUM_ID and the user id of the generic user you want to use. You'll also have to figure out the correct values to be inserted for sme of the columns e.g. T_STATUS, etc. and may have to pass extra variables from the form e.g. i.p. address.
I won't have time to test it this evening but should be able to over the weekend.
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
strSql = strSql & ", CAT_ID"
strSql = strSql & ", T_SUBJECT"
strSql = strSql & ", T_MESSAGE"
strSql = strSql & ", T_AUTHOR"
strSql = strSql & ", T_LAST_POST"
strSql = strSql & ", T_LAST_POST_AUTHOR"
strSql = strSql & ", T_LAST_POST_REPLY_ID"
strSql = strSql & ", T_DATE"
strSql = strSql & ", T_STATUS"
if strIPLogging <> "0" then
strSql = strSql & ", T_IP"
end if
strSql = strSql & ", T_STICKY"
strSql = strSql & ", T_SIG"
strSql = strSql & ", T_ARCHIVE_FLAG"
strSql = strSql & ", T_REPLIES"
strSql = strSql & ", T_UREPLIES"
strSql = strSql & ") VALUES ("
strSql = strSql & Forum_ID
strSql = strSql & ", " & Cat_ID
strSql = strSql & ", '" & txtSubject & "'"
strSql = strSql & ", '" & txtMessage & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & rs("MEMBER_ID")
strSql = strSql & ", 0 "
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
if Request.Form("lock") = 1 and ForumChkSkipAllowed = 1 then
strSql = strSql & ", 0 "
else
if Moderation = "Yes" then
strSql = strSql & ", 2 "
else
strSql = strSql & ", 1 "
end if
end if
if strIPLogging <> "0" then
strSql = strSql & ", '" & UserIPAddress & "'"
end if
if ForumChkSkipAllowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
else
strSql = strSql & ", 0 "
end if
if Request.Form("sig") = "yes" and strDSignatures = "1" then
strSql = strSql & ", 1 "
else
strSql = strSql & ", 0 "
end if
if ForumChkSkipAllowed = 1 then
if Request.Form("sticky") = 1 then
strSql = strSql & ", 0 "
else
strSql = strSql & ", 1 "
end if
else
strSql = strSql & ", 1 "
end if
strSql = strSql & ", 0 "
strSql = strSql & ", 0 "
strSql = strSql & ")" < |
JJenson |
Posted - 27 July 2007 : 08:16:18 How would I need to change the the SQL statment? I am guessing I would use this code to post the actual information I am trying to get?
But I am unsure if this is actually what I need or what I would need to modify it to get what I need?
Thanks for the help so far Podge < |
Podge |
Posted - 27 July 2007 : 07:33:39 You could alter the INSERT INTO sql statement so that it adds a row on the FORUM_TOPICS table. You will need to hardcode in the user id of your generic user and the forum id of the hidden forum.< |
|
|