Selective Whole-Word Checking for Censor

Started by dougiefresh, March 22, 2016, 12:35:15 AM

Previous topic - Next topic

dougiefresh

Link to Mod



SELECTIVE WHOLE WORD CENSOR v1.5
By Dougiefresh -> Link to Mod



Introduction
This mod changes the censor functionality of the forum so that the admin can choose whether a word is censored on a whole-word basis or a partial basis, since there are some words that should be filtered in every possible permutation, and other words that can be part of a regular, non-censored word (like, hypothetically, "danger").

Admin Settings
On the Admin -> Forum -> Posts and Topics -> Censored Words page, a checkbox is added beside each line to indicate whether the word specified is searched for on a whole-word basis or not.

Related Discussion
o Selective Whole-Word Checking for Censor

Compatibility Notes
This mod was tested on SMF 2.0.11 and 2.1 RC2, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported. 

Changelog
The changelog can be viewed at XPtsp.com.

License
Copyright (c) 2016 - 2019, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

dougiefresh

Uploaded v1.1 - March 23rd, 2016
o Added support for SMF 2.1 Beta 2.

dougiefresh

Uploaded v1.2 - July 5th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 2.

dougiefresh

Uploaded v1.3 - October 23rd, 2018
o No functionality change.
o Updated documentation to point to new website.

-Rock Lee-

As usual, I leave the translation to Spanish Latin :)


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.4 - November 9th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee!




@Rock Lee:  Thank you for the translation!  It's been included in this version!

whoey

I get
$txt['admin_censored_checkbox'] = 'Tick the checkbox in order to check the whole word.';
at the top of any pages of the admin section, usually twice, sometimes four in a row.

SMF 2.0.15, tried several different themes and same on all (including curve) we have our language set to English-utf8

Arantor

That implies you have a different mod that broke your Modifications.english.php and its UTF-8 counterpart.

Edit these files and make sure the last ?> is at the very end of the file on its own line.
Holder of controversial views, all of which my own.


whoey


Arantor

That's because the last mod you added broke it by doing it wrong. Edit the file and move the ?> so there's only one and it's at the end of the file and everything will work correctly.
Holder of controversial views, all of which my own.


whoey

I think it may have been tapatalk.

anyways, fixed as mentioned.

shadav

just wanted to say thanks.... word censor was being a bit stupid and editing out parts that were inside other words
I used whole word only but even that wasn't working quite right.... I think this will work better that I can pick and choose which words to use whole word only for

Advertisement: