public function __construct($view, $title_page)
 {
     parent::__construct($view);
     $lang = LangLoader::get('admin-themes-common');
     $this->set_title($lang['themes.theme_management']);
     $this->add_link($lang['themes.installed_theme'], AdminThemeUrlBuilder::list_installed_theme());
     $this->add_link($lang['themes.add_theme'], AdminThemeUrlBuilder::add_theme());
     $env = $this->get_graphical_environment();
     $env->set_page_title($title_page);
 }
 public function execute(HTTPRequestCustom $request)
 {
     $this->init();
     $this->theme_id = $request->get_value('id', null);
     if ($this->theme_exist()) {
         $this->build_form();
         if ($this->submit_button->has_been_submited() && $this->form->validate()) {
             $drop_files = $this->form->get_value('drop_files')->get_raw_value();
             $this->delete_theme($drop_files);
             AppContext::get_response()->redirect(AdminThemeUrlBuilder::list_installed_theme());
         }
         $this->tpl->put('FORM', $this->form->display());
         return new AdminThemesDisplayResponse($this->tpl, $this->lang['themes.delete_theme']);
     } else {
         $error_controller = PHPBoostErrors::unexisting_page();
         DispatchManager::redirect($error_controller);
     }
 }
 public function save(HTTPRequestCustom $request)
 {
     $installed_themes = ThemesManager::get_installed_themes_map();
     foreach ($installed_themes as $theme) {
         if ($request->get_string('delete-' . $theme->get_id(), '')) {
             AppContext::get_response()->redirect(AdminThemeUrlBuilder::delete_theme($theme->get_id()));
         }
     }
     if ($request->get_bool('update', false)) {
         foreach ($installed_themes as $theme) {
             if ($theme->get_id() !== ThemesManager::get_default_theme()) {
                 $id_theme = $theme->get_id();
                 $activated = $request->get_bool('activated-' . $id_theme, false);
                 $authorizations = Authorizations::auth_array_simple(Theme::ACCES_THEME, $id_theme);
                 ThemesManager::change_informations($id_theme, $activated, $authorizations);
             }
         }
         AppContext::get_response()->redirect(AdminThemeUrlBuilder::list_installed_theme());
     }
 }
Exemple #4
0
####################################################
$lang['cat.name'] = 'Test';
$lang['cat.description'] = 'Catégorie de test';
$lang['news.title'] = 'Votre site sous PHPBoost ' . GeneralConfig::load()->get_phpboost_major_version();
$lang['news.content'] = 'Votre site boosté par PHPBoost ' . GeneralConfig::load()->get_phpboost_major_version() . ' est bien installé. Afin de vous aider à le prendre en main, 
l\'accueil de chaque module contient un message pour vous guider dans vos premiers pas. Voici également quelques recommandations supplémentaires que nous vous proposons de lire avec attention : <br />
<br />
<h2 class="formatter-title">N\'oubliez pas de supprimer le répertoire "install"</h2><br />
<br />
Supprimez le répertoire /install à la racine de votre site pour des raisons de sécurité afin que personne ne puisse recommencer l\'installation.<br />
<br />
<h2 class="formatter-title">Administrez votre site</h2><br />
<br />
Accédez au <a href="/admin/">panneau d\'administration de votre site</a> afin de le paramétrer comme vous le souhaitez!  Pour cela : <br />
<br />
<ul class="formatter-ul">
<li class="formatter-li"><a href="' . AdminMaintainUrlBuilder::maintain()->relative() . '">Mettez votre site en maintenance</a> en attendant que vous le configuriez à votre guise.
</li><li class="formatter-li">Rendez vous à la <a href="' . AdminConfigUrlBuilder::general_config()->relative() . '">Configuration générale du site</a>.
</li><li class="formatter-li"><a href="' . AdminModulesUrlBuilder::list_installed_modules()->relative() . '">Configurez les modules</a> disponibles et donnez leur les droits d\'accès (si vous n\'avez pas installé le pack complet, tous les modules sont disponibles sur le site de <a href="http://www.phpboost.com/download/">phpboost.com</a> dans la section téléchargement).
</li><li class="formatter-li"><a href="' . AdminContentUrlBuilder::content_configuration()->relative() . '">Choisissez le langage de formatage du contenu</a> par défaut du site.
</li><li class="formatter-li"><a href="' . AdminMembersUrlBuilder::configuration()->relative() . '">Configurez l\'inscription des membres</a>.
</li><li class="formatter-li"><a href="' . AdminThemeUrlBuilder::list_installed_theme()->relative() . '">Choisissez le thème par défaut de votre site</a> pour changer l\'apparence de votre site (vous pouvez en obtenir d\'autres sur le site de <a href="http://www.phpboost.com/download/">phpboost.com</a>).
</li><li class="formatter-li">Avant de donner l\'accès de votre site à vos visiteurs, prenez un peu de temps pour y mettre du contenu.
</li><li class="formatter-li">Enfin <a href="' . AdminMaintainUrlBuilder::maintain()->relative() . '">désactivez la maintenance</a> de votre site afin qu\'il soit visible par vos visiteurs.<br />
</li></ul><br />
<br />
<h2 class="formatter-title">Que faire si vous rencontrez un problème ?</h2><br />
<br />
N\'hésitez pas à consulter <a href="http://www.phpboost.com/wiki/">la documentation de PHPBoost</a> ou à poser vos question sur le <a href="http://www.phpboost.com/forum/">forum d\'entraide</a>.<br /> <br />
<br />
<p class="float-right">Toute l\'équipe de PHPBoost vous remercie d\'utiliser son logiciel pour créer votre site web !</p>';
Exemple #5
0
$lang['cat.description'] = 'Test category';
$lang['news.title'] = 'Your site within PHPBoost ' . GeneralConfig::load()->get_phpboost_major_version();
$lang['news.content'] = 'Your PHPBoost ' . GeneralConfig::load()->get_phpboost_major_version() . ' website is now installed and running. To help you build your website, 
each module home has a message to guide you through its configuration. We strongly recommand to do the followings :  <br />
<br />
<h2 class="formatter-title">Delete the "install" folder</h2><br />
<br />
For security reasons, you must delete the entire "install" folder located in the PHPBoost root directory.
Otherwise, some people may try to re-install the software and in that case you may lose datas.
<br />
<h2 class="formatter-title">Manage your website</h2><br />
<br />
Access the <a href="/admin/">Administration Panel</a> to set up your website as you wish.
To do so : <br />
<br />
<ul class="formatter-ul">
<li class="formatter-li"><a href="' . AdminMaintainUrlBuilder::maintain()->relative() . '">Put your website under maintenance</a> and you won\'t be disturbed while you\'re working on it.
</li><li class="formatter-li">Now\'s the time to setup the <a href="' . AdminConfigUrlBuilder::general_config()->relative() . '">main configurations</a> of the website.
</li><li class="formatter-li"><a href="' . AdminModulesUrlBuilder::list_installed_modules()->relative() . '">Configure the installed modules</a> and give them access rights (If you have not installed the complete package, all modules are available on the <a href="http://www.phpboost.com/download/">PHPBoost website</a> in the resources section.
</li><li class="formatter-li"><a href="' . AdminContentUrlBuilder::content_configuration()->relative() . '">Choose the default content language formatting</a>.
</li><li class="formatter-li"><a href="' . AdminMembersUrlBuilder::configuration()->relative() . '">Configure the members settings</a>.
</li><li class="formatter-li"><a href="' . AdminThemeUrlBuilder::list_installed_theme()->relative() . '">Choose the website style</a> to change the look of your site (You can find more styles on the <a href="http://www.phpboost.com/download/">PHPBoost website</a> in the resources section.
</li><li class="formatter-li">Before giving back access to your members, take time to add content to your website!
</li><li class="formatter-li">Finally, Finally, <a href="' . AdminMaintainUrlBuilder::maintain()->relative() . '">put your site online</a> in order to restore access to your site to your visitors.<br />
</li></ul><br />
<br />
<h2 class="formatter-title">What should I do if I have problems ?</h2><br />
<br />
Do not hesitate to consult the <a href="http://www.phpboost.com/wiki/">PHPBoost documentation</a> or ask your question on the <a href="http://www.phpboost.com/forum/">forum</a> for assistance. As the English community is still young, we strongly recommend that you use the second solution.<br /> <br />
<br />
<p class="float-right">The PHPBoost Team thanks you for using its software to create your Web site!</p>';