PDA

View Full Version : Filter question



Invent
13-10-2007, 09:48 PM
Hey,

On my panel (news panel) there is a word filtering tool.

Now what I'm wondering is, what would people prefer. When someone uses a filtered word in a post should the filtered word be inserted into the database and not it's replacement.

So like if the replacement of 'fuc*' was '****', would you like 'fuc*' to be inserted into the DB (mySQL) or it's replacement, being '****'.

Then on the show_news page the word would be filtered there.

This would mean, if the word is unfiltered later it won't show up as **** even though the word isn't filtered.

Would you like the above to happen OR would you like '****' to be inserted into the DB instead of the word.

Thanks if you understand!
-Simon

Florx
13-10-2007, 10:07 PM
Unfiltered into database, clean on parse.

This gives the user a choice on filtering or not :)

Invent
13-10-2007, 10:13 PM
Thanks.

I've decided to filter on the show_news page and there is a variable at the top to define if you want filtering or not (:

Florx
13-10-2007, 10:14 PM
No problem, how is it going anyway?

Invent
13-10-2007, 10:29 PM
YANS is going very well actually!

I've completed the basics of post/edit/delete news. I've done the show news page & filtering system. (:

Florx
13-10-2007, 10:51 PM
I wish you the very best of luck with it :)

Jamie.
14-10-2007, 07:34 AM
The only problem of filtering it on the news page if you was to set up an rss feed it wouldn't be filtered unless you were to do it on that page also it may be easier doing it on the database to save excess coding I would say.

Invent
14-10-2007, 11:47 AM
The only problem of filtering it on the news page if you was to set up an rss feed it wouldn't be filtered unless you were to do it on that page also it may be easier doing it on the database to save excess coding I would say.The RSS feed is ran through a php script, so yes, it would be filtered. Also it's not excess coding as it's just running the same function on a different page :S

Dentafrice,
14-10-2007, 12:31 PM
Why not filter on insert? Have a setting to see if its right, otherwise if a person has a high number of news & traffic, speed will be an issue too, because calling on the parser too often will just be crazy.

Parsing on post would be better. Insert word & replacement into database is my idea like:

examples:

word: beans
replacement: fart

word: bob
replacement: ***

you can have any replacement you want, but the default is stars.

Florx
14-10-2007, 01:16 PM
If it was filtered on insert, and the site owner wants to change the rules about filtering e.g. another word is added to the filter database, then he would have to go through the whole database and edit it. OR filter on output.

Luckyrare
14-10-2007, 03:12 PM
I would do it on insert for user speed & bandwidth usage.

Jamie.
14-10-2007, 03:37 PM
If it was filtered on insert, and the site owner wants to change the rules about filtering e.g. another word is added to the filter database, then he would have to go through the whole database and edit it. OR filter on output.

No I would imagine if he was to use this idea then there would be an option to filter it or not then it would just skip that piece of coding without filtering ;)

Want to hide these adverts? Register an account for free!