![]() |
Preventing !!!!!!! ???????
Is there any way to knock out multiple punctuation like this??????????????
Damn, I hate posts like this!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Or sentences ~~~~~~~~~~~~~~ full of this. |
Of course. Use:
$searcharray = array("/([!]*)/si", "/([?]*)/si", "/([~]*)/si"); $replacearray = array("!", "?", "~"); $txt = preg_replace($searcharray, $replacearray, $txt); |
Thank you for the tools! I'll see if I can apply them properly. :)
I would presume that functions_newpost.php would be a likely place to insert this. Picking the right spot might be tricky. |
In functions_bbcodeparse, find:
PHP Code:
PHP Code:
|
Text entered:
Title: This is a test!!! Results: ~?~!~?~T~?~!~?~h~?~!~?~i~?~!~?~s~?~!~?~ ~?~!~?~i~?~!~?~s~?~!~?~ ~?~!~?~a~?~!~?~ ~?~!~?~t~?~!~?~e~?~!~?~s~?~!~?~t~?~!~?~.~?~!~?~ ~?~!~?~ ~?~!~?~!~?~ ~?~!~?~?~!~?~?~!~?~?~!~?~?~!~?~?~!~?~?~!~?~ ~?~!~?~~?~!~?~~?~!~?~~?~!~?~~?~!~?~~?~!~?~~?~!~?~ If you really look inside the above string, you'll see: This is a test!!! For some reason, it comes back with a string like the above. |
My code is not supposed to parse those complicated strings of yours.
It is supposed to eliminate "!!!!!!!!!", "??????????" and "~~~~~~~~"... |
Moved to vB3
|
This should fix the problem, find inside functions_bbcodeparse.php:
PHP Code:
PHP Code:
After testing the string: Quote:
Quote:
- Zero Tolerance |
Excellent! Thank you Dark Visor and Zero Tolerance!
|
What file(s) should I modify in 3.6.5 to have this work?
|
All times are GMT. The time now is 02:06 AM. |
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:
|