K2 cloud tag module problem

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Oct 06, 2013 12:13 am
Reply with quote
Report this post
Hello!

I'm using this News template (http://demo.gavick.com/joomla25/news/) and I have a problem with the K2 tools module configured to the K2 tags.

As you can see here: (http://demo.gavick.com/joomla25/news/in ... onferences) the Tag Cloud module is configured to be a "list" of elements (tags) but I don't like this way of configuration.

I would want to have a "real" tag cloud (like the one which appears here, for example: (http://getk2.org/extend), with the number of articles and no a list-view.

Is it possible with this template? Or I'm missing something?

Sorry for my english. I'll be looking forward for your response, thanks in advance. :)
User avatar
Fresh Boarder

GK User
Sun Oct 06, 2013 3:29 am
Reply with quote
Report this post
You can use following css code in override.css located in templates css folder, and then enable css override option in template settings > advanced settings > css override "on".

Code: Select all
.k2TagCloudBlock a {
   display: inline;
   background: none!important;
   padding-left: 0px;
   padding-right: 10px;
}


If you want different font sizes then we need to do further edits to module file or use javascript to add class to each element so we can add different font sizes.

See you around...
User avatar
Platinum Boarder

GK User
Sun Oct 06, 2013 11:14 am
Reply with quote
Report this post
Thank you for answering my question normanUK!

As you said, that modification did it, but I also wanted to enable the different font size (as it is configured in the K2 tools module: 75% for the less common tag, and 300% for the most one). And, can the tags show the number of articles with an specific tag between parenthesis?

Thanks in advance. :)
User avatar
Fresh Boarder

GK User
Mon Oct 07, 2013 2:04 am
Reply with quote
Report this post
Hi
Please replace css code with below code.

Code: Select all
.k2TagCloudBlock a {
    background: none repeat scroll 0 0 rgba(0, 0, 0, 0) !important;
    display: inline;
    line-height: 120%;
    padding-left: 0;
}


Open file: templates/gk_news/html/mod_k2_tools/tags.php
Line: 18 which is below
Code: Select all
         <a href="<?php echo $tag->link; ?>" title="<?php echo $tag->count.' '.JText::_('K2_ITEMS_TAGGED_WITH').' '.K2HelperUtilities::cleanHtml($tag->tag); ?>"> <?php echo $tag->tag; ?> </a>


Replace it with below
Code: Select all
         <a href="<?php echo $tag->link; ?>" style="font-size:<?php echo $tag->size; ?>%" title="<?php echo $tag->count.' '.JText::_('K2_ITEMS_TAGGED_WITH').' '.K2HelperUtilities::cleanHtml($tag->tag); ?>"> <?php echo $tag->tag; ?><span>(<?php echo $tag->count;?>)</span></a>


See you around...
User avatar
Platinum Boarder

GK User
Mon Oct 07, 2013 3:24 pm
Reply with quote
Report this post
It worked perfectly. Thank you normanUK. This topic can be closed if you wish.
User avatar
Fresh Boarder

GK User
Mon Oct 07, 2013 9:11 pm
Reply with quote
Report this post
No problem at all, see you around...
User avatar
Platinum Boarder


cron