]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
rev update, bug 428, 429, and ability to block globaldir submissions from demo sites
[friendica.git] / mod / photos.php
index 8da94841e684f35ba5d08238b283f876c2bf6547..082947bdbfc9c5c5f78ff597b41acffa7ce42afc 100644 (file)
@@ -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',