The MU forums have moved to

BIG youtube issue (12 posts)

  1. drmike
    Posted 17 years ago #

    Making this a sticky as it's important.

    Youtube has started adding in related videos to their player and, you guessed it, we're getting "mature" videos come down the pipe. Lots of fun.

    They state how they can have them turned off:

    If for any reason you don't want this option turned on, you can modify the video URL by attaching a rel=0 parameter to the video. i.e.

    May I suggest if you're running a family oriented site adding that bit of code in?

  2. suleiman
    Posted 17 years ago #

    malcolm, is there a way to integrate this into Anarchy?

  3. dsader
    Posted 17 years ago #

    Thanks so much drmike.

  4. drmike
    Posted 17 years ago #

    Not mine but thanks. Original thread:

  5. laurenceo
    Posted 17 years ago #

    Quick (partial) fix for Anarchy...automatically add

    when users add a YouTube video using the "V" Anarchy quicktag button:

    1. Open anarchy_media_player.php within the mu-plugins/anarchy_media folder.
    2. Replace line 731 with the following:
    anarchy_settext('<code>[kml_flashembed movie="' + videoID + '?rel=0" width="<?php echo $youtubewidth; ?>" height="<?php echo $youtubeheight; ?>" wmode="transparent" /]</code>');
  6. drmike
    Posted 17 years ago #

    Look about right. With my plugin, I just added it to the end of the variable when it gets it from the filter.

    Either way would work.

  7. WebDesigning
    Posted 17 years ago #

    Very informative

  8. laurenceo
    Posted 17 years ago #

    I found a problem with my Anarchy code solution above: the related videos still display (a) while the video is playing and (b) at the end of the video, even though (c) the related videos do not appear when the video originally loads (before you hit play).

    Has anyone else come across this problem?

    It may have to do with my switching the &rel=0 to ?rel=0. I had to do the latter because Wordpress automatically converts & to


    Any ideas for a better solution?

  9. drmike
    Posted 17 years ago #

    Actually it still works even if the & gets converted. At least it's getting converted on my mu installs (We use wp-extremevideo for youtube though) but Youttube still sees it correctly.

    If you provide a link, we may see something you're not.

  10. laurenceo
    Posted 17 years ago #

    The test video URL I'm working with is

    Example 1: &rel=0
    When I add


    to line 731 (as explained in the post above), the video does not display at all, as in this example:

    The movie URL embedded in the JavaScript call is converted to:;rel=0

    ..which I'm guessing is unreadable by the Anarchy player. (Notice the converted & to &amp )

    Example 2: ?rel=0
    When I try


    instead, the video displays, but the related videos still appear once the movie starts playing, as in this example:

    Anarchy's javascript embed code for this example looks like this:

    I've put in a message to the Anarchy support forum (, and am hoping to hear back soon.

    Have any of you MU users been able to come up with an Anarchy solution?

  11. drmike
    Posted 17 years ago #

    Dropping from a sticky.

  12. griffinjay
    Posted 16 years ago #

    I'm looking for a solution to this as well.

About this Topic

  • Started 17 years ago by drmike
  • Latest reply from griffinjay