diff options
author | zottel <github@zottel.net> | 2012-05-22 08:46:02 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2012-05-22 08:46:02 +0200 |
commit | e9c86c0fd0fb87b49e60669e6d4be810ca426ec4 (patch) | |
tree | cfee80cc9122974a4304591aa7d54ca5fc8a71ea /mod/photos.php | |
parent | 2cd3ec7b983327f8c162845d0f4b8d9753f30e27 (diff) | |
parent | 02502c3a7460a1af3414b65232fd7c672a76d941 (diff) | |
download | volse-hubzilla-e9c86c0fd0fb87b49e60669e6d4be810ca426ec4.tar.gz volse-hubzilla-e9c86c0fd0fb87b49e60669e6d4be810ca426ec4.tar.bz2 volse-hubzilla-e9c86c0fd0fb87b49e60669e6d4be810ca426ec4.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/photos.php')
-rw-r--r-- | mod/photos.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php index 8da94841e..082947bdb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -977,9 +977,16 @@ function photos_content(&$a) { $tpl = get_markup_template('photo_album.tpl'); if(count($r)) + $twist = 'rotright'; foreach($r as $rr) { + if($twist == 'rotright') + $twist = 'rotleft'; + else + $twist = 'rotright'; + $o .= replace_macros($tpl,array( '$id' => $rr['id'], + '$twist' => ' ' . $twist . rand(2,4), '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'], '$phototitle' => t('View Photo'), '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.jpg', @@ -1400,9 +1407,16 @@ function photos_content(&$a) { $photos = array(); if(count($r)) { + $twist = 'rotright'; foreach($r as $rr) { + if($twist == 'rotright') + $twist = 'rotleft'; + else + $twist = 'rotright'; + $photos[] = array( 'id' => $rr['id'], + 'twist' => ' ' . $twist . rand(2,4), 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'], 'title' => t('View Photo'), 'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg', |