Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Form to Post to Private Forum.
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

JJenson
Advanced Member

USA
2121 Posts

Posted - 26 July 2007 :  19:06:10  Show Profile  Visit JJenson's Homepage  Reply with Quote
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 <

Podge
Support Moderator

Ireland
3775 Posts

Posted - 26 July 2007 :  19:37:16  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Can non-members submit the form?<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 26 July 2007 :  19:46:27  Show Profile  Visit JJenson's Homepage  Reply with Quote
yes I basically want to set the form so that it come from a specified account I set up. Then from there in the body of the text it will have their personal information captured.

Did that make sense?

After looking into it I guess the user could be annoynomous It reall doesn't matter. But I need fields to be posted into the message section like

Name:
Email:
Comments:

That sort of a thing but I am unsure how to get everythign to post into a text area and posted.<

Edited by - JJenson on 26 July 2007 21:13:44
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 26 July 2007 :  21:53:03  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
could u not modify a guestbook to do what u want? it doesnt have to be a snitz guestbook seen as annoynomous people can post to it.

i used to have a little bug form that sent me a pm when someoen submitted it. it sent me the following info if i remember correctly:

Forum name - if logged in
ip
date/time
error page
error/comment


i can find the code for u if u want me to.

maybe it will help u out<

© 1999-2010 MaD2ko0l
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 26 July 2007 :  21:59:27  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote

© 1999-2010 MaD2ko0l
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 26 July 2007 :  22:36:27  Show Profile  Visit JJenson's Homepage  Reply with Quote
Question on the above code. Would the person who is submitting the comment have to navigate to the forum or just to bug_report.asp? then bug_report.asp would then submit it to me in form of a Private Message?<
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 27 July 2007 :  07:33:39  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
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.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 27 July 2007 :  08:16:18  Show Profile  Visit JJenson's Homepage  Reply with Quote
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?


<table border="0" cellspacing="1" cellpadding="1">
              <form name="PostTopic" method="post" action="post_info.asp" onSubmit="return validate();">
              <input name="ARCHIVE" type="hidden" value="">
              <input name="Method_Type" type="hidden" value="Topic">
              <input name="REPLY_ID" type="hidden" value="">
              <input name="TOPIC_ID" type="hidden" value="">
              <input name="FORUM_ID" type="hidden" value="10"> 
              <input name="CAT_ID" type="hidden" value="3">
              <input name="Refer" type="hidden" value="http://www.vmcplugins.com/forum/forum.asp?FORUM_ID=10">
              <input name="cookies" type="hidden" value="yes">


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 <
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 27 July 2007 :  09:17:57  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
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 & ")"
<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 27 July 2007 :  09:21:59  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
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.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 27 July 2007 :  10:07:14  Show Profile  Visit JJenson's Homepage  Reply with Quote
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?<
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 27 July 2007 :  11:25:45  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
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.

bug_reporter_send.asp


<!--#INCLUDE FILE="forum/config.asp" -->
<!--#INCLUDE FILE="forum/inc_func_common.asp" -->
<%
	strUserName = Request.ServerVariables("HTTP_USER_AGENT")

set my_Conn= Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
%>
<html>
<head>
<title><% =strForumTitle %></title>
</head>

<BODY background="http://www.gamingcrypt.co.uk/Images/bg.gif" text="#333333" link="#000000" aLink="#990000" vLink="#000000">

<table width="100%">
  <tr>
    <td align=center valign=center>
    <div align=center><center>
    <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<%
strDBNTUserName = Request.ServerVariables("REMOTE_HOST")
set rs = Server.CreateObject("ADODB.RecordSet")

err_Msg = ""
ok = ""

	strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, " & strDBNTSQLName
	if strAuthType = "db" then
		strSql = strSql & ", M_PASSWORD "
	end if
	
	strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
	strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & Request.Form("UserName") & "'"
	strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 1
	
	if strAuthType = "db" then
		strSql = strSql & " AND   M_PASSWORD = '" & Request.Form("Password") & "'"
		QuoteOk = (ChkQuoteOk(strDBNTUserName) and ChkQuoteOk(Request.Form("Password")))
	else
		QuoteOk = ChkQuoteOk(strDBNTUserName)
	end if

	set rs = my_Conn.Execute (strSql)



		txtMessage = ChkString(Request.Form("Message"),"message")
		txtSubject = ChkString(Request.Form("Subject"),"display")

		if txtMessage = " " then
			Go_Result "You must post a bug description!", 0
%>
<!--#INCLUDE FILE="forum/inc_footer_short.asp" -->
<%
			Response.End
		end if

		if txtSubject = " " then
			Go_Result "You must enter the location of the bug! (Page name)", 0
%>
<!--#INCLUDE FILE="forum/inc_footer_short.asp" -->
<%
			Response.End
		end if

		if strDBNTUserName = "" then
			Go_Result "You must log on or register!", 0
%>
<!--#INCLUDE FILE="forum/inc_footer_short.asp" -->
<%
			Response.End
		end if
sendto = "1"
sendFrom = "1"
rmail = "0"

title = "[Bug From " & strDBNTUserName & "]"

bugDesc = "<b>User Name:</b> " & strDBNTUserName & "<br> "
bugDesc = bugDesc & "<b>OS Info:</b> " & ChkString(Request.Form("userIp"),"hidden") &"<br> "
bugDesc = bugDesc & "<b>IP Address:</b> " & ChkString(Request.Form("OSinfo"),"hidden") &"<br> "
bugDesc = bugDesc & "<b>Page Name:</b> " & ChkString(Request.Form("Subject"),"hidden") &"<br> "
bugDesc = bugDesc & "<b>Bug Description:</b><br>" & ChkString(Request.Form("Message"),"message")

strSql = "INSERT INTO " & strTablePrefix & "PM ("
strSql = strSql & " M_SUBJECT"
strSql = strSql & ", M_MESSAGE"
strSql = strSql & ", M_TO"
strSql = strSql & ", M_FROM"
strSql = strSql & ", M_SENT"
strSql = strSql & ", M_MAIL"
strSql = strSql & ", M_READ"
strSql = strSql & ", M_OUTBOX"
strSql = strSql & ") VALUES ("
strSql = strSql & " '" & title & "'"
strSql = strSql & ", '" & bugDesc & "'"
strSql = strSql & ", " & sendto
strSql = strSql & ", " & SendFrom
strSql = strSql & ", '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", " & "0"
strSql = strSql & ", " & "0"
strSql = strSql & ", '" & 1 & "')"


my_Conn.Execute (strSql)%>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Thank you for reporting bugs!</font></p>

<p align="center"><font color="red" size="<% =strHeaderFontSize %>"><% =str_err_Msg %></font></p>

<!--#INCLUDE FILE="forum/inc_footer_short.asp" -->
<%Response.End %>
<%sub Go_Result(str_err_Msg, boolOk)%>


<%	if boolOk = 1 then %>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Thank You for reporting bugs!</font></p>
<!--#INCLUDE FILE="forum/inc_footer_short.asp" -->
<%		Response.End %>
<%Else %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There has been a problem!</font></p>

<p align="center"><font color="red" size="<% =strHeaderFontSize %>"><% =str_err_Msg %></font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go back to correct the problem.</a></font></p>

<!--#INCLUDE FILE="forum/inc_footer_short.asp" -->
<%Response.End %>
<%
	end if 
End Sub%>


The first step will be to create those two pages.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 27 July 2007 :  11:28:43  Show Profile  Visit JJenson's Homepage  Reply with Quote
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 <

Edited by - JJenson on 27 July 2007 11:29:44
Go to Top of Page

Podge
Support Moderator

Ireland
3775 Posts

Posted - 27 July 2007 :  11:50:30  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
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.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 27 July 2007 :  13:14:00  Show Profile  Visit JJenson's Homepage  Reply with Quote
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<
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 27 July 2007 :  16:49:08  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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<

© 1999-2010 MaD2ko0l
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07