aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-21 16:40:11 -0700
committerfriendica <info@friendica.com>2012-05-21 16:40:11 -0700
commit54e2c1ca81b99d4ac418e9287e00440de1fdc664 (patch)
treee5c9e19d7cd70cde350e47d19d31e3ecee9c1df2 /mod/photos.php
parent71fe34332454e6dab239f8af27a1dcac3ba4b2e5 (diff)
downloadvolse-hubzilla-54e2c1ca81b99d4ac418e9287e00440de1fdc664.tar.gz
volse-hubzilla-54e2c1ca81b99d4ac418e9287e00440de1fdc664.tar.bz2
volse-hubzilla-54e2c1ca81b99d4ac418e9287e00440de1fdc664.zip
rev update, bug 428, 429, and ability to block globaldir submissions from demo sites
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php14
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',