Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 No more Nested quotes

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
SiSL Posted - 04 June 2008 : 19:00:49
Ok been long time since I've had with the mods, here is my little mod (I'm not sure if it has been made before)

NMNQ MOD 1.0

This mod removes internal quotes of a quoted post. In other words, when you quote a message that has quoted another, you won't get previously quoted message inside, therefor removes cluttering chain quotes (ofcourse if done on purpose that's whole another reason)

Download: No More Nested Quotes

INSTALL

It is very simple process really. Two files modified.

inc_func_posting.asp

Find following line:
function CleanCode(fString)


around line 88 and above this line add following:

Function CleanQuotes(fString)
	if fString <> "" AND IsNull(fstring) = False Then
		set re = new RegExp
		re.pattern = "\[quote(?:(?!\[quote)([\s\S]))+?(\[/quote\]\n\r|\[/quote]\n|\[/quote])"
		re.ignorecase = true
		re.global = true

		set matches = re.execute(fstring) 
		totalMatches =  matches.count
		if totalMatches <> 0 Then
			Do While totalMatches <> 0
				For each match in matches
					fstring = re.Replace(fstring,"")
				Next
				if totalMatches = 0 Then
					Exit Do
				End If
				set matches = re.execute(fString)
				totalMatches =  matches.count 	
			Loop	
		End If
		set matches = nothing
		set re=nothing
	
		CleanQuotes = fstring
	Else
		CleanQuotes = fstring
	End If
End Function


Done with the inc_func_posting.asp...

post.asp

now open post.asp Find following line around Line 328:

TxtMsg = TxtMsg & "[br]" & rs("R_MESSAGE") & vbNewline


Replace it with following:

TxtMsg = TxtMsg & "[br]" & CleanQuotes(rs("R_MESSAGE")) & vbNewline



Following change is OPTIONAL. Generally topics are not quoted, but may be quote stuff inside, so you may not add it if you find it necessary or not. But here it goes: Find following line around line 355 :

TxtMsg = TxtMsg & "[br]" & rs("T_MESSAGE") & vbNewline


Replace it with following :

TxtMsg = TxtMsg & "[br]" & CleanQuotes(rs("T_MESSAGE")) & vbNewline



And voila ;) Now you won't get anymore annoying quote in quote in quote in quote over and over...

http://www.chip.com.tr/forum

Credits: Thanks to Carefree for taking risks to test this piece of code and preparing the file for download and MarcelG for all previous tries.<
15   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 12 December 2008 : 20:23:34
Any time<
SiSL Posted - 12 December 2008 : 00:44:50
Hey Thanks for trying it out! :)

Glad it worked this time and FINALLY and thanks for the installation file, I really suck at preparing those :)
<
Carefree Posted - 11 December 2008 : 22:31:50
Didn't realize you'd updated it again. I installed the new version and ... it works. Each new quote (reply) only uses the latest reply in the quotation, everything else is stripped off.

WTG<
SiSL Posted - 09 December 2008 : 20:25:32
And final change should deal with "Quotes can also have line-breaks" problem... Along with dealing with leftover Quote breaks often done by users...

Now I should do same with [code] tags so they don't remove forum codes.<
bobby131313 Posted - 09 December 2008 : 18:02:54
quote:
Having said that, your solution does appear to be a bit more elegant than what I remember seeing.


I just removed the button. <
Carefree Posted - 09 December 2008 : 17:56:12
Well, here's how it looks:
quote:
quote :
Originally posted by Craig


quote :
Originally posted by Craig


quote :
Originally posted by PhillyVet


Hello everyone. Welcome to this new and creative website for pros and beginners. Staff here will be available and are very friendly. Watchout for the big man.



Let's see if this fixes nested quotes.

Cross your fingers, everyone.


Each double-space, etc.; is from a different quotation. It didn't change anything on my end.<
SiSL Posted - 09 December 2008 : 17:38:31
There is no link, just the first post without any files. May be I should just make it HTML and put to SnitzBitz as well..<
Carefree Posted - 09 December 2008 : 17:37:20
I'll test it as soon as you provide a link to the mod.<
SiSL Posted - 09 December 2008 : 16:43:24
Alright, time for yet-another-public test :)

Replaced original function... Did not wanted to go into Do-Loop however, this came to mind with a shining idea after ages... So wanted you guys to re-test

Now function works as following:

Takes anything matches [quote]...[/quote] pattern where there is no "[quote" between... So repeats until there is no quote left to clean... You can change to "<br>" or something if you like in the replace part.
<
MarcelG Posted - 09 June 2008 : 03:44:07
Yep, I'm replacing the entire fuction each time (however, I am replacinng your "<br id='quote' />" with "[cq]" (a custom forumcode meant for cleaned quote.)<
SiSL Posted - 08 June 2008 : 17:09:05
/sigh..

May be I should check with un-modded version. Thanks guys, I'll let you know. (Hope you are changing entire function, not the lines btw :p)<
Carefree Posted - 08 June 2008 : 17:05:28
Doesn't work here, either. No change from the original behaviour.<
MarcelG Posted - 08 June 2008 : 15:14:50
That's strange indeed....<
SiSL Posted - 08 June 2008 : 15:01:46
Interestingly it works at me, not sure why it does at you, double checked here...<
MarcelG Posted - 08 June 2008 : 12:24:08
The two quotes part works now, but no longer if they're nested : when quoting a quote with one quote in it, the outer quote isn't replaced : http://oxle.com/topic.asp?tid=5316#44221
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07