aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-03 18:06:16 -0700
committerfriendica <info@friendica.com>2013-04-03 18:06:16 -0700
commit6e17be3e85b710f0197e13051374eb45b675e93c (patch)
treecabb61dd2f1c933ba332309ccb01199da3d10bc5 /mod
parentf353b9ae3d7295dfc8123ab77a91a3f56ebef2a5 (diff)
parent0ba7f76bfd49fb510067a66743a75b7ea068cffd (diff)
downloadvolse-hubzilla-6e17be3e85b710f0197e13051374eb45b675e93c.tar.gz
volse-hubzilla-6e17be3e85b710f0197e13051374eb45b675e93c.tar.bz2
volse-hubzilla-6e17be3e85b710f0197e13051374eb45b675e93c.zip
Merge https://github.com/friendica/red into zpull
Diffstat (limited to 'mod')
-rw-r--r--mod/photos.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/mod/photos.php b/mod/photos.php
index c562fc139..f5d2bed97 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -835,7 +835,6 @@ function photos_content(&$a) {
$o .= '<div class="photos-upload-link" ><a href="' . $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album) . '" >' . t('Upload New Photos') . '</a></div>';
}
-
$tpl = get_markup_template('photo_album.tpl');
if(count($r))
$twist = 'rotright';
@@ -856,15 +855,26 @@ function photos_content(&$a) {
$desc_e = $rr['desc'];
}
+
+ if(feature_enabled($a->data['channel']['channel_id'],'prettyphoto')){
+ $imagelink = ($a->get_baseurl() . '/photo/' . $rr['resource_id'] . '.' . $ext );
+ $rel=("prettyPhoto[pp_gal]");
+ }
+ else {
+ $imagelink = ($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id']
+ . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''));
+ $rel=("photo");
+ }
+
$o .= replace_macros($tpl,array(
'$id' => $rr['id'],
'$twist' => ' ' . $twist . rand(2,4),
- '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id']
- . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''),
+ '$photolink' => $imagelink,
+ '$rel' => $rel,
'$phototitle' => t('View Photo'),
'$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource_id'] . '-' . $rr['scale'] . '.' .$ext,
'$imgalt' => $imgalt_e,
- '$desc'=> $desc_e
+ '$desc'=> $desc_e,
));
}