Youtube Shortcode suggestions & issues
-
Better regex for get_video_id function
Today i was trying to show this video https://www.youtube.com/embed/JaNH56Vpg-A or https://www.youtube.com/embed/JaNH56Vpg-A
and both URLs wasn't working. So i've made a fix for that and this is the code:
function get_video_id($url)
{
// Handles normal youtube url e.g:
// http://www.youtube.com/watch?v=QRS8MkLhQmM
$regex1 = '#v=([^\s]{0,11})#is';// Handles youtube share short links e.g:
// http://youtu.be/QRS8MkLhQmM
$regex2 = '#.*youtu\.be\/([^\s]{0,11})#is';// Handles embedded youtube video url e.g:
// http://www.youtube.com/v/QRS8MkLhQmM?version=3&feature=player_embedded&autohide=1
// http://www.youtube.com/embed/QRS8MkLhQmM?version=3&feature=player_embedded&autohide=1
$regex3 = '#(?<=[v|embed])\/[v|embed]+\/([^\s]{0,11})#is';// Handles videos IDs e.g:
// QRS8MkLhQmM
$regex4 = '#([^\s]{0,11})#is';
if ( preg_match($regex1, $url, $matches)
|| preg_match($regex2, $url, $matches)
|| preg_match($regex3, $url, $matches)
|| preg_match($regex4, $url, $matches) ) {
return $matches[1];
}… more
5 votes -
Display a LinkedTube.com video
LinkedTube.com gives me a clickable link - see http://god-jesus.a-disciple.org/forum/?p=78 - it would be great if you could sort out a shortcode for this video - modestbranding, nocookie etc.
1 vote -
Visual editor not working after installing Youtube shortcode plugin
Just after I've installed your plugin, my post's visual editor stopped working.
Already tried some solutions (clearing browser's cache was my first try), but none of them solved the problem, only after deactivating the plugin the visual editor works fine.
My browser's version is Firefox 9.0.1, but it also occurs on Google Chrome.
Had you already noticed this behavior? Is there any patch planned to be released?
Nevertheless, congrats for your plugin, very useful indeed.
Thank you and best regards,
João Paulo1 vote -
Rework your page
I go straight to the How to Use - what do I get? CODEX 1 &2. Talk about a turn off after 5 or 6 trips I punch the link under donations and discover Youtube demos cool but they are about complicated stuff.
Now I'm thinking somebody put a ton of work into this but there is no instruction where to download this program internally on my end and what to do with it before I acually download it.
Yea, you say it's simple but you've lost a guy like me, no 101 instructions
no what's in it for me,… more1 vote -
Facebook recommendation text is messed up
Hi, I have installed youtube shortcode, but it is messing up with facebook recommend thing. When I post the site name on facebook, facebook explores to URL to give following text:
"Episode 18 Preview » Humsafar.TV (Downloads, Episodes, Bloopers, Wallpapers, Songs)
http://www.humsafar.tv/
.youtube_sc iframe.yp{display:none;}The Adobe Flash Player is required for video playback.Get the latest Flash Player or Watch this video on YouTube."Please let me know how to fix this.
1 vote -
Invalid Parameters when trying to use playlist feature.
I put in the video id's like it says but when the first video is done playing, the player goes to the playlist and stops saying Invalid Parameters.
1 vote