#1310 - oEmbed support (input)
Posted
Comment: #catalogue_entry_1774
This will now work. It's actually the 3rd pattern of Facebook video URL we've seen now :S./**
* See if we can recognise this URL pattern.
*
* @param URLPATH URL to pattern match
* @return integer Recognition precedence
*/
function recognises_url($url)
{
if (preg_match('#^https?://www\.facebook\.com/video/video\.php\?v=(\w+)#',$url)!=0) return MEDIA_RECOG_PRECEDENCE_HIGH;
if (preg_match('#^https?://www\.facebook\.com/video\.php\?v=(\w+)#',$url)!=0) return MEDIA_RECOG_PRECEDENCE_HIGH;
if (preg_match('#^https?://www\.facebook\.com/photo\.php\?v=(\w+)#',$url)!=0) return MEDIA_RECOG_PRECEDENCE_HIGH;
return MEDIA_RECOG_PRECEDENCE_NONE;
}
Posted
Here's another mysterious embedding issue with someone's recent blog post--
http://www.saivasiddhanta.org/site/index.php?page=news&type=view&id=rajakumar-ramasamys%2Fthree-eyed-cow-born-in&blog=1
The youtube video didn't embed. The URL is not in a <a> tag like what you mentioned earlier, however it does have some strange "advenueINTEXT" stuff in front of it. I tried removing that (and removed the <span> tag entirely), so it would just be the plain URL, but it still won't embed.
I made a new blog post and pasted in the same URL (along with some dummy text) and it embedded fine.
Mysterious!
Posted
Previously it would only detect URLs posted in pure Comcode, not within semihtml.
You would not normally notice as I coded it to convert simple semihtml with URLs back into pure Comcode.
In this case the HTML had more complexity so it would not convert.
I have resolved it though.
Basically I have allowed the Comcode parser to detect URLs within semihtml IF the number of "<" and ">" to the left of the URL match, i.e. if it is not inside an HTML tag at that point of the parsing. i.e. I have given it some minimal HTML awareness so that it was safe for me to include this.
Posted
Regarding adding CNN videos to galleries, when I paste a video URL into the URL field, it only results in a link with thumbnail of the video. It doesn't embed the video.
http://www.cnn.com/video/data/2.0/video/world/2014/10/02/navandra-modi-orig-cfb.cnn.html
The only way I was able to embed the video into a gallery entry was to copy the embed code from CNN page--
<iframe width="416" height="234" src="http://www.cnn.com/video/api/embed.html#/video/world/2014/10/02/navandra-modi-orig-cfb.cnn" frameborder="0"></iframe>
and paste that in the video entry description field in Source view.
http://www.saivasiddhanta.org/site/index.php?page=galleries&type=video&id=cnn-video-is-this&wide=1&redirected=1
Posted
Now I'm seeing a youtube video not embedding in a blog post which uses simple list in its layout--
http://www.saivasiddhanta.org/site/index.php?page=news&type=view&id=moilavadee-moorghen-s%2Fannual-student-prayer&blog=1
Here is some content surrounding one of the two videos trying to be embedded--
<ol style="list">
<li value="7">
Preparing the gifts to be distributed to the students after the ceremony. This is really a big challenge for we are preparing some 4,000 gift pouches consisting of a blessed pen, pencil and vibhuti pack to be used for the exams. The design for the pouch and the vibhuti packs were made and then submitted for printing. Then the small vibhuti packs along with big vibhuti packets were distributed to our kutumba members and some close family members for filling with vibuthi. Meanwhile the 4,000 pens and pencils were ordered and received. Then the big preparing and packing up was fixed for Sunday 28<sup>th</sup> September at our place. Everyone came with their small vibbhuti packs duly filled and the packing up started around 1 p.m. until very late in the evening. We had a tea break in the afternoon with cakes and refreshments. It was real fun for all of us with lots of funny jokes and laughter. Later, we all had a nice dinner together. We share below some photos of this most wonderful and rewarding day</li>
</ol>
http://youtu.be/t2wyDKDXPB0
<ol style="list">
<li value="8">
Posted
I'll see if we can make the parser slightly smarter about this.
Posted
Posted
http://vimeo.com/49976720
And got the following error--
Stack trace…
File -> '/home/saiva/public_html/sources/failure.php'
Line -> 693
Function -> 'die_html_trace'
Args -> array ( 0 => 'PHP NOTICE [8] Undefined index: remote_id in sources/hooks/systems/media_rendering/vimeo.php on line 126 (version: 9.0.2, PHP version: 5.5.15, URL: /site/index.php?page=galleries&type=video&id=swiss-festival-honors&wide=1&redirected=1)', )
File -> '/home/saiva/public_html/sources/global.php(206) : eval()\'d code'
Line -> 1017
Function -> '_fatal_exit'
Args -> array ( 0 => 'PHP NOTICE [8] Undefined index: remote_id in sources/hooks/systems/media_rendering/vimeo.php on line 126', )
File -> '/home/saiva/public_html/sources/failure.php'
Line -> 220
Function -> 'fatal_exit'
Args -> array ( 0 => 'PHP NOTICE [8] Undefined index: remote_id in sources/hooks/systems/media_rendering/vimeo.php on line 126', )
File -> '/home/saiva/public_html/sources/global.php(206) : eval()\'d code'
Line -> 878
Function -> '_Composr_error_handler'
Args -> array ( 0 => 'notice', 1 => 8, 2 => 'Undefined index: remote_id', 3 => 'sources/hooks/systems/media_rendering/vimeo.php', 4 => 126, )
File -> '/home/saiva/public_html/sources/hooks/systems/media_rendering/vimeo.php'
Line -> 126
Function -> 'Composr_error_handler'
Args -> array
File -> '/home/saiva/public_html/sources/media_renderer.php'
Line -> 202
Function -> 'render'
Class -> 'Hook_media_rendering_vimeo'
Object -> Hook_media_rendering_vimeo::__set_state(array( ))
Type -> '->'
Args -> array ( 0 => 'http://vimeo.com/49976720', 1 => 'http://vimeo.com/49976720', 2 => array ( 'thumb_url' => 'http://i.vimeocdn.com/video/344524902_1280x720.jpg', 'width' => '1280', 'height' => '720', 'length' => '0', 'mime_type' => 'application/octet-stream', ), 3 => true, 4 => 59, )
Posted
Looks like we have yet another pattern of facebook video URL that isn't yet displayable by our video galleries. Here is an example--
https://www.facebook.com/indians.incredible.india/videos/vb.330928850251065/999642426713034/?type=1&theater
Posted
Posted
I went to add this facebook video to galleries just now--
https://www.facebook.com/UCBerkeley/videos/10153311993674661/
and it didn't embed, just showed a link
13 guests and 0 members have recently viewed this.

