aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--include/features.php1
-rw-r--r--mod/photos.php18
-rw-r--r--view/tpl/mail_list.tpl24
-rw-r--r--view/tpl/page_display.tpl2
-rw-r--r--view/tpl/photo_album.tpl8
-rw-r--r--view/tpl/smarty3/mail_list.tpl24
-rw-r--r--view/tpl/smarty3/photo_album.tpl8
7 files changed, 42 insertions, 43 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 .= '<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,
));
}
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 @@
-<div class="mail-list-outside-wrapper">
- <div class="mail-list-sender" >
- <a href="$from_url" class="mail-list-sender-url" ><img class="mail-list-sender-photo" src="$from_photo" height="32" width="32" alt="$from_name" /></a>
- <div class="mail-list-sender-name" >$from_name</div>
- </div>
- <div class="mail-list-recip" >
- <a href="$to_url" class="mail-list-recip-url" ><img class="mail-list-recip-photo" src="$to_photo" height="32" width="32" alt="$to_name" /></a>
- <div class="mail-list-recip-name" >$to_name</div>
- </div>
- <div class="mail-list-date">$date</div>
- <div class="mail-list-subject"><a href="message/$id" class="mail-list-link">$subject</a></div>
- <div class="mail-list-delete-wrapper" id="mail-list-delete-wrapper-$id" >
- <a href="message/dropconv/$id" onclick="return confirmDelete();" title="$delete" class="icon drophide mail-list-delete delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>
- </div>
+<div class="mail-list-wrapper">
+ <a href="$from_url" class="mail-list-sender-url" ><img class="mail-list-sender-photo" src="$from_photo" alt="$from_name" /></a>
+ <span class="mail-from">$from_name</span>
+ <span class="mail-subject {{if $seen}}seen{{else}}unseen{{endif}}"><a href="message/$id" class="mail-link">$subject</a></span>
+ <span class="mail-date" title="$date">$date</span>
+ <span class="mail-delete"><a href="message/dropconv/$id" onclick="return confirmDelete();" title="$delete" class="icon drophide mail-list-delete delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></span>
</div>
-</div>
-<div class="mail-list-delete-end"></div>
-
-<div class="mail-list-outside-wrapper-end"></div>
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 @@
<div class="page-author"><a class=="page-author-link" href="$auth_url">$author</a></div>
<div class="page-date">$date</div>
- <div class="page-body">body</div>
+ <div class="page-body">$body</div>
</div>
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 @@
+<script type="text/javascript" charset="utf-8">
+ $(document).ready(function(){
+ $("a[rel^='prettyPhoto']").prettyPhoto();
+ });
+</script>
+
<div class="photo-album-image-wrapper" id="photo-album-image-wrapper-$id">
- <a href="$photolink" class="photo-album-photo-link" id="photo-album-photo-link-$id" title="$phototitle">
+ <a href="$photolink" class="photo-album-photo-link" id="photo-album-photo-link-$id" title="$phototitle" rel="$rel">
<img src="$imgsrc" alt="$imgalt" title="$phototitle" class="photo-album-photo lframe resize$twist" id="photo-album-photo-$id" />
<p class='caption'>$desc</p>
</a>
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
*
*}}
-<div class="mail-list-outside-wrapper">
- <div class="mail-list-sender" >
- <a href="{{$from_url}}" class="mail-list-sender-url" ><img class="mail-list-sender-photo" src="{{$from_photo}}" height="32" width="32" alt="{{$from_name}}" /></a>
- <div class="mail-list-sender-name" >{{$from_name}}</div>
- </div>
- <div class="mail-list-recip" >
- <a href="{{$to_url}}" class="mail-list-recip-url" ><img class="mail-list-recip-photo" src="{{$to_photo}}" height="32" width="32" alt="{{$to_name}}" /></a>
- <div class="mail-list-recip-name" >{{$to_name}}</div>
- </div>
- <div class="mail-list-date">{{$date}}</div>
- <div class="mail-list-subject"><a href="message/{{$id}}" class="mail-list-link">{{$subject}}</a></div>
- <div class="mail-list-delete-wrapper" id="mail-list-delete-wrapper-{{$id}}" >
- <a href="message/dropconv/{{$id}}" onclick="return confirmDelete();" title="{{$delete}}" class="icon drophide mail-list-delete delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>
- </div>
+<div class="mail-list-wrapper">
+ <a href="{{$from_url}}" class="mail-list-sender-url" ><img class="mail-list-sender-photo" src="{{$from_photo}}" alt="{{$from_name}}" /></a>
+ <span class="mail-from">{{$from_name}}</span>
+ <span class="mail-subject {{if $seen}}seen{{else}}unseen{{/if}}"><a href="message/{{$id}}" class="mail-link">{{$subject}}</a></span>
+ <span class="mail-date" title="{{$date}}">{{$date}}</span>
+ <span class="mail-delete"><a href="message/dropconv/{{$id}}" onclick="return confirmDelete();" title="{{$delete}}" class="icon drophide mail-list-delete delete-icon" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a></span>
</div>
-</div>
-<div class="mail-list-delete-end"></div>
-
-<div class="mail-list-outside-wrapper-end"></div>
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
*
*}}
+<script type="text/javascript" charset="utf-8">
+ $(document).ready(function(){
+ $("a[rel^='prettyPhoto']").prettyPhoto();
+ });
+</script>
+
<div class="photo-album-image-wrapper" id="photo-album-image-wrapper-{{$id}}">
- <a href="{{$photolink}}" class="photo-album-photo-link" id="photo-album-photo-link-{{$id}}" title="{{$phototitle}}">
+ <a href="{{$photolink}}" class="photo-album-photo-link" id="photo-album-photo-link-{{$id}}" title="{{$phototitle}}" rel="{{$rel}}">
<img src="{{$imgsrc}}" alt="{{$imgalt}}" title="{{$phototitle}}" class="photo-album-photo lframe resize{{$twist}}" id="photo-album-photo-{{$id}}" />
<p class='caption'>{{$desc}}</p>
</a>