function showAlbum($album_id) { $album = GNUsocialPhotoAlbum::getKV('album_id', $album_id); if (!$album) { return; } $page = $_GET['pageid']; if (!filter_var($page, FILTER_VALIDATE_INT)) { $page = 1; } $photos = GNUsocialPhoto::getGalleryPage($page, $album->album_id, 9); $this->elementStart('div', array('class' => 'galleryheader')); if ($page > 1) { $this->element('a', array('href' => $album->getPageLink() . '?pageid=' . ($page - 1)), 'Previous page'); $this->raw(' | '); } if (GNUsocialPhoto::getGalleryPage($page + 1, $album->album_id, 9)) { $this->element('a', array('href' => $album->getPageLink() . '?pageid=' . ($page + 1)), 'Next page'); $this->raw(' | '); } //$this->element('a', array('href' => '#', // 'onclick' => 'return increasePhotoSize()'), '+'); //$this->raw(' | '); //$this->element('a', array('href' => '#', // 'onclick' => 'return decreasePhotoSize()'), '-'); //$this->raw(' | '); $this->showResizeImagesBox(); $this->elementEnd('div'); foreach ($photos as $photo) { $this->elementStart('a', array('href' => $photo->getPageLink())); $this->elementStart('div', array('class' => 'photocontainer')); $this->element('img', array('src' => $photo->thumb_uri, 'class' => 'photoingallery')); $this->element('div', array('class' => 'phototitle'), $photo->title); $this->elementEnd('div'); $this->elementEnd('a'); } }