Support » Fixing WordPress » Disabling YouTube’s “feature”

  • YouTube has introduced an idiotic new “feature” that results in adult-themed videos being hawked at the end of your embedded videos. (read more in the MU forums)

    If you’re using the Viper Video Quicktags plugin, this is what you need to do to disable YouTube’s new feature. It took me a little effort to figure this out, so I’ll post it here for others.

    Open vipers-video-quicktags.php (NOT .js).

    Around line 662, make this hack. You can tell from my commenting what you need to do. The original lines are commented out, with my inserts following where appropriate.

    if ( 'youtube' == $params['type'] ) {
    						$url = $linktext = '' . $data['videoid'] . '&rel=0'; // adam's hack: deleted
    						#$url = $linktext = '' . $data['videoid'] . '&rel=0'; // adam's hack: add &rel=0
    						#$this->jsoutput .= '	vvq_youtube("' . $objectid . '", "' . $data['width'] . '", "' . $data['height'] . '", "' . $data['videoid'] . '");' . "\n"; // adam's hack: deleted
    						$this->jsoutput .= '	vvq_youtube("' . $objectid . '", "' . $data['width'] . '", "' . $data['height'] . '", "' . $data['videoid'] . '&rel=0");' . "\n"; // adam's hack: add &rel=0
    					} elseif ( 'googlevideo' == $params['type'] ) {

    Good luck.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Also pasted at for easier reading.

    And no, I’m not really using wp1.2.2. That should say wp-mu 1.2.2.

    How about the legality of this? Here’s what Youtube’s terms say about it:

    F. If you use the YouTube Embeddable Player on your website, you must include a prominent link back to the YouTube website on the pages containing the Embeddable Player and you may not modify, build upon, or block any portion of the Embeddable Player in any way.

    I’m thinking of using this plugin but I’m concerned about legal issues. I know the plugin doesn’t include the hacks though. It would be interesting to hear other people’s opinion about this issue.

    This doesn’t do anything to modify the video. It just adds a parameter to the YouTube URL–a parameter that YouTube itself acts on. YouTube told people with embedded videos to go through and add “rel=0” to the end of their URLs if they didn’t want links to other videos to show up at the end.

    Thanks for posting this!

    I’m having the same problem. I tried the fix but maybe I’m not inserting the rel=0 in the right place — although I tried it in multiple places and also with and without quote marks around it.

    Here’s my embed code. Please advise exactly where and what characters I should insert. Many thanks!

    <object width=”425″ height=”350″><param name=”movie” value=””></param><embed src=”” type=”application/x-shockwave-flash” width=”425″ height=”350″></embed></object>

    In case anyone’s out there…I just found the correct fix. What you need to insert is &rel=0 right after the url in both places it appears in the code. So in the example above, like this:

    <object width=”425″ height=”350″><param name=”movie” value=”″></param><embed src=”″ type=”application/x-shockwave-flash” width=”425″ height=”350″></embed></object>

    This issue had me tearing my hair out, so I hope this fix is helpful to others.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disabling YouTube’s “feature”’ is closed to new replies.