lettersets Posted February 19, 2012 Share Posted February 19, 2012 Hi, I am installing and configuring Prestahop and now all the tags in my Tag block cloud have the same font size. I tried looking into the settings but everything looks fine. How can I change it back to the default look, with tags in various font sizes? www.LeukeStickertjes.nl Thanks for your help, Michelle Link to comment Share on other sites More sharing options...
hxd Posted February 19, 2012 Share Posted February 19, 2012 You can try and re-upload the blocktags.css file for the theme that you use, and see if that works. If you have the unzipped theme files on your local computer browse to /css/modules/blocktags/blocktags.css and upload the file to the root PrestaShop directory on your hosting account in the corresponding location (e.g. /themes/name_of_theme/css/modules/blocktags), overwritting the old file. Clear the browser cache, and any other cache that you might have enabled, and reload the site to see whether that works. If you have made any custom changes to the code of the old blocktags.css file, they will be overwritten by the new one. Hope this helps. Link to comment Share on other sites More sharing options...
lettersets Posted February 25, 2012 Author Share Posted February 25, 2012 Thanks for your reply, hxd, I followed the above steps but unfortunately it made no difference. Any idea what else it might be? Thanks, Michelle Link to comment Share on other sites More sharing options...
lettersets Posted February 25, 2012 Author Share Posted February 25, 2012 Update: when I switch back to the standard Prestashop theme I have the same issue, so my guess is that the lines causing all the fonts to be the same size is in a different folder than the themes folder. Thoughts on where to look? Link to comment Share on other sites More sharing options...
arvprod Posted February 25, 2012 Share Posted February 25, 2012 I had the same problem. I've just made some corrections to the module. It seems to me that it doesn't work for tags with more than 3 occurences (!!!) define('BLOCKTAGS_MAX_LEVEL', 3); in bloctags.php I didn't find anything in Prestashop issue tracker though... in blocktags.php, I modified hookLeftColumn() function. the folowing 2 lines in the function function hookLeftColumn($params){ global $smarty; ... foreach ($tags AS &$tag) $tag['class'] = 'tag_level'.($tag['times'] > BLOCKTAGS_MAX_LEVEL ? BLOCKTAGS_MAX_LEVEL : $tag['times']); ... } are replaced by: $maxTimes=0; foreach ($tags AS &$tag) { if((int)$tag['times'] > $maxTimes) { $maxTimes= (int)$tag['times']; } } foreach ($tags AS &$tag) { $classLvl= ceil( (int)$tag['times'] / $maxTimes * BLOCKTAGS_MAX_LEVEL ); $tag['class'] = 'tag_level'.($classLvl); } You should have in your blocktags.css something like: a.tag_level0 { font-size: 0.9em; color: #888 !important } a.tag_level1 { font-size: 1em; color: #666 !important } a.tag_level2 { font-size: 1.4em } a.tag_level3 { font-size: 1.8em; font-weight: bold } (don't forget to hook the module to the "Header of pages" hook) Link to comment Share on other sites More sharing options...
lettersets Posted March 9, 2012 Author Share Posted March 9, 2012 Thanks for your reply arvprod, and sorry for being late in getting back to you - I was on holiday. A couple of questions: 1. Do I change anything to define('BLOCKTAGS_MAX_LEVEL', 3); 2. You mention replacing certain lines, for me it looks slightly different. Do I replace this entire piece? function hookLeftColumn($params) { global $smarty; $tags = Tag::getMainTags((int)($params['cookie']->id_lang), (int)(Configuration::get('BLOCKTAGS_NBR'))); if (!sizeof($tags)) return false; 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'); } 3. How do I "hook the module to the "Header of pages" hook"? I have no idea what that means. Thanks for your help! Michelle Link to comment Share on other sites More sharing options...
lettersets Posted April 1, 2012 Author Share Posted April 1, 2012 Okay, it took a while but the following fix from avprod worked: replace foreach ($tags AS &$tag) $tag['class'] = 'tag_level'.($tag['times'] > BLOCKTAGS_MAX_LEVEL ? BLOCKTAGS_MAX_LEVEL : $tag['times']); ... by $maxTimes=0; foreach ($tags AS &$tag) { if((int)$tag['times'] > $maxTimes) { $maxTimes= (int)$tag['times']; } } foreach ($tags AS &$tag) { $classLvl= ceil( (int)$tag['times'] / $maxTimes * BLOCKTAGS_MAX_LEVEL ); $tag['class'] = 'tag_level'.($classLvl); } 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