Aides sur les thèmes PHPBoost [Réglé] [PBTV4.1][Menu] ScrollBar Flat
Auteur : PhpCraft
Email : [email protected]
Porté par : Swan
Version de PHPBoost: V4.1.X
Information: Affiche un ScrollBar Vertical ((avec Font Awesome Icons) à droite du corps du site. Cela vous permettra une navigation plus conviviale et simplifiée.
Version : 1.0
1) Installation
1/ Décompressez le .zip, puis transférez le dossier "root/menus/scrollbar" dans le dossier "menus" qui se trouve sur votre serveur.
2/ Rendez-vous dans " Panneau d'administration" > "Contenu" > "Menus" > "Gestion" puis activez le menu "scrollbar" placer le menu ScrollBar en Sous-entête uniquement sous le "ConnectModuleMiniMenu" .
2) Note d'information
Si vous avez plusieurs thèmes, transférez le dossier "root/templates/VOTRE THEME/menus" dans le dossier "root/templates/VOTRE THEME/" qui se trouve sur votre serveur.
Si le scrollbar est décalé, vous pouvez le déplacer en éditant le fichier
- menus/scrollbar/templates/scrollbar.css
- templates/VOTRE THEME/menus/scrollbar/scrollbar.css
En modifiant les positionnement de déplacement à la ligne 40 ou à la ligne 44.
Soit :
Code CSS :
div#scrollbar_header { display: block !important; background-color:#efefef; /* <== couleur du fond */ border-top-right-radius: 5px; border-bottom-right-radius: 5px; margin-left: 1000px; /* <== déplacemet DROITE OU GAUCHE*/ padding-left: 2px; position: fixed; text-align: center; top: 260px; /* <== déplacemet BAS OU HAUT */ width: 29px; /*box-shadow: 2px 2px 5px #656565; <== Ombre de la box optionnel */ }
3) A faire impérativement :
1/ Éditer le body.tpl à la première ligne dans votre thème et placez le code ci dessous comme ceci :
2/ Vers la fin du fichier, toujours dans votre "body.tpl" et placez le code ci dessous comme ceci :
Vos questions
Posez les en dessous de ce sujet.
Télécharger
Swan
Bonjour,
petite correction pour prendre en compte le "blink" des MP :
scrollbar.php à la ligne 143 il faut ajouter :
sinon pas de variable TPL donc pas de blink.
Fichier complet :
Cordialement, janus57
petite correction pour prendre en compte le "blink" des MP :
scrollbar.php à la ligne 143 il faut ajouter :
Code PHP :
'C_HAS_PM' => $User->get_attribute('user_pm') > 0,
sinon pas de variable TPL donc pas de blink.
Fichier complet :
Code PHP :
<?php /************************************************************************************ /* /* Menu : ScrollBar /* ---------------------- /* scrollbar.php /* ---------------------- /* /*Date: 17 Mars 2012 /*Copyright: 2012 PhpCraft (C) /*Email: [email protected] /*Version: Menu ScrollBar v.1.1.0 /*Adapté par : Swan /*Compatible: PhpBoost v.4.0 /************************************************************************************/ /*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 Licensealong with /*this program; if not, write to the Free Software Foundation, Inc., /*51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. /* /************************************************************************************/ /*Adapté par : Swan /*Date : 06/02/2013 /* Email : [email protected] /* Site : http://chez-swan.net/ /************************************************************************************/ /**/ /*$Id: scrollbar.php (*_*) Version : 1.1.0 - 19/03/2012 09:21 $phpcraft*/ /**/ /************************************************************************************/ function menu_scrollbar_scrollbar($position, $block) { global $User, $LANG, $CONFIG, $CONFIG_USER, $CONTRIBUTION_PANEL_UNREAD, $ADMINISTRATOR_ALERTS, $Session, $Sql; // ------------------------------ // Chargement du fichier language // load_menu_lang('scrollbar'); // ------------------------- // Chargement du fichier TPL // $tpl = new FileTemplate('menus/scrollbar/scrollbar.tpl'); MenuService::assign_positions_conditions($tpl, $block); // ------------ // Utilisateurs // if ($User->check_level(MEMBER_LEVEL)) { // ----------------------- // Panneau de contribution // $contribution_number = 0; if ($User->check_level(ADMIN_LEVEL)) { $contribution_number = $CONTRIBUTION_PANEL_UNREAD['r2']; } else { if ($User->check_level(MODERATOR_LEVEL)) { $contribution_number = $CONTRIBUTION_PANEL_UNREAD['r1']; } else { if ($CONTRIBUTION_PANEL_UNREAD['r0'] > 0) { $contribution_number = -1; } if ($contribution_number == 0) { if (!empty($CONTRIBUTION_PANEL_UNREAD['m' . $User->get_attribute('user_id')]) && $CONTRIBUTION_PANEL_UNREAD['m' . $User->get_attribute('user_id')] == 1) { $contribution_number = -1; } } if ($contribution_number == 0) { foreach ($User->get_groups() as $id_group) if (!empty($CONTRIBUTION_PANEL_UNREAD['g' . $id_group]) && $CONTRIBUTION_PANEL_UNREAD['g' . $id_group] == 1) { $contribution_number = -1; break; } } } } // -------------------------- // Date de la dernière visite // $user_last_connect = $Sql->query("SELECT last_connect FROM " . DB_TABLE_MEMBER . " WHERE user_id = '" . $User->get_attribute('user_id') . "'", __LINE__, __FILE__); // -------------------------------------- // Importation des alertes Administrateur // //import('/events/administrator_alert_service.class.php'); // --------------- // Variable du TPL // $tpl->assign_vars(array( 'L_GO_TOP_PAGE' => $LANG['go_top_page'], 'L_GO_BOTTOM_PAGE' => $LANG['go_bottom_page'], 'L_HOME' => $LANG['home'], 'L_USER_CONTROL_PANEL' => $LANG['user_control_panel'], 'L_USER_PM_TITLE' => ($User->get_attribute('user_pm') > 0 ? ($LANG['pm_received'] . ' ' . $User->get_attribute('user_pm') . ' ' . (($User->get_attribute('user_pm') > 1) ? $LANG['pm_new_msgs'] : $LANG['pm_new_msg'])) : $LANG['pm_title']), 'L_CONTRIBUTION_PANEL' => $LANG['contribution_panel'], 'L_CONTRIBUTION_NEW' => $LANG['contribution_new'], 'L_USER_LAST_CONNECT' => $LANG['user_last_connect'], 'L_DISCONNECT' => $LANG['disconnect'], 'L_ADMIN_PANEL' => $LANG['admin_panel'], 'L_MODO_PANEL' => $LANG['modo_panel'], 'USER_PM_IMG' => $User->get_attribute('user_pm') > 0 ? 'pm_new_mini.gif' : 'pm_mini.png', 'NUM_UNREAD_CONTRIBUTIONS' => $contribution_number, 'USER_LAST_CONNECT' => gmdate_format('date_format_short', $user_last_connect), 'NUMBER_UNREAD_ALERTS' => AdministratorAlertService::get_number_unread_alerts(), 'C_UNREAD_CONTRIBUTION' => $contribution_number != 0, 'C_KNOWN_NUMBER_OF_UNREAD_CONTRIBUTION' => $contribution_number > 0, 'C_MODERATOR_AUTH' => $User->check_level(MODERATOR_LEVEL), 'C_ADMIN_AUTH' => $User->check_level(ADMIN_LEVEL), 'C_UNREAD_ALERT' => (bool)AdministratorAlertService::get_number_unread_alerts(), 'C_HAS_PM' => $User->get_attribute('user_pm') > 0, 'U_USER_ID' => url('.php?id=' . $User->get_attribute('user_id') . '&view=1', '-' . $User->get_attribute('user_id') . '.php?view=1'), 'U_USER_PM' => TPL_PATH_TO_ROOT . '/user/pm' . url('.php?pm=' . $User->get_attribute('user_id'), '-' . $User->get_attribute('user_id') . '.php'), 'U_DISCONNECT' => HOST . DIR . '/index.php?disconnect=true&token=' . $Session->get_token() )); } else // Visiteurs { // --------------- // Variable du TPL // $tpl->assign_vars(array( 'L_GO_TOP_PAGE' => $LANG['go_top_page'], 'L_GO_BOTTOM_PAGE' => $LANG['go_bottom_page'], 'L_HOME' => $LANG['home'], 'L_WIKI' => $LANG['wiki'], 'L_FAQ' => $LANG['faq'], 'L_CONNECT' => $LANG['connect'], 'L_REGISTER' => $LANG['register'], 'C_USER_REGISTER' => (bool)$CONFIG_USER['activ_register'] )); } return $tpl->render(); } // // Fin du fichier ! // ---------------- ?>
Cordialement, janus57
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie