i add shout box plugin on my site
http://www.boshver.com
but some visitors write bad words here. How can i block this words...
thanx
swearing :(
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: swearing :(
That plugin does not support any "bad word" filtering, so one would need to edit the plugin file for that, to support it...
Best regards,
Garvin
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
i search the forum and i found this post in http://www.s9y.org/forums/viewtopic.php ... light=word
but i cant understand anyhing
but i cant understand anyhing
Code: Select all
This is what I have done on my shoutbox: find the first appearance of the following code:
Code:
serendipity_db_query($sql);
Then replace it with the following:
Code:
# The following codes were added by Wenjun Lu
# on the 6th of May, 2005. Purpose is to filter
# out messages that contain bad words.
if(!(
ereg('poker', $sql) ||
ereg('fuck', $sql)
))
{
# End of edit.
serendipity_db_query($sql);
# The following codes were added by Wenjun Lu
# on the 6th of May, 2005.
}
# End of edit.
Only need to replace the first "serendipity_db_query($sql);" not the second one. Hope this helps.
Regards,
Wenjun-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
What do you not understand? It is a very simple replacement. 
You must add the lines of text that you want to block in a structure like this:
So you need to always copy the ereg(...) || onto the next line. The last ereg line must not have a "||" separator. Put the words you want to block within the single quotes, like use 'swearword' instead of 'poker2' and so on.
Regards,
Garvin
You must add the lines of text that you want to block in a structure like this:
Code: Select all
if(!(
ereg('poker', $sql) ||
ereg('poker2', $sql) ||
ereg('poker4', $sql) ||
ereg('poker5', $sql) ||
ereg('poker6', $sql) ||
ereg('poker7', $sql) ||
ereg('fuck', $sql)
))
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/