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

tsaorin - February 16, 2009 - 16:06

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.

AttachmentSize
video_filter.codecs.zip 1.59 KB

#2

blackdog - March 15, 2009 - 19:30
Category:task» feature request
Status:patch (to be ported)» active

Could you make a proper patch please? See http://drupal.org/patch/create.

#3

Justin W Freeman - May 2, 2009 - 04:55
Title:Emebing slideshare contents adding a codec» Embedding slideshare.net contents adding a codec
Version:5.x-2.4» 6.x-2.x-dev
Assigned to:tsaorin» Justin W Freeman
Status:active» reviewed & tested by the community

Attached is a patch against 6.x-2.x-dev. Tested OK with 6.x-2.x-dev and stable-6.x-2.5.

AttachmentSize
video_filter.codecs.inc_.patch 1.54 KB

#4

blackdog - May 2, 2009 - 10:32
Status:reviewed & tested by the community» postponed (maintainer needs more info)

I'm not sure I understand what URL to use. How do I find it on Slideshare?

#5

blackdog - July 31, 2009 - 22:22
Status:postponed (maintainer needs more info)» fixed

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!

AttachmentSize
slideshare_codec.patch 1.35 KB

#6

System Message - August 14, 2009 - 22:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.