Advertisement:

Author Topic: Selective Whole-Word Checking for Censor  (Read 2573 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,850
  • Mod King
    • XPtsp.com Community
Selective Whole-Word Checking for Censor
« on: March 22, 2016, 12:35:15 AM »
Link to Mod


SELECTIVE WHOLE WORD CENSOR v1.4
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 Beta 3, 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 - 2018, 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.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,850
  • Mod King
    • XPtsp.com Community
Re: Selective Whole-Word Checking for Censor
« Reply #1 on: March 23, 2016, 03:44:51 PM »
Uploaded v1.1 - March 23rd, 2016
o Added support for SMF 2.1 Beta 2.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,850
  • Mod King
    • XPtsp.com Community
Re: Selective Whole-Word Checking for Censor
« Reply #2 on: July 05, 2017, 10:56:47 PM »
Uploaded v1.2 - July 5th, 2017
o Added support for SMF 2.1 Beta 3.
o Removed support for SMF 2.1 Beta 2.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,850
  • Mod King
    • XPtsp.com Community
Re: Selective Whole-Word Checking for Censor
« Reply #3 on: October 25, 2018, 09:21:06 PM »
Uploaded v1.3 - October 23rd, 2018
o No functionality change.
o Updated documentation to point to new website.

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 2,560
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Selective Whole-Word Checking for Censor
« Reply #4 on: October 26, 2018, 09:16:57 AM »
As usual, I leave the translation to Spanish Latin :)


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


Ayudame via PayPal

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,850
  • Mod King
    • XPtsp.com Community
Re: Selective Whole-Word Checking for Censor
« Reply #5 on: November 09, 2018, 07:53:03 PM »
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!

Offline whoey

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Male
Re: Selective Whole-Word Checking for Censor
« Reply #6 on: November 13, 2018, 06:41:22 AM »
I get
Code: [Select]
$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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
Re: Selective Whole-Word Checking for Censor
« Reply #7 on: November 13, 2018, 06:57:47 AM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline whoey

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Male
Re: Selective Whole-Word Checking for Censor
« Reply #8 on: November 13, 2018, 07:00:21 AM »
yup, it's adding it after the closing ?>

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
Re: Selective Whole-Word Checking for Censor
« Reply #9 on: November 13, 2018, 07:18:07 AM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline whoey

  • Semi-Newbie
  • *
  • Posts: 69
  • Gender: Male
Re: Selective Whole-Word Checking for Censor
« Reply #10 on: November 14, 2018, 06:36:48 AM »
I think it may have been tapatalk.

anyways, fixed as mentioned.