T O P I C R E V I E W |
squek |
Posted - 13 October 2005 : 13:56:34 These is an Italian version of the alternative quoting method based on the original mod by MarcelG (http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=53896&SearchTerms=quotetd)
These are the steps to obtain this quoting method:
You have to modify <b>inc_fun_common.asp</b>, <b>inc_func_posting.asp</b>, <b>inc_header.asp</b>, <b>inc_header_short.asp</b> and <b>post.asp</b>.
<font color="red"><b>Warning</b></font id="red">: remove the <font color="red">*</font id="red"> which are in [*quote] and [*/quote], I have to use them here to show the code correctly.
<b>Let's start, in inc_func_common.asp search for this:</b>
fString = doCode(fString, "[*quote]", "[*/quote]", "<blockquote id=""quote""><font size=""" & strFooterFontSize & """ face=""" & strDefaultFontFace & """ id=""quote"">Citazione:<hr height=""1"" noshade id=""quote"">", "<hr height=""1"" noshade id=""quote""></blockquote id=""quote""></font id=""quote"">") end if
<b>and replace with this:</b>
fString = doCode(fString, "[*quote]", "[*/quote]", "<div align=""center"" id=""quote2""><table class=""quote""><tr><td class=""quotetd""></td></tr><tr><td class=""quotetd2""><span class=""quotetext"">", "</span></td></tr></table></div align=""center"" id=""quote2"">") end if
<b> In in_func_posting.asp search for this:</b>
fString = replace(fString, "<BLOCKQUOTE id=quote><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>Citazione:<hr height=1 noshade id=quote>","[*quote]", 1, -1, 1)
fString = replace(fString, "<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face=""" & strDefaultFontFace & """ size=" & strDefaultFontSize & " id=quote>","[*/quote]", 1, -1, 1) '## fString = replace(fString, "<blockquote id=""quote""><font size=""" & strFooterFontSize & """ face=""" & strDefaultFontFace & """ id=""quote"">Citazione:<hr height=""1"" noshade id=""quote"">","[*quote]", 1, -1, 1)
<b>and replace with this:</b>
fString = replace(fString, "<BLOCKQUOTE id=quote><font size=" & strFooterFontSize & " face=""" & strDefaultFontFace & """ id=quote>quote:<hr height=1 noshade id=quote>","[*quote]", 1, -1, 1) fString = replace(fString, "<div align=""center"" id=""quote2""><table class=""quote""><tr><td class=""quotetd""></td></tr><tr><td class=""quotetd2""><span class=""quotetext"">","[*quote]", 1, -1, 1) fString = replace(fString, "</span></td></tr></table></div align=""center"" id=""quote2"">","[*/quote]", 1, -1, 1) fString = replace(fString, "<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face=""" & strDefaultFontFace & """ size=" & strDefaultFontSize & " id=quote>","[*/quote]", 1, -1, 1) '##
fString = replace(fString, "<blockquote id=quote>quote:<hr size=1 noshade id=quote>","[*quote]", 1, -1, 1) fString = replace(fString, "<hr size=1 noshade id=quote></blockquote id=quote>","[*/quote]", 1, -1, 1)
<b> In inc_header.asp search for this:</b>
"a:active {color:" & strActiveLinkColor & ";text-decoration:" & strActiveTextDecoration & "}" & vbNewLine & _
<b>and copy this below it:</b>
"table.quote {width: 90%; border: 0px " & strTableBorderColor & " solid}" & vbNewLine & _ ".quotetd {width: 100%; border: 0px #D1D7DC solid}" & vbNewLine & _ ".quotetd2 {background-color: #FFFFFF ; width: 100%; border: 1px #D1D7DC solid; border-collapse: separate; padding: 0.3em}" & vbNewLine & _ ".quotetext {font-family: "& strDefaultFontFace &"; font-size: 8pt; color: #000000}" & vbNewLine & _
<b>In inc_header_short.asp search for this:</b>
".spnMessageText a:link {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
<b>and copy this below it:</b>
"table.quote {width: 90%; border: 0px " & strTableBorderColor & " solid}" & vbNewLine & _ ".quotetd {width: 100%; border: 0px d1d7dc solid}" & vbNewLine & _ ".quotetd2 {background-color: #ffffff ; width: 100%; border: 1px #d1d7dc solid; border-collapse: separate; padding: 0.3em}" & vbNewLine & _ ".quotetext {font-family: "& strDefaultFontFace &"; font-size: 8pt; color: #000000}" & vbNewLine & _
<b>in post.asp search for this (it's the italian version):</b>
TxtMsg = "[*quote]Messaggio inserito da " & chkString(rs("M_NAME"),"display") & "" & vbNewline
<b>and replace with this ("ha scritto" means "wrote"):</b>
TxtMsg = "[*quote]" & chkString(rs("M_NAME"),"display") & " ha scritto: " & vbNewline
<b>Then search for this:</b>
TxtMsg = "[*quote]Messaggio inserito da " & chkString(rs("M_NAME"),"display") & "" & vbNewline
<b>and replace with this:</b>
TxtMsg = "[*quote]Messaggio di " & chkString(rs("M_NAME"),"display") & "" & vbNewline
<b>That's all.</b>
<b>Thanks to MarcelG for the original mod and to Plasma (www.ciricadoforum.it) for the collaboration</b>.
Now I'm trying to obtain a quoting method much more similar to the phpBB one, with few "strange" code (I mean [*b][/b] etc...) on the reply window (that is a frequent problem for newbie users of forums, I always have to correct their quoted messages because they accidentally remove part of the quoting forum code!).
I'd like to have the code [*quote="John Doe"] [/quote] to quote a previous post by John Doe (an example) into mine (i.e. when I click on in topic.asp.
This code should generate this style:
While, to quote in the standard method I'd like to use simply the quote button in post.asp: .
But really dunno how to obtain this...
So, I need some help!
|
15 L A T E S T R E P L I E S (Newest First) |
SiSL |
Posted - 19 October 2005 : 08:57:44 Weird really.< |
squek |
Posted - 19 October 2005 : 05:54:48 Uhm... same as above... If I add ' in fronto of that part of cod I don't even get any quote style but only the simple text in the new message.
Maybe that's because in my css I use TD instead of DIV?< |
SiSL |
Posted - 19 October 2005 : 05:24:07 Oops and sorry, there is a function that I use for my own language there,
I uploaded file again for you...< |
SiSL |
Posted - 19 October 2005 : 05:01:50 Remove following line or comment (simply add a ' in front of it at line 1008
fString = doCode(fString, "[quote]", "[/quote]", "<div align=""center"" id=""quote2""><table class=""quote""><tr><td class=""quotetd""></td></tr><tr><td class=""quotetd2""><span class=""quotetext"">", "</span></td></tr></table></div align=""center"" id=""quote2"">") < |
squek |
Posted - 19 October 2005 : 04:48:58 Even if I manually write it I get this: < |
SiSL |
Posted - 19 October 2005 : 04:38:45 No, I didnt change anything on how to add Quote with your Javascript on Post.asp
I just changed how you can use it by manually writing.< |
squek |
Posted - 19 October 2005 : 04:35:07 It doesen't seems to work... I'm still having [*quote][b]Name wrote:[/quote] instead of [quote="name"][/quote] if I reply to a message clicking on the "quote message" button in topic.asp... maybe there's something to remove in the other files, maybe the css or something else...< |
SiSL |
Posted - 19 October 2005 : 04:00:19 I did two changes to your inc_func_common.asp
here it is http://www.amedia.org/forum/inc_func_common_squek.zip
1st change added red line around line 457:
if strAllowForumCode = "1" then
fString = ReplaceQuotes(fString)
fString = extratags(fString)
end if
And second change added full function of ReplaceQuotes... So you can now user [quote="name"][/quote] as usage... Sorry no Italian here so you may change your words..
< |
squek |
Posted - 19 October 2005 : 03:02:37 Is there someone who can modify my files for me? I really can't find where I make something wrong... Here they are. http://www.hostfiles.org/files/20051019091123_squek.zip
Thanks in advance.< |
squek |
Posted - 14 October 2005 : 14:12:09 I surrender... I'm not able to modify it.< |
SiSL |
Posted - 14 October 2005 : 13:36:47 This was for inc_func_common.asp assuming you have did what Marcel said and this was kinda change of "function" marcelg wrote above.< |
squek |
Posted - 14 October 2005 : 13:31:22 Just, let me understand... this code works with the inc_func_common, inc_func_posting, post and inc_header as the ones I've modified in the first post? Really, I can't make it works even if I modified that red code...< |
SiSL |
Posted - 14 October 2005 : 13:11:57 Ok, I did a little bit more tricky than Marcel
Function ReplaceQuotes(ByVal strToFormat)
Dim oTag, c1Tag, c2Tag
Dim roTag, rc1Tag, rc12Tag, rc2Tag
Dim oTagPos, c1TagPos, oTagPos2, c1TagPos2
Dim Counter
Dim strArray, strArray2
Dim strFirstPart, strSecondPart
oTag = "[quote=" & chr(34)
c1Tag = chr(34) & "]"
'c2Tag = "[/quote]"
roTag = "<div class=""quoteboxhead""><b>"
rc1Tag = " quote:</b></div class=""quoteboxhead""><div class=""quotebox"">"
'rc2Tag = "</div id=""quotebox""">"
oTagPos = InStr(1, strToFormat, oTag, 1) 'Position of opening tag
c1TagPos = InStr(1, strToFormat, c1Tag, 1) 'Position of closing tag
'if opening tag and closing tag is found...
If (oTagpos > 0) And (c1TagPos > 0) Then
'Split string at the opening tag
strArray = Split(strToFormat, oTag, -1, 1)
'Loop through array
For Counter = 0 To UBound(strArray)
'if the closing tag is found in the string then...
If (InStr(1, strArray(Counter), c1Tag, 1) > 0) Then
'split string at the closing tag...
strArray2 = Split(strArray(Counter), c1Tag, -1, 1)
strArray2(0) = replace(strArray2(0), """", """) ' ## replace by entity equivalent
strArray2(0) = replace(strArray2(0), "(c)", "©", 1, -1, 1) ' ## replace by entity equivalent
strArray2(0) = replace(strArray2(0), "(r)", "®", 1, -1, 1) ' ## replace by entity equivalent
strArray2(0) = replace(strArray2(0), "(tm)", "™", 1, -1, 1) ' ## replace by entity equivalent
strArray2(0) = replace(strArray2(0), ">", ">", 1, -1, 1) ' ## replace by entity equivalent
strArray2(0) = replace(strArray2(0), "<", "<", 1, -1, 1) ' ## replace by entity equivalent
strArray2(0) = replace(strArray2(0), vbTab, " ", 1, -1, 1) ' ## filter out Tabs
strArray2(0) = replace(strArray2(0), "view-source", " ", 1, -1, 1) ' ## filter out view-source
strArray2(0) = replace(strArray2(0), "javascript", " ", 1, -1, 1) ' ## filter out javascript
strArray2(0) = replace(strArray2(0), "jscript", " ", 1, -1, 1) ' ## filter out jscript
strArray2(0) = replace(strArray2(0), "vbscript", " ", 1, -1, 1) ' ## filter out vbscript
'if the closing url tag is found in the string
If InStr(1, strArray2(1), c2Tag, 1) then
strFirstPart = Left(strArray2(1), InStr(1, strArray2(1), c2Tag, 1)-1)
strSecondPart = Right(strArray2(1), (Len(strArray2(1)) - Instr(1, strArray2(1), c2Tag,1) - len(c2Tag)+1))
ReplaceQuotes = ReplaceQuotes & roTag & "Quoted from : " & strArray2(0) & rc1Tag & strFirstPart & rc2Tag & strSecondPart
Else
ReplaceQuotes = ReplaceQuotes & roTag & "Quoted from : " & strArray2(0) & rc1Tag & strArray2(0) & rc2Tag & strArray2(1)
End If
Else
ReplaceQuotes = ReplaceQuotes & strArray(Counter)
End If
Next
Else
ReplaceQuotes = strToFormat
End If
ReplaceQuotes = Replace(Replace(ReplaceQuotes,"[/quote]","</div>"),"[quote]","<div class=""quoteboxhead""><b>quote:</b></div><div class=""quotebox"">")
End Function < |
squek |
Posted - 14 October 2005 : 11:37:32 It keeps calling back the old style...< |
SiSL |
Posted - 14 October 2005 : 11:11:21 quote: Originally posted by squek
quote: Originally posted by Shaggy
You'll need to modify the function that inserts the [quote] tags in inc_code.js as well.
How?
Click Here< |
|
|