*/ /** * This implements the standard gallery theme * * @package GalleryTheme * @subpackage Theme */ class SiriuxTheme extends GalleryTheme { /** * Constructor */ function SiriuxTheme() { global $gallery; $this->setId('siriux'); $this->setName($gallery->i18n('Siriux')); $this->setDescription($gallery->i18n('Siriux.net Gallery theme')); $this->setVersion('0.9.9'); $this->setRequiredCoreApi(array(6, 5)); $this->setRequiredThemeApi(array(2, 0)); $this->setStandardSettings( array('showImageOwner' => 0, 'perPage' => 9, 'albumBlocks' => serialize(array( array('comment.ViewComments', array()))), 'photoBlocks' => serialize(array( array('exif.ExifInfo', array()), array('comment.ViewComments', array()))))); } /** * @see GalleryTheme::showAlbumPage */ function showAlbumPage(&$template, $item, $params, $childIds) { $ret = $this->loadCommonTemplateData( $template, $item, $params, array('owner', 'viewCount', 'childCount', 'descendentCount', 'parents', 'systemLinks', 'itemLinks', 'itemSummaries', 'permissions', 'thumbnails', 'pageNavigator', 'jumpRange'), $childIds); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Override some navigator settings */ $theme =& $template->getVariableByReference('theme'); if (isset($theme['navigator']['first'])) { unset($theme['navigator']['first']); } if (isset($theme['navigator']['last'])) { unset($theme['navigator']['last']); } /* Add our header and styles */ return array(GalleryStatus::success(), 'theme.tpl'); } /** * @see GalleryTheme::showPhotoPage */ function showPhotoPage(&$template, $item, $params) { $ret = $this->loadCommonTemplateData($template, $item, $params, array('owner', 'parents', 'systemLinks', 'itemLinks', 'permissions', 'itemLinksDetailed', 'itemNavigator', 'imageViews')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Override some navigator settings */ $theme =& $template->getVariableByReference('theme'); if (isset($theme['navigator']['first'])) { unset($theme['navigator']['first']); } if (isset($theme['navigator']['last'])) { unset($theme['navigator']['last']); } return array(GalleryStatus::success(), 'theme.tpl'); } /** * @see GalleryTheme::showModulePage */ function showModulePage(&$template, $item, $params, $templateFile) { $ret = $this->loadCommonTemplateData( $template, $item, $params, array('parents', 'systemLinks')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Add in our extra stuff */ $theme =& $template->getVariableByReference('theme'); $theme['moduleTemplate'] = $templateFile; /* Add our header and styles */ return array(GalleryStatus::success(), 'theme.tpl'); } /** * @see GalleryTheme::showAdminPage */ function showAdminPage(&$template, $item, $params, $templateFile) { $ret = $this->loadCommonTemplateData( $template, $item, $params, array('parents', 'systemLinks')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } /* Add in our extra stuff */ $theme =& $template->getVariableByReference('theme'); $theme['adminTemplate'] = $templateFile; return array(GalleryStatus::success(), 'theme.tpl'); } /** * @see GalleryTheme::showErrorPage */ function showErrorPage(&$template) { return array(GalleryStatus::success(), 'error.tpl'); } /** * @see GalleryTheme::showProgressBarPage */ function showProgressBarPage(&$template, $item, $params) { $ret = $this->loadCommonTemplateData( $template, $item, $params, array('parents', 'systemLinks')); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null); } return array(GalleryStatus::success(), 'theme.tpl'); } } ?>