Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Animated Flash Tags Widget , Flash Tag Cloud Details »»
Animated Flash Tags Widget , Flash Tag Cloud
Version: 1.00, by ngcoders ngcoders is offline
Developer Last Online: Sep 2012 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.x Rating:
Released: 03-05-2010 Last Update: Never Installs: 187
Auto-Templates
Re-useable Code Additional Files  
No support by the author.

Flash Tag Cloud

Released 6/3/2010
By Vikas - http://www.ngcoders.com
Demo - http://www.roboticsindia.com , Look at left sidebar

Installation
  • Goto Admincp->vBullietin CMS->Widgets->Create New Widget
  • Choose PHP Direct Execution as Widget's Type
  • Place a Title. eg Upcoming Events. Keep it short as this is what will appear as title on your pages.
  • Click Save
  • Click Configure on the right of the new created widget.
  • Remove the default code that appears. Be sure to not leave behind even a single letter.
  • Copy and Paste the code that you can find below.
  • Leave the template name as is (vbcms_widget_execphp_page)
  • Click Save
  • Goto Admincp->vBullietin CMS->Layout Manager
  • Click Go on the Default Layout
  • Add the Widget to your Layout
  • Click Save
  • Download the attached tagcloud.zip and extract it.
  • Upload tagcloud.swf to root directory of your vbulletin install
  • That's all !!

PHP Code

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=',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;
It is based on WP-Cumulus , to change settings please refer to this page -

http://www.roytanck.com/2009/03/11/h...us-shortcodes/

Download Now

File Type: zip tagcloud.zip (33.7 KB, 1414 views)

Screenshots

File Type: jpg tagcloud.jpg (16.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
4 благодарности(ей) от:
misericorde, Popa Andrei, Teascu Dorin

Comments
  #132  
Old 11-14-2012, 10:19 AM
s_cocis s_cocis is offline
 
Join Date: Nov 2011
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

4.2.0
ok!
Reply With Quote
  #133  
Old 11-21-2012, 01:27 PM
Neptun Neptun is offline
 
Join Date: Aug 2003
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this Widget working without problems on
vb 4.1.10 ?!

Thank you
Reply With Quote
  #134  
Old 12-27-2012, 07:35 AM
DoumDoum5058 DoumDoum5058 is offline
 
Join Date: Feb 2012
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

This widget is working on VBulletin 4.2
The PHP code is :

PHP Code:
$flashWidth  = '275px'; 
$flashHeight = '275px'; 
$flashPath = 'tagcloud.swf'; 
$flashBackgroundColor = 'ffffff'; 
$tagCount = 35; 
$tagMaxSize = 18; 
$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['bburl'].'/tags/'.$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))?'':'&'; 
    $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;
Thank you for your work ngcoders
Reply With Quote
  #135  
Old 01-23-2013, 12:12 PM
marccap's Avatar
marccap marccap is offline
 
Join Date: Feb 2012
Location: uk
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on 4.2 but its not centered

screen cap - http://gyazo.com/3b14b2d220b3a57bb36ea1c76469c6b0
Reply With Quote
  #136  
Old 01-29-2013, 11:24 PM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it on vb.4.2 pl3 English and none English versions, but not working at all.

There is some issue going on on displaying....

any idea how to get around that?
Reply With Quote
  #137  
Old 03-17-2013, 11:45 AM
john7911 john7911 is offline
 
Join Date: Feb 2013
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
  #138  
Old 08-31-2013, 06:43 PM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using 4.2.1

Was doing fine until I got to this part:

Quote:
? Goto Admincp->vBullietin CMS->Layout Manager
? Click Go on the Default Layout
? Add the Widget to your Layout
? Click Save
There is no default layout. What should we choose?

Thanks.
Reply With Quote
  #139  
Old 09-03-2013, 03:28 PM
davidg davidg is offline
 
Join Date: Apr 2010
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by marccap View Post
Works on 4.2 but its not centered

screen cap - http://gyazo.com/3b14b2d220b3a57bb36ea1c76469c6b0
change from this:
Code:
$flashWidth  = 330; 
$flashHeight = 330;
to:
Code:
$flashWidth  = 250; 
$flashHeight = 250;
Reply With Quote
  #140  
Old 09-14-2013, 11:59 PM
Poker Face Poker Face is offline
 
Join Date: Sep 2010
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does Not Work with 4.2.1, Blank Widget on CMS, made all changes throughout this entire thread to no avail...

Marked as; Installed & Uninstalled

< Removed >

Too Bad, I Like It!
Reply With Quote
  #141  
Old 09-23-2013, 12:17 AM
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Posts: 1,255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everything works great on 4.2.1 but, the flash object is not centered in the widget. How can I correct this?

My widget is set at 300px wide.

I tried decreasing the object width but that did not help.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05328 seconds
  • Memory Usage 2,359KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete