aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
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,
));
}