aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-03 17:34:55 -0700
committerfriendica <info@friendica.com>2013-04-03 17:34:55 -0700
commit0ba7f76bfd49fb510067a66743a75b7ea068cffd (patch)
tree5c3e8fa7e6aa80fd78b540db4870360346d7db36 /mod
parentc10e30631a66705fe79e2550a9d85283a1cc0abd (diff)
parent2f24bf2efec447d464881a6206b037b230331a7c (diff)
downloadvolse-hubzilla-0ba7f76bfd49fb510067a66743a75b7ea068cffd.tar.gz
volse-hubzilla-0ba7f76bfd49fb510067a66743a75b7ea068cffd.tar.bz2
volse-hubzilla-0ba7f76bfd49fb510067a66743a75b7ea068cffd.zip
Merge pull request #45 from beardy-unixer/master
Album slideshows
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,
));
}