function albumList() { $cur = common_current_user(); $album = new GNUsocialPhotoAlbum(); $album->user_id = $cur->id; $albumlist = array(); if (!$album->find()) { GNUsocialPhotoAlbum::newAlbum($cur->id, 'Default'); } while ($album->fetch()) { $albumlist[$album->album_id] = $album->album_name; } return $albumlist; }
function showAlbums() { $album = new GNUsocialPhotoAlbum(); $album->profile_id = $this->user->id; $albums = array(); if (!$album->find()) { GNUsocialPhotoAlbum::newAlbum($this->user->id, 'Default'); } $this->elementStart('div', array('class' => 'galleryheader')); //$this->element('a', array('href' => '#', // 'onclick' => 'return increasePhotoSize()'), '+'); //$this->raw(' | '); //$this->element('a', array('href' => '#', // 'onclick' => 'return decreasePhotoSize()'), '-'); $this->showResizeImagesBox(); $this->elementEnd('div'); while ($album->fetch()) { $this->elementStart('div', array('class' => 'photocontainer')); $this->elementStart('a', array('href' => $album->getPageLink())); $this->element('img', array('src' => $album->getThumbUri(), 'class' => 'albumingallery')); $this->elementEnd('a'); $this->element('h3', array(), $album->album_name); $this->elementEnd('div'); } }