Viper's Video Quicktags
You-Tube Link to Video (3 posts)

  1. axlm01
    Posted 5 years ago #

    I've noticed when I want to put a You-Tube video in my blog I have to change the beginning of the link code from http://youtu.be/ to http://www.youtube.com/watch?v=

    I am copying the link from the bottom of the video in You-Tube. Should I be looking elsewhere for the link?

    Michael O'Reilly

  2. spikeweb
    Posted 5 years ago #

    I noticed the same need to modify URL's with You tube.
    And I have writers who don't understand well how to change the provided link so an update would be appreciated :)

  3. Daniele Raimondi
    Posted 4 years ago #

    I've added a few lines of code to take care of youtu.be urls. Just add the code below in vipers-vide-quicktags.php on line #2871

    // Short/Share url ( http://youtu.be/videoid[?whatever=xx] )
    elseif ( FALSE !== stristr( $content, 'youtu.be' ) ) {
    	$embedpath = 'v/' . $videoid;
    	$fallbacklink = 'http://www.youtube.com/watch?v=' . $videoid;
    	$fallbackcontent = '<img src="http://img.youtube.com/vi/' . $videoid . '/0.jpg" alt="' . __('YouTube Preview Image', 'vipers-video-quicktags') . '" />';

    It also ignores query string parameters like t=xx added by youtube when a user selects a start time in the video.

    Hope the plugin author could add those patch to the source code.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic