Quote:
domineaux wrote:
Filter will never do a complete job. Use filter for the most offensive words, usually about nine at most. You can stop the others with a PM or email message. Last resort IP ban.
Going through every posting is nonsense. If the poster is reported pop off a quick message and put the poster on notice. Really, it's not a big deal, if the poster wants to be a part of the community compliance will not be a problem. Otherwise, who needs'em.
No one mentioned about going throu each post?
Yes there is a way to have each post filtered. This can be done by adding an extra line when extracting the post information or when saving the post to a database. $myts has a function called 'censorString' and the words you wish to ban can be entered in XOOPS Admin.
But as far as I can see, this already been implemented in NewBB anyway.
If you want to expand this further, by filtering posts already written, open newbb/class/forumposts.php and change the function at line 238:
function getPost($id) {
$sql = 'SELECT p.*, t.post_text, tp.topic_status FROM '.$this->db->prefix('bb_posts').' p LEFT JOIN '.$this->db->prefix('bb_posts_text').' t ON p.post_id=t.post_id LEFT JOIN '.$this->db->prefix('bb_topics').' tp ON tp.topic_id=p.topic_id WHERE p.post_id='.$id;
$array = $this->db->fetchArray($this->db->query($sql));
$this->post_id = $array['post_id'];
$this->pid = $array['pid'];
$this->topic_id = $array['topic_id'];
$this->forum_id = $array['forum_id'];
$this->post_time = $array['post_time'];
$this->uid = $array['uid'];
$this->poster_ip = $array['poster_ip'];
$this->subject = $array['subject'];
$this->nohtml = $array['nohtml'];
$this->nosmiley = $array['nosmiley'];
$this->icon = $array['icon'];
$this->attachsig = $array['attachsig'];
$this->post_text = $array['post_text'];
if ($array['pid'] == 0) {
$this->istopic = true;
}
if ($array['topic_status'] == 1) {
$this->islocked = true;
}
}
to
function getPost($id) {
global $myts;
$sql = 'SELECT p.*, t.post_text, tp.topic_status FROM '.$this->db->prefix('bb_posts').' p LEFT JOIN '.$this->db->prefix('bb_posts_text').' t ON p.post_id=t.post_id LEFT JOIN '.$this->db->prefix('bb_topics').' tp ON tp.topic_id=p.topic_id WHERE p.post_id='.$id;
$array = $this->db->fetchArray($this->db->query($sql));
$this->post_id = $array['post_id'];
$this->pid = $array['pid'];
$this->topic_id = $array['topic_id'];
$this->forum_id = $array['forum_id'];
$this->post_time = $array['post_time'];
$this->uid = $array['uid'];
$this->poster_ip = $array['poster_ip'];
$this->subject = $array['subject'];
$this->nohtml = $array['nohtml'];
$this->nosmiley = $array['nosmiley'];
$this->icon = $array['icon'];
$this->attachsig = $array['attachsig'];
$this->post_text = $myts->censorString($array['post_text']);
if ($array['pid'] == 0) {
$this->istopic = true;
}
if ($array['topic_status'] == 1) {
$this->islocked = true;
}
}
Remember this will put a very small overhead on the forum.
But it may help some.