The MU forums have moved to WordPress.org

Word Filter (15 posts)

  1. Ryan524
    Member
    Posted 16 years ago #

    I have done a search but have not found this. I need a word filter for my blogs to ensure everything stays family friendly.

  2. lunabyte
    Member
    Posted 16 years ago #

    There may be a WP plugin for it, if not you can hook into the filter for the_content, the_excerpt, etc. and do a string replace from an array.

  3. Ryan524
    Member
    Posted 16 years ago #

    wow...see I barley know enough PHP to get me though editing my tamplate, even that took some time to figure out. I think arrays might be a bit beyond me unfortunatley. I would really like to see an extension like this but my search came up woth nothing. Sure other blogs could find it useful as well.

    Let me know if you know of any otherwise, I will have to look into other options. Thanks for your help though.

  4. MrBrian
    Member
    Posted 16 years ago #

    Learn or fork out money. Nobody fixes my car or does my dentist work just because i don't know how. Something like this is really easy but i don't have time to do it.

    This is some code i used on one of my websites to check for badwords(excuse the badwords lol):
    $badwords = array('shit', 'sh!t', 'fuck', 'fuuck', 'bitch', 'cunt', 'cock', 'faggot',
    'fukyou', 'douche', 'admin', 'goddamn', 'pissant', 'nigger', 'nugga',
    'prick', 'bastard', 'gaylord', 'asshole', 'dickhead', 'dumbass', 'sh1t',
    'dickhead', 'cumhole', 'b1tch' );

    function contains_badword($content)
    {
    global $badwords;
    $content = str_replace("_", "", $content);
    foreach ($badwords as $bword)
    {
    if (stristr($content, $bword)) {
    return true;
    break;
    }
    }
    return false;
    }

  5. theapparatus
    Member
    Posted 16 years ago #

    Take a look at the wordpress wikipedia nofollow plugin (I don't have a link handy) for an example of one method of doing this.

  6. Ryan524
    Member
    Posted 16 years ago #

    @MrBrian it really is too bad that nobody fixes your car or does your dentist work just because you don't know how, but nobady cares either. If you want to be rude, please go somewhere else to do it. Thanks.

  7. lunabyte
    Member
    Posted 16 years ago #

    Damn there, uh, ryan.

    While you may think it was rude, but he was pretty much spot on. Then wow, he was so rude he also floated you the code to get started with.

    But hey, way to step up and say thanks for the help.

  8. lunabyteass-
    Blocked
    Posted 16 years ago #

    [Childish behaviour removed - Mark]

  9. lunabyte
    Member
    Posted 16 years ago #

    ^^^

    If you have something to say, quit hiding, sack up, and be a man.

  10. lunabyteass-
    Blocked
    Posted 16 years ago #

    [Childish behaviour removed - Mark]

  11. andrea_r
    Moderator
    Posted 16 years ago #

    Ryan, you would't ask your dentist or mechanic to work for free. Mrbrian did the work for you. you *will* have to learn some new skills to run an MU site, and we won't always be here to help. On top of that, we're all volunteeres here, so your rudeness towards those helping your multiple questions with easy to find answers may lead to a complete lack of response next time around.

  12. MrBrian
    Member
    Posted 16 years ago #

    Ryan, if you want to be ignorant and rude to the people that take time out of their day to reply to you, take your questions elsewhere. I gave you my own code that demonstrated what you needed and simply told you to learn or pay someone, because those were your options. If you gave me reason to write the plugin or showed that you tried in the slightest initiative to learn, i might even have done it for you.

  13. Trent
    Member
    Posted 16 years ago #

    You know this would be a wicked plugin to appy sitewide or just an option for users to add if they want a "PG" blog. Personally would love to put this into a plugin. Mr. Brian has something going there with that function ;)

    Trent

  14. DailyTestimony
    Member
    Posted 16 years ago #

    Yeah, I think this is a good idea as well, I know I would use it. Perhaps I'll try to put something together.

  15. andrea_r
    Moderator
    Posted 16 years ago #

    Agreed - MrBrian, good job there. :)

About this Topic

  • Started 16 years ago by Ryan524
  • Latest reply from andrea_r