aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-01-31 20:05:47 -0800
committerredmatrix <git@macgirvin.com>2016-01-31 20:05:47 -0800
commitfd9f792f90c2aa173627d38685829ac94909763e (patch)
tree0e69bcc603642b61e28c2b656d5afe1ecf11dc47 /mod/photos.php
parente8ded61efbf678aa49f7c4445948bb91a41d41ea (diff)
downloadvolse-hubzilla-fd9f792f90c2aa173627d38685829ac94909763e.tar.gz
volse-hubzilla-fd9f792f90c2aa173627d38685829ac94909763e.tar.bz2
volse-hubzilla-fd9f792f90c2aa173627d38685829ac94909763e.zip
add album embed (embed the most recent photo with link to album)
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index d187e1d45..7864b9a18 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -660,6 +660,10 @@ function photos_content(&$a) {
$album = (($datum) ? hex2bin($datum) : '');
+
+ $a->page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . $a->cmd) . '" title="oembed" />' . "\r\n";
+
+
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
AND `scale` <= 4 and photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
intval($owner_uid),