NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is ten + six?

Go back

Topic review (newest first)

isaac-sul
04-01-2011 23:07:04

You should try plugging in your own parser. You will be able to parse each entry of the text you will let pass through. Use regular expressions so that you could draw patterns and be able to filter words you would not like to appear. With that also, you will be able to tokenize each word and do whatever you want with it.

claws
03-09-2011 23:48:19

Thank you so much!!
edit:
Where exactly should I plug this in?

Waccoon
03-09-2011 20:50:17

You can get yourself into a lot of trouble if you don't do it right, but it's fairly easy.

The simplest method is to use str_ireplace(), though maintaining capitalization and dealing with spaces requires more complex techniques, which are definitely not for newbies.  wink

Code:

$search  = array(
    'wolf', 'become',    'Firefox'
);
$replace = array(
    'cat',  'digivolve', 'Telnet'
);

$comment = str_ireplace ($search, $replace, $comment);
claws
03-09-2011 13:38:16

Hi,  I was wondering if there's a way to add a wordfilter to an oekaki. I'm a noob at PHP but dug up a few wordfilter tuts, made a wordfilter file and tried to include it in index.php and comment.php to no avail |D
I also tried hacking the smileys, but then the filtered words showed up along with the images, which would totally give the filter away (I'm thinking about using it for humor, like filtering "wolf" into "cat", "become" into "digivolve" etc)

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB