Thread: vBulletin CMS Widgets - Animated Flash Tags Widget , Flash Tag Cloud
View Single Post
  #90  
Old 12-11-2010, 12:05 AM
luciano99999 luciano99999 is offline
 
Join Date: Sep 2009
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE=Mr_Running;2098588]
Quote:
Originally Posted by bandare View Post
Works fine for me but if I click on one of the tags that is linked to an article, I get a 404 error. If its a tag that relates to forum posts it works.... or blogs... just not articles[/QUOTE

Not on articles...this is my finding too.
When using the tag in a search (ie google) found and works but not from the tag cloud.
For articles

replace line 17

$contentTypes = array(2=>'tags.php?tag=',15=>'blog.php?tag=');

with

$contentTypes = array(2=>'tags.php?tag=',18=>'tags.php?tag=',15=>' blog.php?tag=');

PHP Code:
$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=',18=>'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']].urlencode($tag['tagtext']);
    $tagsHTML .= "<a href='$url' style='$size'>$text</a>"; 


$data['tagcloud'] = '<tags>'.$tagsHTML.'</tags>'; 

$flashVars = ""; 

foreach($data as $var=>$val) 

    $flashVars .= (empty ($flashVars))?'':'&amp;'; 
    $flashVars .= "$var=".urlencode($val); 


ob_start(); 
?> 
<embed width="<?php echo $flashWidth;?>" height="<?php echo $flashHeight;?>" flashvars="<?php echo $flashVars;?>"
"  wmode="transparent" allowscriptaccess="always" quality="high" bgcolor="#<?php echo $flashBackgroundColor;?>" name="vbCloudFlash" id="vbCloudFlash" style="" src="<?php echo $vbulletin->options['homeurl'].'/'.$flashPath;?>" type="application/x-shockwave-flash"/> 
<?php 

$content 
ob_get_contents(); 
ob_end_clean(); 

$output $content;
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01114 seconds
  • Memory Usage 1,786KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete