diff options
Diffstat (limited to 'mod/ecml/views/default/ecml/keywords/slideshare.php')
-rw-r--r-- | mod/ecml/views/default/ecml/keywords/slideshare.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mod/ecml/views/default/ecml/keywords/slideshare.php b/mod/ecml/views/default/ecml/keywords/slideshare.php new file mode 100644 index 000000000..1881a1a89 --- /dev/null +++ b/mod/ecml/views/default/ecml/keywords/slideshare.php @@ -0,0 +1,34 @@ +<?php +/** + * ECML Slideshare support + * + * @package ECML + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider Ltd + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.org/ + */ + +// this wants the "wordpress.com" embed code. +// to make life easier on users, don't require them to add the "s +// and just chop out the id= bit here from the full attr list + +$id = str_replace('id=', '', $vars['ecml_params_string']); +$width = (isset($vars['width'])) ? $vars['width'] : 450; +$height = (isset($vars['height'])) ? $vars['height'] : 369; + +if ($id) { + // @todo need to check if the & should be encoded. + + $slide_url = "http://static.slideshare.net/swf/ssplayer2.swf?id=$id"; + + echo " +<object type=\"application/x-shockwave-flash\" wmode=\"opaque\" data=\"$slide_url\" width=\"$width\" height=\"$height\"> + <param name=\"movie\" value=\"$slide_url\" /> + <param name=\"allowFullScreen\" value=\"true\" /> + <param name=\"allowScriptAccess\" value=\"always\" /> + + <embed src=\"$slide_url\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed> +</object> +"; +}
\ No newline at end of file |