SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: fapencio on May 20, 2014, 10:40:27 PM

Title: Tags Cloud Block of "Tagging System mod"
Post by: fapencio on May 20, 2014, 10:40:27 PM
this is the code of tag cloud (i find it in Tagging.template.php):

Code: [Select]
//Tags cloud
if (!empty($modSettings['tag_cloud_enabled']))
{
echo '
<div class="cat_bar">
<h3 class="catbg">'.$txt['tags_cloud_title'].'</h3>
</div>
<div class="windowbg2">
<div class="content">
<div id="tagcloud">';
$class = array();
if (!empty($context['terms']))
{
foreach ($context['terms'] as $term)
{
$percent = floor(($term['counter'] / $context['maximum']) * 100);
if ($percent < 20)
$class['name'] = 'smallest';
elseif ($percent >= 20 and $percent < 40)
$class['name'] = 'small';
elseif ($percent >= 40 and $percent < 60)
$class['name'] = 'medium';
elseif ($percent >= 60 and $percent < 80)
$class['name'] = 'large';
else
$class['name'] = 'largest';

$class['color'] = (!empty($modSettings['tag_cloud_'.$class['name'].'_color'])) ? 'color:'.$modSettings['tag_cloud_'.$class['name'].'_color'].';' : '';
$class['opacity'] = (!empty($modSettings['tag_cloud_'.$class['name'].'_opacity'])) ? 'opacity:'.$modSettings['tag_cloud_'.$class['name'].'_opacity'].';' : '';
$class['fontsize'] = (!empty($modSettings['tag_cloud_'.$class['name'].'_fontsize'])) ? 'font-size:'.$modSettings['tag_cloud_'.$class['name'].'_fontsize'].';' : '';

echo '
<span style="',!empty($class['opacity']) ? $class['opacity'] : '' ,'" class="'.$class['name'].'">
<a style="',!empty($class['color']) ? $class['color'] : '' ,' ',!empty($class['fontsize']) ? $class['fontsize'] : '','" href="'.$scripturl .'?action=tags;sa=search;id_tag='.$term['id'].'">'.$term['term'].'</a>
</span>';
}
}
else
echo '
<div style="text-align:center;">
'.$txt['tags_no_tags'].'
</div>';

echo '
</div>
</div>
</div>';
}

captura:
(http://i56.servimg.com/u/f56/15/36/53/57/captur21.jpg)

please i want a block of simpleportal with this tagcloud inside, thanks in advance
Title: Re: Tags Cloud Block of "Tagging System mod"
Post by: phantomm on May 21, 2014, 01:40:59 AM
http://simpleportal.net/index.php?topic=11582.0
Title: Re: Tags Cloud Block of "Tagging System mod"
Post by: fapencio on May 21, 2014, 12:50:26 PM
the mod is different, this mod is "Tagging System" the another mod is "Cumulus Congestus"

see the attachments please



Title: Re: Tags Cloud Block of "Tagging System mod"
Post by: phantomm on May 21, 2014, 02:49:17 PM
try php block with:
Code: [Select]
tagCloud();
Title: Re: Tags Cloud Block of "Tagging System mod"
Post by: fapencio on May 21, 2014, 04:57:11 PM
dont work phantomm  :(
Title: Re: Tags Cloud Block of "Tagging System mod"
Post by: phantomm on May 24, 2014, 09:20:03 AM
I guess this is not free mod? I can't find it anywhere..

Try this:
Code: [Select]
tagCloud();
loadTemplate('Tagging');
loadSubTemplate ('main');
Title: Re: Tags Cloud Block of "Tagging System mod"
Post by: fapencio on May 24, 2014, 10:30:49 PM
works, thanks phantomm

1 year ago this mod was free , but was removed from simplemachines.org

http://custom.simplemachines.org/mods/index.php?mod=3579

http://www.simplemachines.org/community/index.php?topic=492347.0

regards    :thumbsup:
SimplePortal 2.3.8 © 2008-2024, SimplePortal