From 8741bb20e8314bd324722d81c83802a5e4d02385 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 29 Mar 2013 20:36:39 +0000 Subject: Make prettyPhoto a feature, add slideshow for albums. --- mod/photos.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'mod/photos.php') 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 .= ''; } - $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, )); } -- cgit v1.2.3