WordPress.org

Support

Support » How-To and Troubleshooting » [Plugin: Viper's Video Quicktags] You-Tube Link to Video

[Plugin: Viper's Video Quicktags] You-Tube Link to Video

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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 🙂

    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' ) ) {
    	$parsed_url=parse_url($content);
    	$videoid=basename($parsed_url['path']);
    	$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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Viper's Video Quicktags] You-Tube Link to Video’ is closed to new replies.