Author |
Topic |
SiSL
Average Member
Turkey
671 Posts |
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.< |
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 12 December 2008 01:22:04 |
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 04 June 2008 : 21:41:25
|
I do believe that I've seen it done around here before - or at least I've seen some discussion on it.
Having said that, your solution does appear to be a bit more elegant than what I remember seeing.< |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 05 June 2008 : 02:10:25
|
Looks pretty clean and well documented! Nice work SiSL! This certainly looks like one I should implemented on oxle! < |
portfolio - linkshrinker - oxle - twitter |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 05 June 2008 : 03:10:00
|
I like it. I always ended up having to manually delete 95% of the quotes (when it was necessary for me to quote someone) so the message stayed readable. Maybe you should have called it "No More Nested Quotes".< |
Edited by - Carefree on 05 June 2008 03:10:54 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 05 June 2008 : 06:26:05
|
SiSL, it doesn't seem to work as I expected.
Imagine a post like this, with multiple quotes in the post: (between the *****'s)
***** You said this:quote: blablabla
And then you said this:quote: other bla
Remember? *****
If I hit the reply with quote button with this one, I still see this:
*****
quote: You said this:quote: blablabla
And then you said this:quote: other bla
Remember?
***** Eg. the quotes are not removed when there's more than one in R_MESSAGE...
Example: http://oxle.com/topic.asp?tid=5313 (demo/demo when prompted for a password)< |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 05 June 2008 06:40:03 |
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 05 June 2008 : 09:58:27
|
I removed the reply with quote icon looooong ago for this reason. Hell I had one member with over 250 posts or so and I couldn't find one of his post that didn't quote an entire post whether it already had multiples or not.< |
Switch the order of your title tags |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 05 June 2008 : 14:35:03
|
SiSL, I've been looking at it for a while now, but my understanding of RegExp's hasn't grown....it still looks jibberish to me. Do you have any idea?< |
portfolio - linkshrinker - oxle - twitter |
|
|
SiSL
Average Member
Turkey
671 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
phy1729
Average Member
USA
589 Posts |
Posted - 06 June 2008 : 00:25:13
|
Is the problem that when you have text1 quote: quote1
text2 quote: quote2
text3 text2 is cut out also? If so you need to use lazy operators. I.e. \[quote\][.]*?\[\/quote\] would match quote: quote1
or quote: quote2
not quote: quote1
text2 quote: quote2
Edit: Didn't mean for the quote tags to parse but I think the meaning is clear< |
Edited by - phy1729 on 06 June 2008 00:26:13 |
|
|
SiSL
Average Member
Turkey
671 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 08 June 2008 : 04:33:25
|
Still the same issue, SiSL.
quote:
quote: -------------------------------------------------------------------------------- you said quote: -------------------------------------------------------------------------------- Originally posted by Administrator
quote: -------------------------------------------------------------------------------- this is a test of nested quotes --------------------------------------------------------------------------------
--------------------------------------------------------------------------------
and I said .... --------------------------------------------------------------------------------
< |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
SiSL
Average Member
Turkey
671 Posts |
|
Topic |
|