WordPress.org

Ready to get started?Download WordPress

Forums

Viper's Video Quicktags
[resolved] BUG: Youtube "Share" short address doesnt work (5 posts)

  1. novakpeter
    Member
    Posted 2 years ago #

    This:

    [youtube]http://youtu.be/BoeuXk1j01c[/youtube]

    doesnt work, although the youtube address is valid...

    http://wordpress.org/extend/plugins/vipers-video-quicktags/

  2. Daniele Raimondi
    Member
    Posted 2 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' ) ) {
    	$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.

  3. novakpeter
    Member
    Posted 2 years ago #

    Wooow, thank you, I will test it. Great...

  4. novakpeter
    Member
    Posted 2 years ago #

    Yeah, it works 100 %! Thank you!

  5. johnpadernia
    Member
    Posted 2 years ago #

    There must be some thing not rite. How do I get YouTube Link for WordPress , and where do I paste it

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic