Added: 3 years ago
From: phpacademy
Views: 7,824
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (23)

Sign In or Sign Up now to post a comment!
  • Thanks

  • Alex: "If shit is found"

    PHP: "I've found tons"

  • Thanks a lot Alex. I used this technique to convert text emoticons into image tags with the appropriate image for my guestbook and blog. Keep up the awesome work!

  • #LOL

  • The video player turned black when I had my filter on!

    That's not swearing, That's Racism!

  • Replaced Bloody with blood. Shit with spill.

    I don't give a blood spill!

  • the problem with this swear filter is that it will filter out words from the array that appear within other words. For example if you design your filter to replace "Cock" with "Cockerel" then the word peacock will be changed to "peacockerel", which obviously is not the desired effect. There must be a way to replace only whole words.

  • Another GREAT tutorial, i use the example to replace smiles with images.

  • *Good

  • Google explanation, thanks.

  • thanks good tutorial is it possible to change the arrays to text documents? lets say sweararray will look for swear.txt (text doc with swear words in) and replacearray will look for replace.txt (text doc with replacements) IS THIS POSSIBLE? thx

  • If you don't want to replace the bad word with specific text (but just general text i.e. XxXxX for all bad words) is there a shorter code to do? I came across this but it has errors in the ereg() replace:

    ?php

    $bad_words = explode('\|', 'badword1|badword2|etc');

    foreach ($bad_words as $naughty)

    {

    $comments = eregi_replace($naughty, "XxXxX", $bad_words);

    }

    ?

  • watching this video witht the transcribe audio feature is quite funny!

  • there is a function in php where you can have the array point like

    "shit" -> "sh*t"

    too lazy to explain.

    and you can use ucfirst(); which captialises the first letter

  • Fuck man, can you take the filter off of youtube? This new swear filter is bloody shit

  • i think this is good

  • In addition, it's not swearing in the USA and is also a main part of the vocabulary in Australia (not swearing).  In the UK does the word "bloody" qualify as swearing? Only the Macmillan Dictionary says it is "impolite", Collins says "slang" (thus not swearing), as does OED, Chambers says it is an "adjective" thus not even slang let alone swearing slang. Do all swearwords even have to be "slang"? I have no idea. However, three quarters of the population think it is swearing (but 1/4 don't).

  • Good point but this is not an issue for this video purpose. You may need to think

    why people will watch this video.

  • "Bloody" isn't mild to 2% of people: 2% consider it strong. Neither is it a swearword, according to 22%. Advertising research also found that, when two versions of an advertisement were shown to two groups, one using "bloody", the other using "bl**dy", slightly more people from the group that saw the asterisked version objected than the number from the group who saw the word. So the asterisked version is 'officially' worse and I therefore challenge the reasoning behind the filter

  • I didn't create this filter so people could filter the word bloody, I used it as an example as I have younger audience too,

  • @phpacademy As I always said, you are rock man. please keep it up

  • @phpacademy As I always said, You are rock ! pls keep it up man.

  • Website1643 (5 months ago)

    is trolling ignore him....

  • Haha... This was clever!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more