The MU forums have moved to WordPress.org

BIG youtube issue (12 posts)

  1. drmike
    Member
    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. http://www.youtube.com/v/&rel=0

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

  2. suleiman
    Member
    Posted 17 years ago #

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

  3. dsader
    Member
    Posted 17 years ago #

    Thanks so much drmike.

  4. drmike
    Member
    Posted 17 years ago #

    Not mine but thanks. Original thread:

    http://en.forums.wordpress.com/topic.php?id=11984

  5. laurenceo
    Member
    Posted 17 years ago #

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

    rel=0
    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
    Member
    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
    Member
    Posted 17 years ago #

    Very informative

  8. laurenceo
    Member
    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

    &amp;
    .

    Any ideas for a better solution?

  9. drmike
    Member
    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
    Member
    Posted 17 years ago #

    The test video URL I'm working with is http://youtube.com/watch?v=yeXoxNP8_xY

    Example 1: &rel=0
    When I add

    &rel=0

    to line 731 (as explained in the post above), the video does not display at all, as in this example: http://test.notsorry.net/2007/06/15/soccer-vid-test/

    The movie URL embedded in the JavaScript call is converted to:

    http://youtube.com/v/yeXoxNP8_xY&amp;rel=0

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

    Example 2: ?rel=0
    When I try

    ?rel=0

    instead, the video displays, but the related videos still appear once the movie starts playing, as in this example: http://test.notsorry.net/2007/06/15/question-mark-vid-test/

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

    http://youtube.com/v/yeXoxNP8_xY?rel=0

    I've put in a message to the Anarchy support forum (http://fora.an-archos.com/viewtopic.php?p=412#412), and am hoping to hear back soon.

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

  11. drmike
    Member
    Posted 17 years ago #

    Dropping from a sticky.

  12. griffinjay
    Member
    Posted 17 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