Hi
This is extremely sloppy because I just did it.
What I did was I first made a new file called index_cloud.php in the root folder and put the following code in it:
Quote:
<?php
$range_names = array($main_smarty->get_config_vars('PLIGG_Visual_Tags_All'), $main_smarty->get_config_vars('PLIGG_Visual_Tags_48_Hours'), $main_smarty->get_config_vars('PLIGG_Visual_Tags_This_Week'), $main_smarty->get_config_vars('PLIGG_Visual_Tags_This_Month') , $main_smarty->get_config_vars('PLIGG_Visual_Tags_This_Year')) ;
$range_values = array(0, 172800, 604800, 2592000, 31536000);
if(($from = check_integer('range')) >= 0 && $from < count($range_values) && $range_values[$from] > 0 ) {
$from_time = time() - $range_values[$from];
$from_where = "FROM tags, links WHERE tag_lang='$dblang' and tag_date > FROM_UNIXTIME($from_time) and link_id = tag_link_id and link_status != 'discard'";
$time_query = "&from=$from_time";
} else {
$from_where = "FROM tags, links WHERE tag_lang='$dblang' and link_id = tag_link_id and link_status != 'discard'";
}
$from_where .= " GROUP BY tag_words";
$max = max($db->get_var("select count(*) as words $from_where order by words desc limit 1"), 2);
$coef = ($tags_max_pts - $tags_min_pts)/($max-1);
$main_smarty->assign('tags_largest_tag', $max);
$main_smarty->assign('tags_coef', $coef);
$res = $db->get_results("select tag_words, count(*) as count $from_where order by count desc limit $tags_words_limit");
if ($res) {
foreach ($res as $item) {
$words[$item->tag_words] = $item->count;
}
ksort($words);
$main_smarty->assign('words', $words);
}
$main_smarty->assign('tags_min_pts', $tags_min_pts);
$main_smarty->assign('tags_max_pts', $tags_max_pts);
$main_smarty->assign('tags_words_limit', $tags_words_limit);
if(!($current_range = check_integer('range')) || $current_range < 1 || $current_range >= count($range_values)) $current_range = 0;
if(isset($time_query)){$main_smarty->assign('time_query', $time_query);}
$main_smarty->assign('current_range', $current_range);
$main_smarty->assign('range_names', $range_names);
$main_smarty->assign('range_values', $range_values);
$main_smarty->assign('count_range_values', count($range_values));
?>
|
You could cut out the unneeded parts. I basically copied some portions of the cloud.php file
Then I went to index.php and put
Quote:
|
include('index_cloud.php');
|
right after the other include lines
Then I went to templates\all_sidebar.tpl
and put
Quote:
<div id="tagcloud">
<div style="margin: 20px 0 20px 0; line-height: {$tags_max_pts}pt; margin-left: 100px;">
{foreach from=$words item=count key=word}
{$size = $tags_min_pts + ($count-1)*$tags_coef}
<span style="font-size: {math equation="x + (y - 1) * z" x=$tags_min_pts y=$count z=$tags_coef}pt"><a href=" index.php?search={$word}{$time_query}&tag=true ">{$word}</a></span>
{/foreach}
</div>
</div>
|
Next in your CSS file you could create a
block and style it as you want.
This is solution is probably overkill but it works. I will try to make it better and post the solution