Because of some flaws in the current preview function (me & huwr have encountered problems, I dont know if anyone else has), I have written up a 'built-in' preview function into post_info.asp
http://stormwhispers.com/snitz_testing - Demo
post.asp - Remove The following around line 821
<input name="Submit" type="submit" value="<% =btn %>">
<%
if strRqMethod = "Reply" or _
strRqMethod = "Edit" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
%>
<input name="Preview" type="button" value=" Preview " onclick="OpenPreview()">
<%
end if
%>
post.asp Add the following around line 772
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">
<input name="Sig" type="checkbox" value="yes" checked>Check here to include your profile signature.<br>
<input type="checkbox" name="newPreview" value="yes" checked>Check here to Preview your message before it gets posted.<br></font>
post_info.asp Add the following around line 50
err_Msg = ""
ok = ""
'Added Preview
if ((request.form("Method_Type") = "Topic" or request.form("Method_Type") = "Reply" or request.form("Method_Type") = "ReplyQuote") and (request.form("newPreview") = "yes")) then
strFormMType = request.form("Method_Type")
strFormType = request.form("Type")
strFormTopicId = request.form("TOPIC_ID")
strFormReplyId = request.form("REPLY_ID")
strFormForumId = request.form("FORUM_ID")
strFormCatId = request.form("CAT_ID")
strFormAuthor = request.form("Author")
strFormModId = request.form("Mod_ID")
strFormCatTitle= request.form("Cat_Title")
strFormForumTitle = request.form("FORUM_Title")
strFormTopicTitle = request.form("Topic_Title")
strFormM = request.form("M")
strFormRefer = request.form("Refer")
strFormCookies = request.form("cookies")
strFormUsername = request.form("UserName") ' UserName
strFormPassword = request.form("Password") ' Password
strFormSubject = replace(request.form("Subject"), Chr(34), """) ' Subject
strFormMessage = ChkString(request.form("Message"), "message")
strTempFormMessage = Replace(request.form("Message"), Chr(34), """) 'Message for sending
strTempFormMessage = Replace(strTempFormMessage, "'", "''") 'Message for Sending
strFormSig = request.form("Sig") ' Show Sig?
strFormLock = request.form("lock")
if strFormLock = "" then
strFormLock = 0
end if
if strFormSig = "yes" then
strTempSignature = getSig(strFormUsername)
end if
response.write "<table border=0 bgcolor=""" & strTableBorderColor & """ cellspacing=1 width=95% cellpadding=3 align=""center"">" & vbcrlf _
& "<tr><td align=""center"" bgcolor=""" & strHeadCellColor & """><font color=""" & strHeadFontColor _
& """ face=""" & strDefaultFontFace & """>" & vbcrlf _
& "Below is a Preview of your message</font>" & vbcrlf & "</td>" & vbcrlf & "</tr>" & vbcrlf
response.write "<tr><td align=""left"" bgcolor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=" & strDefaultFontSize & ">" _
& formatStr(strFormMessage) & "<p>" & formatStr(strTempSignature) & "</font>" & vbcrlf & "</td>" & vbcrlf & "</tr>" & vbcrlf & "</table>"
response.write "<p>"
response.write "<form action=""post_info.asp"" method=""post"">" & vbcrlf
response.write "<input type=""hidden"" name=""Method_Type"" value=""" & strFormMType & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Type"" value=""" & strFormType & """>" & vbcrlf
response.write "<input type=""hidden"" name=""TOPIC_ID"" value=""" & strFormTopicId & """>" & vbcrlf
response.write "<input type=""hidden"" name=""REPLY_ID"" value=""" & strFormReplyId & """>" & vbcrlf
response.write "<input type=""hidden"" name=""FORUM_ID"" value=""" & strFormForumId & """>" & vbcrlf
response.write "<input type=""hidden"" name=""CAT_ID"" value=""" & strFormCatId & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Author"" value=""" & strFormAuthor & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Mod_Id"" value=""" & strFormModId & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Cat_Title"" value=""" & strFormCatTitle & """>" & vbcrlf
response.write "<input type=""hidden"" name=""FORUM_Title"" value=""" & strFormForumTitle & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Topic_Title"" value=""" & strFormTopicTitle & """>" & vbcrlf
response.write "<input type=""hidden"" name=""M"" value=""" & strFormM & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Refer"" value=""" & strFormRefer & """>" & vbcrlf
response.write "<input type=""hidden"" name=""cookies"" value=""" & strFormCookies & """>" & vbcrlf
response.write "<input type=""hidden"" name=""UserName"" value=""" & strFormUsername & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Password"" value=""" & strFormPassword & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Subject"" value=""" & strFormSubject & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Message"" value=""" & strTempFormMessage & """>" & vbcrlf
response.write "<input type=""hidden"" name=""Sig"" value=""" & strFormSig & """>" & vbcrlf
response.write "<input type=""hidden"" name=""lock"" value=""" & strFormLock & """>" & vbcrlf
response.write "<input type=""button"" value="" Back "" onClick=""history.go(-1)"">"
response.write "<input type=""submit"" value="" Submit "">" & vbcrlf & "</form>"
%>
<!--#include file="inc_footer.asp" -->
<%
else
'End Added
if Request.Form("Method_Type") = "Edit" then
post_info.asp Add the following at the END of the file
<% end if %>
----------------
Da_Stimulator
Need a Mod?
My Snitz Test Center
Edited by - da_stimulator on 17 March 2001 22:09:40
Edited by - da_stimulator on 18 March 2001 17:13:47
Edited by - da_stimulator on 18 March 2001 17:14:39