function emimage_picasa_extract in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 contrib/emimage/providers/picasa.inc \emimage_picasa_extract()
File
- contrib/
emimage/ providers/ picasa.inc, line 96 - This include processes picasa.com image files for use by emfield.module.
Code
function emimage_picasa_extract($embed = '') {
// Note that the API doesn't seem to support calls that don't include at
// least the User (though the Album seems to be optional).
// http://picasaweb.google.com/lh/photo/oVr_uf6LoEhUWOMOujA_lQ?feat=directlink
if (preg_match('@picasaweb\\.google\\.com/lh/(.+)@i', $embed, $matches)) {
return 'PICASA_ERROR_USER';
}
// http://picasaweb.google.com/kaos777/YearlyKos/photo#5119063656501095090
// http://picasaweb.google.com/irina1005/qdihmG#5298825003004278162
// http://picasaweb.google.com/eugene.martov/1508?feat=featured#5381754383516490642
return array(
'@picasaweb\\.google\\.com/[^/]+/[^/]+/photo.*?#([^\\&]+)@i',
'@picasaweb\\.google\\.com/[^/]+/[^/\\?]+.*?#([^\\&]+)@i',
);
}