Author |
Topic |
|
vdevil
Starting Member
20 Posts |
Posted - 21 September 2004 : 13:27:59
|
Hi,
I've an idea. (sorry for my bad english)
Many people mistake when use the Reply with Quote function because they delete the TAG [ quote ]. I've thinked that may be a good idea to have two box when a user reply with quote. The first is blank and it is the reply box, the second contains the quoted text. It's all ok and work. But no quote is viewed in the preview windows. I m not successful only in preview.
Files post.asp -------------------------------------
'find the row Response.Write " <td bgColor=""" & strPopUpTableColor & """><textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea><br /> "
'and replace whith green code
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font></td>" & vbNewLine
if strRqMethod = "TopicQuote" or strRqMethod = "ReplyQuote" Then
Response.Write " <td bgColor=""" & strPopUpTableColor & """><textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);""></textarea><br /> "
Response.Write "<font face=""Arial"" size=""2""><br><b>Reply to... (quote)</b><br><textarea cols=""" & intCols & """ name=""Message2"" id=""Message2"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea></font><br /> "
else
Response.Write " <td bgColor=""" & strPopUpTableColor & """><textarea cols=""" & intCols & """ name=""Message"" rows=""" & intRows & """ wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & Trim(CleanCode(TxtMsg)) & "</textarea><br /> "
end if
---------------------------------------------
File post_info.asp ---------------------------------------------
'find the row if MethodType = "Reply" or MethodType = "ReplyQuote" or MethodType = "TopicQuote" then
'then replace line txtMessage = ChkString(Request.Form("Message"),"message")
'with
txtMessage = ChkString(Request.Form("Message2"),"message") & ChkString(Request.Form("Message"),"message")
---------------------------------------------
Now you have only in ReplyQuote the second box with the quote and it's work! The problem is that the quote doesn't appear in preview window... and so I've seen the inc_code.js file
file inc_code.js -------------------------------------------
function OpenPreview()
{
if (document.PostTopic.Message) {
if (trim(document.PostTopic.Message.value)=="") {
alert("Nothing to preview!")
return false
}
popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=750,height=450')
return true
}
} ---------------------------------
in pop_preview.asp ---------------------------------
strMessagePreview2 = trim(Request.Form("message2"))
if strMessagePreview2 <> "" AND IsNull(strMessagePreview2) <> True then
strMessagePreview = strMessagePreview2 & "<br>" & strMessagePreview
end if ---------------------------------
Message2 is not considered in this javascript and I'm nt succesful to do.
May you help me? Thank |
Edited by - vdevil on 21 September 2004 13:29:19 |
|
-gary
Development Team Member
406 Posts |
Posted - 21 September 2004 : 14:09:58
|
Not a bad idea, but how would you handle multiple quotes and threaded replies between the quotes? |
KawiForums.com
|
|
|
vdevil
Starting Member
20 Posts |
Posted - 21 September 2004 : 14:27:35
|
Then...
This is a sample. Now we have your replay in only one box.
---------------------------------- [ quote ]Originally posted by -gary
Not a bad idea, but how would you handle multiple quotes and threaded replies between the quotes? [ /quote ]
----------------------------------
And I can reply in this box, but some people delete one or more TAG Code and this is wrong. The solution is:
BOX 1 (reply) ----------------------------------
----------------------------------
BOX 2 (quoted text) ---------------------------------- [ quote ]Originally posted by -gary
Not a bad idea, but how would you handle multiple quotes and threaded replies between the quotes? [ /quote ] ----------------------------------
It is not important if may be multiple quote, because the people doesn't touch this. Someone may delete some row to comment the quoted text, but they can do in separated box. So we always need only two box.
For example:
BOX 1 (reply) ----------------------------------
----------------------------------
BOX 2 (quoted text)
----------------------------------
[ quote ]Originally posted by -gary
[ quote ]Originally posted by vdevil
Hi, I've an idea. (sorry for my bad english) [ /quote ]
Not a bad idea, but how would you handle multiple quotes and threaded replies between the quotes? [ /quote ] ----------------------------------
But the preview window doesn't put the second box. This is the problem. The post reply works. |
|
|
-gary
Development Team Member
406 Posts |
Posted - 21 September 2004 : 14:46:05
|
quote: Originally posted by vdevil
Then...
This is a sample. Now we have your replay in only one box.
I was wondering..
quote: Originally posted by vdevil
And I can reply in this box, but some people delete one or more TAG Code and this is wrong. The solution is:
how you would handle...
quote: Originally posted by vdevil
It is not important if may be multiple quote, because the people doesn't touch this. Someone may delete some row to comment the quoted text, but they can do in separated box. So we always need only two box.
splitting up the quotes...
quote: Originally posted by vdevil
But the preview window doesn't put the second box. This is the problem. The post reply works.
and replying to different sections or if you would even bother? |
KawiForums.com
|
|
|
vdevil
Starting Member
20 Posts |
Posted - 21 September 2004 : 14:55:06
|
uhm... but if you split every quote there will be a lot of box... I think that to have two different box is enought, so many newbie people doesn't delete the TAG and reply simply.
Do you now how put a second field in the preview window? |
|
|
-gary
Development Team Member
406 Posts |
Posted - 21 September 2004 : 15:00:02
|
In pop_preview.asp change: strMessagePreview = trim(Request.Form("message")) to: strMessagePreview = trim(Request.Form("message2")) & trim(Request.Form("message")) or something like that depending on how you want the reply ordered. |
KawiForums.com
|
|
|
vdevil
Starting Member
20 Posts |
Posted - 21 September 2004 : 15:10:08
|
I've just changed the row, but doesn't work. See the first post. I think that may be about file inc_code.js -------------------------------------------
function OpenPreview() { if (document.PostTopic.Message) { if (trim(document.PostTopic.Message.value)=="") { alert("Nothing to preview!") return false } popupWin = window.open('pop_preview.asp', 'preview_page', 'scrollbars=yes,width=750,height=450') return true } }
---------------------------------
When you click on PREVIEW, there is a javascript for OpenPreview() |
|
|
-gary
Development Team Member
406 Posts |
Posted - 21 September 2004 : 15:15:07
|
if (trim(document.PostTopic.Message.value)=="") && (trim(document.PostTopic.Message2.value)=="") { |
KawiForums.com
|
|
|
vdevil
Starting Member
20 Posts |
Posted - 21 September 2004 : 15:23:37
|
nothing... javascript error... :-( |
|
|
vdevil
Starting Member
20 Posts |
Posted - 21 September 2004 : 15:28:02
|
if I change in if (trim(document.PostTopic.Message2.value)=="") { there is no text in preview... I think that OpenPreview() doesn't pick up the field Message2. If I rename Message in Message2 and Message2 in Message, I've the quoted text in preview but not the replay.
So I think that OpenPreview() puts only a field in preview window.
:-( |
|
|
-gary
Development Team Member
406 Posts |
Posted - 21 September 2004 : 15:49:02
|
I'm bad at JS, but you're going to have to concat Message and Message2 in pop_preview.asp document.previewTopic.message.value = window.opener.document.PostTopic.Message2.value + window.opener.document.PostTopic.Message.value;
And the post before should've been: if (trim(document.PostTopic.Message.value)=="" && trim(document.PostTopic.Message2.value)==""){
I'm not sure what this will do to previews in other pages, if anything as I don't know how much this function is used or if Java will throw an error if you query an element that isn't initialized. Like I said, I'm bad with Java. |
KawiForums.com
|
|
|
vdevil
Starting Member
20 Posts |
Posted - 22 September 2004 : 05:24:07
|
Right, Concat Message with Message2 is needed. But "js" doesn't work... The only thing that do is delete MessageBox in post.asp page.
Thank :-(
Dear RichardKinser, may you help me? |
Edited by - vdevil on 22 September 2004 08:16:26 |
|
|
|
Topic |
|