[PBT 4.1.3] Suppression des colonnes pour HomeCustom

Introduction



Voici comment supprimer tout simplement les colonnes de menu droite et gauche dans le module HomeCustom.

Version de PHPBoost : 4.1.3

C'est parti ..


C'est à placer dans "HomeCustomphpboost HomeCustomHomePageExtensionPoint.class.php" ...

Code PHP :
 
<?php
/*##################################################
 *                     HomeCustomHomePageExtensionPoint.class.php
 *                            -------------------
 *   begin                : August 25, 2012
 *   copyright            : (C) 2012 Kevin MASSY
 *   email                : [email protected]
 *
 *
 ###################################################
 *
 * This program is 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 the 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.
 *
 ###################################################*/
//Edit le 25/01/2015 Par EDN -Swan | http://easy-design.net 
// Enlève les deux colonnes de menus gauche & droit. 
// Pour avoir de nouveau les colonnes: commentez les en début de ligne avec deux "slash" = //
$columns_disabled = ThemesManager::get_theme(get_utheme())->get_columns_disabled();
$columns_disabled->set_disable_left_columns(true);
$columns_disabled->set_disable_right_columns(true);
class HomeCustomHomePageExtensionPoint implements HomePageExtensionPoint
{
private $template;
public function get_home_page()
{
return new DefaultHomePage($this->get_title(), $this->get_view());
}
private function get_title()
{
return LangLoader::get_message('title', 'common', 'HomeCustom');
}
private function get_view()
{
$this->template = new FileTemplate('HomeCustom/home.tpl');
return $this->template;
}
 
}
?>
 



Voilà qui devrait en aider plus d'un ^^


Si vous avez des questions, n'hésitez pas à les poser sur le forum :)


Créé le 25/01/2015, par Swan

Cette page a été consultée 1654 fois