*/ /** * Search Module * * This module provides support for searching the Gallery * * @package Search */ class SearchModule extends GalleryModule { function SearchModule() { global $gallery; $this->setId('search'); $this->setName('Search'); $this->setDescription($gallery->i18n('Search your Gallery')); $this->setVersion('0.8.5'); $this->setGroup('gallery', $this->translate('Gallery')); $this->setCallbacks('loadSystemContent'); $this->setRequiredCoreApi(array(4, 0)); $this->setRequiredModuleApi(array(0, 9)); } /** * @see GalleryModule::isRecommendedDuringInstall */ function isRecommendedDuringInstall() { return true; } /** * @see GalleryModule::autoConfigure */ function autoConfigure() { /* We don't require any special configuration */ return array(GalleryStatus::success(), true); } /** * @see GalleryModule::loadSystemContent */ function loadSystemContent(&$template) { global $gallery; $view = GalleryUtilities::getRequestVariables('view'); if ($view == 'search:SearchScan' || $view == 'search:SearchShowAll') { $content = null; } else { $SearchSystemContent['subView'] = 'search:SearchScan'; $template->setVariable('SearchSystemContent', $SearchSystemContent); $content = 'modules/search/templates/SearchSystemContent.tpl'; } return array(GalleryStatus::success(), array('searchBox' => $content)); } } ?>