[Logo] JForum - Powering Communities
  [Search] 搜尋   [Recent Topics] 最新主題   [Hottest Topics] 熱門主題   [Top Downloads] 熱門下載   [Groups] 回首頁 
[Register] 會員註冊 /  [Login] 登入 


JForum 2.8.3 is out with various fixes and improvements. Read all about it here

Bad / Censored word list RSS feed
討論區首頁 » User Forum
發表人 內容
al


註冊時間: 2011/12/7
文章: 1
離線

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


註冊時間: 2011/11/29
文章: 6
離線
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.
 
討論區首頁 » User Forum
前往:   
行動版
Powered by JForum 2.8.3 © 2023 JForum Team • Maintained by Andowson Chang and Ulf Dittmer