From a341c889b751055e90eba9b7a14da5b7cd0e8032 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 31 Jan 2016 15:55:27 -0800 Subject: add oembed provider for photos --- mod/oep.php | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 mod/oep.php (limited to 'mod/oep.php') diff --git a/mod/oep.php b/mod/oep.php new file mode 100644 index 000000000..d0f4bd193 --- /dev/null +++ b/mod/oep.php @@ -0,0 +1,93 @@ + $maxheight) + continue; + if($maxwidth && $rr['width'] > $maxwidth) + continue; + $foundres = true; + break; + } + + if($foundres) { + $ret['type'] = 'link'; + $ret['thumbnail_url'] = z_root() . '/photo/' . '/' . $rr['resource_id'] . '-' . $rr['scale']; + $ret['thumbnail_width'] = $rr['width']; + $ret['thumbnail_height'] = $rr['height']; + } + + + } + return $ret; + +} \ No newline at end of file -- cgit v1.2.3