public function __construct($view, $title_page) { parent::__construct($view); $lang = LangLoader::get('common', 'media'); $this->set_title($lang['module_title']); $this->add_link(LangLoader::get_message('categories.management', 'categories-common'), MediaUrlBuilder::manage_categories()); $this->add_link(LangLoader::get_message('category.add', 'categories-common'), MediaUrlBuilder::add_category()); $this->add_link($lang['media.management'], MediaUrlBuilder::manage()); $this->add_link($lang['media.actions.add'], MediaUrlBuilder::add()); $this->add_link(LangLoader::get_message('configuration', 'admin-common'), MediaUrlBuilder::configuration()); $env = $this->get_graphical_environment(); $env->set_page_title($title_page, $lang['module_title']); }
public function get_actions_tree_links() { $lang = LangLoader::get('common', 'media'); $tree = new ModuleTreeLinks(); $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), MediaUrlBuilder::manage_categories()); $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), MediaUrlBuilder::manage_categories())); $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), MediaUrlBuilder::add_category())); $tree->add_link($manage_categories_link); $manage_media_link = new AdminModuleLink($lang['media.manage'], MediaUrlBuilder::manage()); $manage_media_link->add_sub_link(new AdminModuleLink($lang['media.manage'], MediaUrlBuilder::manage())); $manage_media_link->add_sub_link(new AdminModuleLink($lang['media.actions.add'], MediaUrlBuilder::add())); $tree->add_link($manage_media_link); $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), MediaUrlBuilder::configuration())); if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) { $tree->add_link(new ModuleLink($lang['media.actions.add'], MediaUrlBuilder::add(), MediaAuthorizationsService::check_authorizations()->write() || MediaAuthorizationsService::check_authorizations()->contribution())); } return $tree; }
* ################################################### * * This program is a free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ #################################################### # English # #################################################### $lang['root_category_description'] = 'Welcome to the multimedia section of the website! <br /><br /> One category and one file were created to show you how this module works. Here are some tips to get started on this module. <br /><br /> <ul class="formatter-ul"> <li class="formatter-li"> To configure or customize the module homepage your module, go into the <a href="' . MediaUrlBuilder::configuration()->relative() . '">module administration</a></li> <li class="formatter-li"> To create categories, <a href="' . MediaUrlBuilder::add_category()->relative() . '">clic here</a></li> <li class="formatter-li"> To create multimedia files, <a href="' . MediaUrlBuilder::add()->relative() . '">clic here</a></li> </ul> <br />To learn more, don \'t hesitate to consult the documentation for the module on <a href="http://www.phpboost.com">PHPBoost</a> website.';
* ################################################### * * This program is a free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ###################################################*/ #################################################### # French # #################################################### $lang['root_category_description'] = 'Bienvenue dans l\'espace multimédia du site ! <br /><br /> Une catégorie et un fichier ont été créés pour vous montrer comment fonctionne ce module. Voici quelques conseils pour bien débuter sur ce module. <br /><br /> <ul class="formatter-ul"> <li class="formatter-li"> Pour configurer ou personnaliser l\'accueil de votre module, rendez vous dans l\'<a href="' . MediaUrlBuilder::configuration()->relative() . '">administration du module</a></li> <li class="formatter-li"> Pour créer des catégories, <a href="' . MediaUrlBuilder::add_category()->relative() . '">cliquez ici</a> </li> <li class="formatter-li"> Pour créer des fichiers multimédias, <a href="' . MediaUrlBuilder::add()->relative() . '">cliquez ici</a></li> </ul> <br />Pour en savoir plus, n\'hésitez pas à consulter la documentation du module sur le site de <a href="http://www.phpboost.com">PHPBoost</a>.';