Index: video_filter.codecs.inc =================================================================== --- video_filter.codecs.inc (revision 518) +++ video_filter.codecs.inc (working copy) @@ -115,6 +115,23 @@ 'regexp' => '/slideshare\.net\/\?id=([a-z0-9]+).*doc=([a-z0-9-]+)/', 'ratio' => 500 / 410, ); + $codecs['picasa_slideshows'] = array( + 'name' => t('Picasa Slideshows'), + 'callback' => 'video_filter_picasa_slideshows', + 'instructions' => t( + 'You must use the URL of the %rss for the Picasa album:', + array('%rss' => 'RSS feed') + ) . + '
    ' . + '
  1. ' . t('View the album in Picasa (you should see thumbnails, not a slideshow).') . '
  2. ' . + '
  3. ' . t('Find the "RSS" link and click it.') . '
  4. ' . + '
  5. ' . t('Copy the resulting URL from the browser address bar. Example: ') . '
    ' . + '[video: http://picasaweb.google.com/data/feed/base/user/USER_NAME/albumid/5568104935784209834?alt=rss&kind=photo&hl=en_US]' . + '
  6. ' . + '
', + 'regexp' => '/picasaweb\.google\.com\/data\/feed\/base\/user\/([a-zA-Z0-9@_\-]+)\/albumid\/([a-z0-9]+)/i', + 'ratio' => 800 / 600, + ); return $codecs; } @@ -270,4 +287,17 @@ $video['source'] = 'http://static.slideshare.net/swf/ssplayer2.swf?id=' . $video['codec']['matches'][1] . '&doc=' . ($video['codec']['matches'][2]); return video_filter_flash($video); -} \ No newline at end of file +} + +function video_filter_picasa_slideshows($video) { + $slideshow_player_url = 'http://picasaweb.google.com/s/c/bin/slideshow.swf'; + $video['source'] = $slideshow_player_url; + + $user_name = $video['codec']['matches'][1]; + $set_id = $video['codec']['matches'][2]; + + $params['flashvars'] = "host=picasaweb.google.com&&feat=flashalbum&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F$user_name%2Falbumid%2F$set_id%3Falt%3Drss%26kind%3Dphoto%26" . + ($video['autoplay'] ? '' : '&noautoplay=1'); + + return video_filter_flash($video, $params); +}