public function beforeProcess() { if (($theme = CopixAJAX::getSession()->get('currentTheme')) != null) { CopixTpl::setTheme($theme); //Ajout d'une gestion de tpl par thème $config = CopixConfig::instance(); $theme = CopixTpl::getThemeInformations(CopixTpl::getTheme()); if ($theme->tpl != null) { $config->mainTemplate = $theme->tpl; } } }
/** * Page de choix de thème */ public function processDefault() { $ppo = new CopixPPO(); $ppo->TITLE_PAGE = _i18n('admin|themes.titlePage.selectTheme'); $arThemes = CopixPluginRegistry::getConfig('themechooser|themechooser', true)->getThemeList(); $ppo->arThemes = array(); foreach ($arThemes as $theme) { $ppo->arThemes[] = CopixTpl::getThemeInformations($theme); } $ppo->selectedTheme = CopixSession::get('themechooser|theme'); return _arPpo($ppo, 'theme.list.tpl'); }
public function beforeProcess(&$pExecParams) { if ($theme = $this->config->getThemeFor(CopixRequest::get('module'))) { CopixTpl::setTheme($theme); } //Ajout d'une gestion de tpl par thème $config = CopixConfig::instance(); $theme = CopixTpl::getThemeInformations(CopixTpl::getTheme()); if ($theme->tpl != null) { $config->mainTemplate = $theme->tpl; } }
/** * Affiche la liste des thèmes disponibles */ public function processDefault() { $ppo = new CopixPPO(); $ppo->TITLE_PAGE = _i18n('themes.titlePage.selectTheme'); $arThemes = CopixTpl::getThemesList(); $arThemesInfos = array(); $ppo->arThemes = array(); foreach ($arThemes as $theme) { $ppo->arThemes[] = CopixTpl::getThemeInformations($theme); } $ppo->selectedTheme = CopixConfig::get('defaultThemeId'); return _arPPO($ppo, 'theme.list.tpl'); }
public function _createContent(&$toReturn) { if (!CopixPluginRegistry::isRegistered('themechooser|themechooser')) { $toReturn = ""; return true; } $tpl = new CopixTpl(); $arThemes = CopixPluginRegistry::getConfig('themechooser|themechooser')->getThemeList(); $arThemesToReturn = array(); foreach ($arThemes as $theme) { $arThemesToReturn[] = CopixTpl::getThemeInformations($theme); } $selectedTheme = CopixSession::get('themechooser|theme'); $tpl->assign('selectedTheme', $selectedTheme); $tpl->assign('arThemes', $arThemesToReturn); $toReturn = $tpl->fetch('combo.list.tpl'); return true; }