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/Code)
 Css quote (Italian version based on MarcelG mod)
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

squek
Starting Member

25 Posts

Posted - 13 October 2005 :  13:56:34  Show Profile  Reply with Quote
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!



Edited by - squek on 13 October 2005 16:50:13

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 13 October 2005 :  15:21:28  Show Profile  Visit MarcelG's Homepage  Reply with Quote
squek, excuse me for saying this, but this code is the EXACT code I used in my mod, of mid last year.
The QuoteTD, QuoteTD2 and QuoteText are the same style classes used for 'my' quote code, and almost the entire how-to is the same as my post on this.
Except, your how to refers to the 'Italian' version.

I'm not entirely sure what point you are trying to make with this 'new mod', especially since I updated my own mod 6 days ago, to use DIV's instead of these TD's (which, as I said, were used in my first version of this mod.)
I know that this piece of software is open source, but posting a mod made by someone else as your own - even one as simple as this one - is kind of....strange.

The last part of your post - the question - is also not entirely clear to me. What are you trying to do ?<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 13 October 2005 15:30:37
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 13 October 2005 :  16:15:13  Show Profile  Reply with Quote
quote:
Originally posted by MarcelG

squek, excuse me for saying this, but this code is the EXACT code I used in my mod, of mid last year.
The QuoteTD, QuoteTD2 and QuoteText are the same style classes used for 'my' quote code, and almost the entire how-to is the same as my post on this.
Except, your how to refers to the 'Italian' version.

I'm not entirely sure what point you are trying to make with this 'new mod', especially since I updated my own mod 6 days ago, to use DIV's instead of these TD's (which, as I said, were used in my first version of this mod.)
I know that this piece of software is open source, but posting a mod made by someone else as your own - even one as simple as this one - is kind of....strange.


I'm very sorry Marcel, I really don't know if Plasma took the css from your mod.
We started from the idea of trying to replicate the phpBB quoting style, but honestly I don't know where he took the original css we modified.

Please, trust me...
I wrote the howto referring to the changes we've done, I didn't copy your howto, I've seen it for the first time now that you gave me the link...

Anyway, I'm really very sorry and I'll edit the credits in the forums where I've posted it.

Does your css look exactly as this?




quote:
The last part of your post - the question - is also not entirely clear to me. What are you trying to do ?

That's probably because my english is so poor...
I'll try to explain it better.

Well, in phpBB bullettin when you quote someone else's post clicking on the replyquote button you have this forum code in the posting window:




I was wondering if it is possible to have the same forum code in snitz, because if I use the mod above (YOUR mod, at least...) I have this forum code in the posting window:

[*quote][*b]Guy wrote[*/b][*br]His message[*/quote] And here you write your message....


And very often the users of my forum (most of them are newbies...) delete part of the code accidentally when they answer, probably because there's all that b, /b, br which are not so simple to understand for someone who is not so familiar with bullettins.

Also, the string that says "Guy wrote" in phpBB is outside the quoted text, vertically aligned to it and in the same size, as the image I've added above (that's is particulary pratical when you have a multi quoted message, because it appears simpler who is quoting who).

That's all, I was only wondering if there's a way to obtain this.


P.S.: I've edited my post here and on OneWayMule with the correct credits for the mod. Sorry again.
<

Edited by - squek on 13 October 2005 16:28:54
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 October 2005 :  07:37:45  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Thank you for straightening this out.

I've looked into your request, but I think it's a big challenge to make that....at least, the way you want it to look like.
I guess it would be doable if using a rather clever trick...a rather very clever trick.

Let me see what I can come up with.<

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 October 2005 :  07:54:31  Show Profile  Visit MarcelG's Homepage  Reply with Quote
Done.
Okay, not with the [quote="bla"][/quote] tag, and not with this version of the CSS quote mod, but with the [quote='bla'][/quote] tag (single quotes instead of double quotes), and based on my CSS quote DIV's mod of a week ago. I've hightlighted the appropriate things to change, in case you want to adapt it to your current table-layout quotestyle.

Copy this function into inc_func_common.asp:
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='"
	c1Tag = "']"
	c2Tag = "[/quote]"

	roTag = "<div class=""quoteboxhead"">"
	rc1Tag = " ha scritto</div><div class=""quotebox"">"
	rc2Tag = "</div>"

	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 & strArray2(0) & rc1Tag & strFirstPart & rc2Tag & strSecondPart
				Else
					ReplaceQuotes = ReplaceQuotes & roTag & strArray2(0) & rc1Tag & strArray2(0) & rc2Tag & strArray2(1)
				End If
			Else
				ReplaceQuotes = ReplaceQuotes & strArray(Counter)
			End If
		Next
	Else
		ReplaceQuotes = strToFormat
	End If
End Function

(it might be that the code function here at Snitz has garbled the function.
So, to be sure, check the function at the source (login demo/demo))

Find this line in inc_func_common.asp :
fString = extratags(fString)

Directly above it put the following line:
fString = ReplaceQuotes(fString)


That's it.<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 14 October 2005 07:55:03
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 14 October 2005 :  09:23:51  Show Profile  Reply with Quote
Wow, thanks!
Uhm... I've copied the code exactly as you said, but if I copy
fString = ReplaceQuotes(fString)


above this:
fString = extratags(fString)


I get this:
if strAllowForumCode = "1" then
		fString = ReplaceQuotes(fString)
		fString = extratags(fString)
	end if

Is it right?

Now I have to modify the css I'm usig with your new one with the DIVs, right?<
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 14 October 2005 :  10:01:41  Show Profile  Reply with Quote
Uhm... I've modified the red code as this:
	roTag = "<td class=""quotetd"">"
	rc1Tag = " ha scritto: </td><td class=""quotetd2"">"
	rc2Tag = "</td>"


To use it with the td css... but I'm still getting the same forum code as before...<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 14 October 2005 :  10:26:45  Show Profile  Visit SiSL's Homepage  Reply with Quote
Below might work with quote tags :)


	oTag = "[quote=" & chr(34)
	c1Tag = chr(34) & "]"
	c2Tag = "[/quote]"
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 October 2005 :  10:34:23  Show Profile  Reply with Quote
You'll need to modify the function that inserts the [quote] tags in inc_code.js as well.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 14 October 2005 :  10:40:06  Show Profile  Reply with Quote
So I have to replace this:
oTag = "[quote='"
	c1Tag = "']"
	c2Tag = "[/quote]"

with this:
oTag = "[quote=" & chr(34)
	c1Tag = chr(34) & "]"
	c2Tag = "[/quote]"


Still getting the same forum code...[*quote][*b]Daniele ha scritto:[*/b][*br]....[*/quote]<
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 14 October 2005 :  10:43:08  Show Profile  Reply with Quote
quote:
Originally posted by Shaggy

You'll need to modify the function that inserts the [quote] tags in inc_code.js as well.




How?<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 14 October 2005 :  11:05:39  Show Profile  Visit SiSL's Homepage  Reply with Quote
But that also makes problem at double quotes such as quote inside quotes.<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 14 October 2005 :  11:11:21  Show Profile  Visit SiSL's Homepage  Reply with Quote
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<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 14 October 2005 11:13:30
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 14 October 2005 :  11:37:32  Show Profile  Reply with Quote
It keeps calling back the old style...<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 14 October 2005 :  13:11:57  Show Profile  Visit SiSL's Homepage  Reply with Quote
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
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

squek
Starting Member

25 Posts

Posted - 14 October 2005 :  13:31:22  Show Profile  Reply with Quote
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...<
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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07