- الإهدائات >> |
Animated Flash Tags Widget , Flash Tag Cloud
Animated Flash Tags Widget , Flash Tag Cloud
<div>Flash Tag Cloud
Released 6/3/2010
By Vikas -
Demo - , Look at left sidebar
Installation
<div align="left"><div style="margin:20px; margin-top:5px"> PHP Code:
<div class="alt2"> <div dir="ltr" style="text-align:left;"> <span style="color: #000000"> $flashWidth = 330;
$flashHeight = 330;
$flashPath = 'tagcloud.swf';
$flashBackgroundColor = 'ffffff';
$tagCount = 30;
$tagMaxSize = 16;
$tagMinSize = 8;
// Colors are in hex
$data['tcolor'] = '0x000000';
$data['tcolor2'] = '0x336699';
$data['hicolor'] = '0x000000';
$data['speed'] = 100;
$data['distr'] = 'true';
$data['mode'] = 'tags';
$contentTypes = array(2=>'tags.php?tag=',15=>'blog.php?tag=');
/* No Editing Below This Line*/
global $vbulletin;
// %d
$query = sprintf("SELECT Tag.tagid, Tag.tagtext, TagContent.contenttypeid, COUNT( TagContent.tagid ) AS count FROM ".TABLE_PREFIX."tag AS Tag LEFT JOIN ".TABLE_PREFIX."tagcontent AS TagContent ON ( Tag.tagid = TagContent.tagid ) GROUP BY TagContent.tagid ORDER BY count DESC LIMIT %d",$tagCount);
$qtags = vB::$db->query_read($query);
while($tag = vB::$db->fetch_array($qtags)) {
$tags[] = $tag;
$tagSize[$tag['tagtext']] = $tag['count'];
}
// largest and smallest array values
$maxQty = max(array_values($tagSize));
$minQty = min(array_values($tagSize));
$spread = $maxQty - $minQty;
if ($spread == 0) {
$spread = 1;
}
$step = ($tagMaxSize - $tagMinSize) / ($spread);
// make the tag cloud
$tagsHTML = "";
foreach ($tags as $tag)
{
$size = round($tagMinSize + (($tag['count'] - $minQty) * $step));
$text = $tag['tagtext'];
$url = $vbulletin->options['homeurl'].'/'.$contentTypes[$tag['contenttypeid']& #93;.urlencode($tag['tagtext']);
$tagsHTML .= "$text";
}
$data['tagcloud'] = ''.$tagsHTML.'';
$flashVars = "";
foreach($data as $var=>$val)
{
$flashVars .= (empty ($flashVars))?'':'&';
$flashVars .= "$var=".urlencode($val);
}
ob_start();
?>
الذين يشاهدون الموضوع الآن: 1 (0 من الأعضاء و 1 زائر)
الإجراءات : (من قرأ ؟)
لم يشاهد الموضوع أي عضو حتى الأن.
مواقع النشر (المفضلة)