zapa40 Posted August 14, 2011 Share Posted August 14, 2011 Bonjour, je souhaite diminuer la taille de la police des tags (Prestashop 1.4.4.0), je ne trouve pas le fichier pour cela, je n'ai pas trouvé de réponse sur le forum bien que la question soit posée plusieurs fois Merci pour votre aide Link to comment Share on other sites More sharing options...
sebgpl Posted August 21, 2011 Share Posted August 21, 2011 Bonjour, Moi j'ai fait ça a et ça marche, tailles différentes dans les tags. Modifier blocktags.php dans Modules-> Blocktags ********************************************************** <?php /* * 2007-2011 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_CAN_LOAD_FILES_')) exit; define('BLOCKTAGS_MAX_LEVEL', 3); class BlockTags extends Module { function __construct() { $this->name = 'blocktags'; $this->tab = 'front_office_features'; $this->version = 1.0; $this->author = 'PrestaShop'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Tags block'); $this->description = $this->l('Adds a block containing a tag cloud.'); } function install() { if (parent::install() == false OR $this->registerHook('leftColumn') == false OR $this->registerHook('header') == false OR Configuration::updateValue('BLOCKTAGS_NBR', 10) == false) return false; return true; } public function getContent() { $output = '<h2>'.$this->displayName.'</h2>'; if (Tools::isSubmit('submitBlockTags')) { if (!$tagsNbr = Tools::getValue('tagsNbr') OR empty($tagsNbr)) $output .= '<div class="alert error">'.$this->l('Please fill in the "tags displayed" field.').'</div>'; elseif ((int)($tagsNbr) == 0) $output .= '<div class="alert error">'.$this->l('Invalid number.').'</div>'; else { Configuration::updateValue('BLOCKTAGS_NBR', (int)($tagsNbr)); $output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>'; } } return $output.$this->displayForm(); } public function displayForm() { $output = ' <form action="'.$_SERVER['REQUEST_URI'].'" method="post"> <fieldset><legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend> <label>'.$this->l('Tags displayed').'</label> <div class="margin-form"> <input type="text" name="tagsNbr" value="'.(int)(Configuration::get('BLOCKTAGS_NBR')).'" /> <p class="clear">'.$this->l('Set the number of tags to be displayed in this block').'</p> </div> <center><input type="submit" name="submitBlockTags" value="'.$this->l('Save').'" class="button" /></center> </fieldset> </form>'; return $output; } /** * Returns module content for left column * * @param array $params Parameters * @return string Content * * @todo Links on tags (dedicated page or search ?) */ function hookLeftColumn($params) { global $smarty; $tags = Tag::getMainTags((int)($params['cookie']->id_lang), (int)(Configuration::get('BLOCKTAGS_NBR'))); if (!sizeof($tags)) return ''; $maxLevel = 3; $minLevel = 1; $classPrefix = 'tag_level'; for ($i = 0; $i < sizeof($tags); ++$i) foreach ($tags AS &$tag) $tag['class'] = 'tag_level'.($tag['times'] > BLOCKTAGS_MAX_LEVEL ? BLOCKTAGS_MAX_LEVEL : $tag['times']); $smarty->assign('tags', $tags); return $this->display(__FILE__, 'blocktags.tpl'); } function hookRightColumn($params) { return $this->hookLeftColumn($params); } function hookHeader($params) { Tools::addCSS(($this->_path).'blocktags.css', 'all'); } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now