From 54e2c1ca81b99d4ac418e9287e00440de1fdc664 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 21 May 2012 16:40:11 -0700 Subject: rev update, bug 428, 429, and ability to block globaldir submissions from demo sites --- mod/photos.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mod/photos.php') 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', -- cgit v1.2.3