aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-03-29 20:36:39 +0000
committerThomas Willingham <founder@kakste.com>2013-03-29 20:36:39 +0000
commit8741bb20e8314bd324722d81c83802a5e4d02385 (patch)
tree0509752a99361e30c19c20bc054f3d7416884569 /mod/photos.php
parentfbb4dc69c6789a04f8464afba4ea625feb880731 (diff)
downloadvolse-hubzilla-8741bb20e8314bd324722d81c83802a5e4d02385.tar.gz
volse-hubzilla-8741bb20e8314bd324722d81c83802a5e4d02385.tar.bz2
volse-hubzilla-8741bb20e8314bd324722d81c83802a5e4d02385.zip
Make prettyPhoto a feature, add slideshow for albums.
Diffstat (limited to 'mod/photos.php')
-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,
));
}