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. --- include/features.php | 1 + mod/photos.php | 18 ++++++++++++++---- view/tpl/photo_album.tpl | 8 +++++++- view/tpl/smarty3/page_display.tpl | 2 +- view/tpl/smarty3/photo_album.tpl | 8 +++++++- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/include/features.php b/include/features.php index 23e5485e9..14cf891b3 100644 --- a/include/features.php +++ b/include/features.php @@ -22,6 +22,7 @@ function get_features() { array('expire', t('Content Expiration'), t('Remove old posts/comments after a period of time')), array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles')), array('webpages', t('Web Pages'), t('Provide managed web pages on your channel')), + array('prettyphoto', t('Enhanced Photo Albums'), t('Enable photo album with enhanced features')), array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')), 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, )); } diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl index cc3dcfb9c..53392e709 100644 --- a/view/tpl/photo_album.tpl +++ b/view/tpl/photo_album.tpl @@ -1,5 +1,11 @@ + +
- + $imgalt

$desc

diff --git a/view/tpl/smarty3/page_display.tpl b/view/tpl/smarty3/page_display.tpl index e61a86fc9..0f02086f2 100644 --- a/view/tpl/smarty3/page_display.tpl +++ b/view/tpl/smarty3/page_display.tpl @@ -8,5 +8,5 @@
{{$date}}
-
{{$body}}
+
body
diff --git a/view/tpl/smarty3/photo_album.tpl b/view/tpl/smarty3/photo_album.tpl index 56ee6b61c..33ab84df7 100644 --- a/view/tpl/smarty3/photo_album.tpl +++ b/view/tpl/smarty3/photo_album.tpl @@ -3,8 +3,14 @@ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN * *}} + +
- + {{$imgalt}}

{{$desc}}

-- cgit v1.2.3 From 6803265eba7ea37a2e6f7c8b006a48725220bae1 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 29 Mar 2013 20:38:59 +0000 Subject: Typo in page_display --- view/tpl/page_display.tpl | 2 +- view/tpl/smarty3/page_display.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/tpl/page_display.tpl b/view/tpl/page_display.tpl index a79d505dd..c34747364 100644 --- a/view/tpl/page_display.tpl +++ b/view/tpl/page_display.tpl @@ -3,5 +3,5 @@
$date
-
body
+
$body
diff --git a/view/tpl/smarty3/page_display.tpl b/view/tpl/smarty3/page_display.tpl index 0f02086f2..e61a86fc9 100644 --- a/view/tpl/smarty3/page_display.tpl +++ b/view/tpl/smarty3/page_display.tpl @@ -8,5 +8,5 @@
{{$author}}
{{$date}}
-
body
+
{{$body}}
-- cgit v1.2.3 From 2f24bf2efec447d464881a6206b037b230331a7c Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sun, 31 Mar 2013 21:05:20 +0100 Subject: New mail_list template. --- view/tpl/mail_list.tpl | 24 ++++++------------------ view/tpl/smarty3/mail_list.tpl | 24 ++++++------------------ 2 files changed, 12 insertions(+), 36 deletions(-) diff --git a/view/tpl/mail_list.tpl b/view/tpl/mail_list.tpl index 4417d1863..c51783782 100644 --- a/view/tpl/mail_list.tpl +++ b/view/tpl/mail_list.tpl @@ -1,19 +1,7 @@ -
-
- $from_name -
$from_name
-
-
- $to_name -
$to_name
-
-
$date
- -
- -
+
+ $from_name + $from_name + $subject + $date +
-
-
- -
diff --git a/view/tpl/smarty3/mail_list.tpl b/view/tpl/smarty3/mail_list.tpl index ffc75b794..717df51d5 100644 --- a/view/tpl/smarty3/mail_list.tpl +++ b/view/tpl/smarty3/mail_list.tpl @@ -3,22 +3,10 @@ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN * *}} -
-
- {{$from_name}} -
{{$from_name}}
-
-
- {{$to_name}} -
{{$to_name}}
-
-
{{$date}}
- -
- -
+
+ {{$from_name}} + {{$from_name}} + {{$subject}} + {{$date}} +
-
-
- -
-- cgit v1.2.3