[Logo] JForum - Powering Communities
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


The final version of JForum 2.8.0 has been released with lots of improvements. Read all about it here

Bad / Censored word list RSS feed
Forum Index » User Forum
Author Message
al


Joined: 2011/12/7
Messages: 1
Offline

I was wondering if anyone has incorporated "bad word" functionality.
Ie. A kind of regex replacement ie. someone posts "sh#t" and the offending term is automatically
removed from the post.


The following will work IF any additional bbcode is inserted into the post.

How i do call the bb_config regardless of additional bbcode or not?????



<!-- Badword -->

<match name="BadWord">
<regex>HorribleWord</regex>
<replace>
<![CDATA[
<div style='color:red;'>Word replaced</div>
]]>
</replace>
</match>
cloph


Joined: 2011/11/29
Messages: 6
Offline
I'd flag the expression with
alwaysProcess="true"
and change PostCommon.java so that the method parseDefaultRequiredBBCode is always applied, i.e. move
text = parseDefaultRequiredBBCode(text);
from prepareTextForDisplayExceptCodeTag to the preparePostForDisplay as
post.setText(parseDefaultRequiredBBCode(post.getText()));


To me it also seems like a mistake/at least it is unintuitive that there is a "alwaysProcess" flag and method that contains "requiredBBCode" - but then it is not always applied.

That being said: Note that with the bbparser, the badword will still be stored to the database.
 
Forum Index » User Forum
Go to:   
Mobile view
Powered by JForum 2.8.0-b1 © 2021 JForum Team • Maintained by Andowson Chang and Ulf Dittmer