Hi,
I regularly use the Censored words function to do several things in addition to its obvious intended use.
I find it particularly useful for correcting typos, spelling mistakes, punctuation, grammar and adding acronyms etc. without having to edit member's posts.
Here are a few examples:
Censored word Replacement word reccomend = > recommend
dont = > don't
_alan_ = > _Alan_
(underscores used to indicate spaces) _i_ = > _I_
(underscores used to indicate spaces) BMS = >
BMSUnfortunately, if I enter a Censored word using leading and trailing spaces, it works fine until I reuse the Censored word function again, as the spaces on all of the words in the censored words are lost
(but they are still present in the replacement words).
This means that I have to manually replace all the missing leading and trailing spaces every time I add a new word and save it, as failure to do so messes up the whole forum as
every lower case "i" is replaced by an upper case " I "
(with leading and trailing spaces).
And th I s -I s the un I ntent I onal result.
Although "alan" changes to " Alan ", "Valantino" now becomes "V Alan t I no". :o
If I were to try to censor the word "tit" with "breast" without using spaces, it would also change words like stitch and altitude into sbreastch and albreastude. ::)
The spaces in some censored words
need to be added, therefore I would be very handy if these spaces were saved
and re-displayed correctly like the spaces in the replacement words are.
I have tried using quotes to help define the spaces but this doesn't work.
Is there an easy way to automatically save the leading and trailing spaces on censored words each time that would stop them from disappearing and having to be added manually every time?
I look forward to any useful suggestions that might help me to overcome this minor problem.
Alan
There is no easy way to do this because it simply isn't meant to be used in this way, though you might have some luck with the "only match full words" option.
Unless people turn off the censor....
It would be better for you to just do a direct replace in the database smf_messages table rather than misusing the censor feature
Quote from: Kindred on August 11, 2017, 07:41:53 PMUnless people turn off the censor....
Can the censoring be turned off by forum users? :-\
Quote from: Kindred on August 11, 2017, 07:41:53 PMIt would be better for you to just do a direct replace in the database smf_messages table rather than misusing the censor feature
I don't have direct access to the server files as it is not my forum, so modifying the database smf_messages table is not something I would consider messing around with even if I could. ;)
Alan
By default, yes... forum users can disable the censor in their forum settings/profile
Quote from: Kindred on August 12, 2017, 05:27:08 PM
By default, yes... forum users can disable the censor in their forum settings/profile
that is only if the feature is enabled to allow it.