Embedding slideshare.net contents adding a codec
tsaorin - February 15, 2009 - 19:00
| Project: | Video Filter |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Justin W Freeman |
| Status: | closed |
Description
There is a way to add a code for embeing slideshare presentations (www.slideshare.net)
In the file "video_filter.codecs.inc":
In the "$codecs = array();" you should include:
$codecs['slideshare'] = array(
'name' => t('slideshare'),
'callback' => 'video_filter_slideshare',
// http://static.slideshare.net/swf/ssplayer2.swf?id=976386&doc=presentacio... 'regexp' => '/static\.slideshare\.net\/swf\/ssplayer2.swf\?id=([a-z0-9]+).*doc=([a-z0-9-]+)/',
'ratio' => 500 / 410,
);After this you must append a funcion for slideshare:
function video_filter_slideshare($video) {
//$video['source'] = 'http://static.slideshare.net/swf/ssplayer2.swf?id='.$video['codec']['matches'][1].'&doc=rebiunvilanova-1233004774301205-1';
$video['source'] = 'http://static.slideshare.net/swf/ssplayer2.swf?id='.$video['codec']['matches'][1].'&doc='.($video['codec']['matches'][2]);
//http://static.slideshare.net/swf/ssplayer2.swf?id=1015437&doc=galiciaalfinred-1234335128131588-2
return video_filter_flash($video);
}And in the content of the post, the way to invoke de slide is:
[video:http://static.slideshare.net/swf/ssplayer2.swf?id=955099&doc=rebiunvilanova-1233004774301205-1] You need two parameters that are hidden, so you should click in the "custom" link beside the "embed" box, and look for this info in the "For WordPress.com" code box.
Lucky.
I don't know how to submit a patch.

#1
I've noticed that the way to invoke the slides was annoiying.
In the attachment there is a new "video_filter.codecs.inc" which lets you call slideshare as follows:
[video:slideshare.net/?id=955099&doc=rebiunvilanova-1233004774301205-1]It's much easier and pretty, although you stilla have to extract the id and doc name from de Wordpress code.
#2
Could you make a proper patch please? See http://drupal.org/patch/create.
#3
Attached is a patch against 6.x-2.x-dev. Tested OK with 6.x-2.x-dev and stable-6.x-2.5.
#4
I'm not sure I understand what URL to use. How do I find it on Slideshare?
#5
Ok, I've committed the attached patch.
Notice I've added 'instructions' to the codec array, which contains instructions for the end user on how to use this codec. Shows up when you click Filter tips on node edit form.
Thanks!
#6
Automatically closed -- issue fixed for 2 weeks with no activity.