![]() |
Remove Extra Quotes From PMs
Heres a quickie hack that will remove any extra quotes from PMs when you reply to them.
It will save you (and your users) time from deleting them yourself and also reduce the size of your PM Db :D Example: Quote:
Quote:
PHP Code:
PHP Code:
Enjoy! Raz |
It took out ALL of the quotes. Can it leave just the last one when you reply to the message? Also, it placed a W] inside the quote that was there but nothing else.
|
Yes, I have to also agree with Boofo, just leaving the last QUOTE is the best method :D
I hate those annoying quotes having to delete them, so this is a good idea with the small change. |
Umm...did you follow the code *exactly* as I said? i.e. place the new code *above* the eval code?
I've tested it out on my own forums and is working great. |
Hmm, shouldn't the code be...
Code:
$message['message'] = trim(preg_replace('~\[quote\](.*)\[/quote\]~si', '', $message['message'])); |
Thanks, Chen, you have once again proven yourself worthy to be called the MASTER! That worked great! And it only leaves the current quote.
Sincerely, Grasshopper Quote:
|
*sigh* That is what I tried to post, but alas was parsed incorrectly...
[edit] Yup, the "stupid" board strips out any slashes from code. |
Can't you just attach it as a text file attachment? :) Or just use the [disable][disable][/disable][/disable] tags.
Quote:
|
nice hack Raz.. it is small but useful :)
|
Quote:
Just used a \\\\[ to get a \[ :rolleyes: |
All times are GMT. The time now is 01:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|