]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Pictures/albums in floating divs
authorMax Shinn <trombonechamp@gmail.com>
Tue, 28 Dec 2010 14:57:28 +0000 (08:57 -0600)
committerMax Shinn <trombonechamp@gmail.com>
Tue, 28 Dec 2010 14:57:28 +0000 (08:57 -0600)
plugins/GNUsocialPhotos/actions/photo.php
plugins/GNUsocialPhotos/actions/photos.php

index 663d75a7345c48f8d1b4da3582085764acd40b68..e9d87b32d7d03606ae51c9e5ed1d06e57f0a1f10 100644 (file)
@@ -50,7 +50,7 @@ class PhotoAction extends Action
 
         $this->user = Profile::staticGet('id', $this->notice->profile_id);
         
-        $notices = Notice::conversationStream((int)$this->notice->conversation, null, null); //Why do I have to do -1?
+        $notices = Notice::conversationStream((int)$this->notice->conversation, null, null); 
         $this->conversation = new ConversationTree($notices, $this);
         return true;
 
index c16bb80789cb5080fa330a7e019561bcaea524f1..ede8ba0f73982f8b02eed8830b815a115b976330 100644 (file)
@@ -83,16 +83,15 @@ class PhotosAction extends Action
         if (!$album->find()) {
             GNUsocialPhotoAlbum::newAlbum($cur->id, 'Default');
         }
-        $this->elementStart('ul', array('class' => 'photothumbs'));
         while ($album->fetch()) {
-            $this->elementStart('li');
-            $this->element('h3', array(), $album->title);
+            $this->element('style', array(), '.albumcontainer { display: block; background-color: green; float: left; padding: 30px; margin: 20px; }');
+            $this->elementStart('div', array('class' => 'photocontainer'));
             $this->elementStart('a', array('href' => $album->getPageLink()));
             $this->element('img', array('src' => $album->getThumbUri()));
             $this->elementEnd('a');
-            $this->elementEnd('li');
+            $this->element('h3', array(), $album->album_name);
+            $this->elementEnd('div');
         }
-        $this->elementEnd('ul');
         
     }
     
@@ -116,15 +115,16 @@ class PhotosAction extends Action
             $this->element('a', array('href' => $album->getPageLink() . '?pageid=' . ($page+1) ), 'Next page');
         }
 
-        $this->elementStart('ul', array('class' => 'photothumbs'));
+            $this->element('style', array(), '.photocontainer { display: block; background-color: yellow; float: left; padding: 30px; margin: 20px; }');
         foreach ($photos as $photo) {
-            $this->elementStart('li');
             $this->elementStart('a', array('href' => $photo->getPageLink()));
+            $this->elementStart('div', array('class' => 'photocontainer'));
             $this->element('img', array('src' => $photo->thumb_uri));
+            $this->element('div', array('class' => 'phototitle'), $photo->title);
+            $this->elementEnd('div');
             $this->elementEnd('a');
-            $this->elementEnd('li');
         }
-        $this->elementEnd('ul');
+
     }