@berdia I added it to the unstable branch approximately 30 seconds before I posted. Unless you downloaded the bleeding-edge copy from GitHub (don't) you won't see it until the next beta release.
@Lincoln Thank you. I thought it was already released as I could see link here to download. Any idea when it will be released? I am really determined to finish my project sooner rather than later.
I have this same problem. When I paste the link in cleditor, it pastes as a clickable link. The algoritm to automagicly replace a YouTube-URL to a videoplayer doesn't work then (perhaps because it's in an anchor-tag?)
This is completely ridiculous for it to take this long for this minor issue to be fixed.
Here, I'll help. It requires a hack to the core, but I guess that's what we have to do to actually make things work with the 2.x branch of Vanilla as users.
I'm working on v2.0.18.4.
There is a preg_match for youtube shortlinks in \vanilla2\library\core\class.format.php on lines 831-832. It just doesn't work.
So I replaced
if ((preg_match('`(?:https?|ftp)://www\.youtube\.com\/watch\?v=([^&]+)`', $Url, $Matches)
|| preg_match('`(?:https?)://www\.youtu\.be\/([^&]+)`', $Url, $Matches))
&& C('Garden.Format.YouTube'))
with
if ((preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $Url, $Matches) )
&& C('Garden.Format.YouTube')) {
and it works for all Youtube-generated URLs I've thrown at it, including short links. The preg_match might be better written by someone else, that's fine. It is not my speciality.
Answers
Click on downloads, and download .tar.gz or .zip (ie. from source) not any package.
what could be going wrong? maybe something with how they're pasting the link?
Somebody has a solution for this problem?
bump for youtube shirt url's.
This is completely ridiculous for it to take this long for this minor issue to be fixed.
Here, I'll help. It requires a hack to the core, but I guess that's what we have to do to actually make things work with the 2.x branch of Vanilla as users.
I'm working on v2.0.18.4.
There is a preg_match for youtube shortlinks in \vanilla2\library\core\class.format.php on lines 831-832. It just doesn't work.
So I replaced
with
and it works for all Youtube-generated URLs I've thrown at it, including short links. The preg_match might be better written by someone else, that's fine. It is not my speciality.
@Lincoln