vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Animated Flash Tags Widget , Flash Tag Cloud (https://vborg.vbsupport.ru/showthread.php?t=237643)

ngcoders 03-05-2010 10:00 PM

Animated Flash Tags Widget , Flash Tag Cloud
 
1 Attachment(s)
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/

dihuta 03-06-2010 12:09 PM

Great! But some characters doesn't display.

I found an arcticle which explain how to embed more characters (utf-8, other languages) into WP-Cumulus, but This vbulletin tagcloud version may different. Could you please give us the source code version?

Thank you very much.

is_it_me 03-06-2010 12:54 PM

Loving it. :)

Any way for this newbie to be able to get it to work as a 'forum block' too?

denman75 03-06-2010 01:16 PM

lol its nice ,tnx for this

haXan 03-06-2010 02:05 PM

Like at Wordpress tag cloud...

Thanks...

ngcoders 03-06-2010 02:05 PM

The source is available at WP-Cumulus wordpress page, I have modified it. Can you tell which character are causing issues.

ericgtr 03-06-2010 03:17 PM

Great mod here, installed!

Candostum 03-06-2010 03:51 PM

Great mod thanks installed.

GiveMeABreak 03-06-2010 05:50 PM

with cyrillic errors in charset...

DjEddie 03-06-2010 09:41 PM

hi i get this error once everythings been installed and checked ..

PHP Code:


Warning
array_values() [function.array-values]: The argument should be an array in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 35

Warning: Wrong parameter count for max() in [path]/packages/vbcms/widget/execphp.php(177) : eval()'
d code on line 35

Warning
array_values() [function.array-values]: The argument should be an array in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 36

Warning: Wrong parameter count for min() in [path]/packages/vbcms/widget/execphp.php(177) : eval()'
d code on line 36

Warning
Invalid argument supplied for foreach() in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 47 

any help ?

thank you :)

WNYorker 03-06-2010 09:53 PM

When i click a tag it takes it to a dead link.

For example, i click "Clown" and it takes me to mysite.com/clown.

Any help?

dihuta 03-06-2010 11:18 PM

Quote:

Originally Posted by ngcoders (Post 1998494)
The source is available at WP-Cumulus wordpress page, I have modified it. Can you tell which character are causing issues.

I need to embed these characters so tagcloud.swf can display my language properly (vietnamese).
Character set: ???????????????ĂĐĨŨƠ???????????????ăđĩũơƯĂẠẢẤẦẨẪẬẮ ẰẲẴẶẸẺẼỀỀỂ ưăạảấầẩẫậắằẳẵặẹẻẽềềểỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪễệỉịọỏốồổỗ ộớờởỡợụủứừỬỮỰỲỴ?ỶỸửữựỳỵỷỹ

(Open source file, click textbox and click Character Embedding... button. Paste that characters in to Include these characters and click Auto Fill.)

Could you please help me embed these?

Quote:

Originally Posted by GiveMeABreak (Post 1998615)
with cyrillic errors in charset...

This case you need embed all cyrillic charset (see bellow screenshot). We may need a seperate version of tagcloud.swf for each specific language.

http://photo.tinhte.com/?id=209464&d...een shot 2010-

ngcoders 03-07-2010 05:19 AM

@DjEddie - I think the sql query is not returning tags in your case , are are posts tagged in your site.

@ NYorker - I belive tags returned are for some contenttypeid which i dont know about , this will need you to change $contentTypes array and put in the correct url for it.

Dr.osamA 03-07-2010 06:34 AM

thanx man

but i think this mod don't work in Arabic forums

can use other Character
________
YAMAHA QY10

Diablotic 03-07-2010 07:14 AM

Tagged for future use when all characters are displayed correctly

STORMS 03-07-2010 10:25 AM

Is it possible to display this tag cloud on the Vbulletin Side Bar, on my forum home?

ngcoders 03-07-2010 12:14 PM

@STORMS

add a where to the query - WHERE TagContent.contenttypeid = 2

And it should work fine, itll only access forum tags.

STORMS 03-07-2010 10:31 PM

Quote:

Originally Posted by ngcoders (Post 1999054)
@STORMS

add a where to the query - WHERE TagContent.contenttypeid = 2

And it should work fine, itll only access forum tags.

I'm uncertain how that works.

Also, when I use this on the Vb CMS, all it reads is "Ponder." I'm not sure how I can change that either.

DjEddie 03-08-2010 10:55 AM

Quote:

Originally Posted by ngcoders (Post 1998889)
@DjEddie - I think the sql query is not returning tags in your case , are are posts tagged in your site.

@ NYorker - I belive tags returned are for some contenttypeid which i dont know about , this will need you to change $contentTypes array and put in the correct url for it.

its a new site .. so no tags have been made yet. ... so am i guessin right that those errors that I got is because no tags have been created? .. and if topics had the tags those errors would go away?

darren1981 03-08-2010 11:09 AM

Great mod :)

I wonder is this is SE Friendly tho ?

ngcoders 03-08-2010 01:11 PM

@DjEddie ... Yep , ur right
@darren1981 ... Currently no , but can be made very easily

Doctor Death 03-08-2010 01:39 PM

I put this onto my 4.0.2 install and it remained a blank frame. The install was by the book. Anyone else have that issue?

Thanks!

Mastermaik 03-08-2010 02:16 PM

Same Problem as the doc.


No activity shown...... :(

nextslit 03-08-2010 02:29 PM

Nice mod , thanks : )

ngcoders 03-08-2010 05:36 PM

If its showing blank , it means you have no tags in your system. Please check if you have tagged threads / blog posts.

ThorstenA 03-08-2010 07:53 PM

An integration with the Tag Cloud on Forumdisplay product would be very nice !

pilotxx 03-08-2010 08:02 PM

i found the problem.
the code option[homeurl] did not get the full path. it take it without the "HTTP://".
the same problem is with the links.
can you fix it?

LuckyNeo 03-08-2010 10:30 PM

I'd like to have a cloud of tags for the forum! I would be very grateful if such a hack!

kho91 03-09-2010 03:46 PM

th's don't word with internet explorer

pilotxx 03-09-2010 03:55 PM

Hii

one more problem. my site is in hebrew and i get the hebrew tag as gibrish.
where can i change it to unicode?

Bouncer222 03-14-2010 05:21 AM

I don't use the default CMPS, but use vbadvanced, how to implement it with that?

Jabong82 03-14-2010 08:51 AM

What exactly does this do?

Is this for like search engine optimization?

Dennis Kaczor 03-14-2010 02:35 PM

Hello all, installed this and it seems to be working with the exception when you click on the Tag Cloud link it goes to a black page see below.

http://www.XXXXXXXXX.com/tags.php?ta...s+cherry+beach

This should be for my forum:
http://wwwXXXXXXXXX.com/forums/tags....s+cherry+beach.

What code would I need to change in order for this to work.

Thanks in advance

Dennis

ngcoders 03-15-2010 07:02 AM

Quote:

Originally Posted by Dennis Kaczor (Post 2003431)
Hello all, installed this and it seems to be working with the exception when you click on the Tag Cloud link it goes to a black page see below.

http://www.XXXXXXXXX.com/tags.php?ta...s+cherry+beach

This should be for my forum:
http://wwwXXXXXXXXX.com/forums/tags....s+cherry+beach.

What code would I need to change in order for this to work.

Thanks in advance

Dennis

replace

$vbulletin->options['homeurl']

with

$vbulletin->options['homeurl'].'/forums/'

Dennis Kaczor 03-15-2010 01:36 PM

Quote:

Originally Posted by ngcoders (Post 2003917)
replace

$vbulletin->options['homeurl']

with

$vbulletin->options['homeurl'].'/forums/'

This looks so simple, yet it does not seem to go to my forums. Is this correct with adding the forums in this area?

Here is the change
PHP Code:


 $url 
$vbulletin->options['homeurl'].'/forums/''/'.$contentTypes[$tag['contenttypeid']].urlencode($tag['tagtext']); 
    
$tagsHTML .= "<a href='$url' style='$size'>$text</a>"

I get this error message on the Home Screen, when I made the changes below

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/XXXXXXXXX/www/www/forums/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 52

Das UndergrounD 03-17-2010 05:21 AM

as I do for version 3.8?

DaanLT 03-17-2010 10:36 AM

Only English chars, big minus. We need international chars support.

sKippah 03-17-2010 03:24 PM

Thanks for this, very nice one. Works fine.

Selcor 03-17-2010 04:19 PM

When I add the widget, shows the error:

Warning: array_values() [function.array-values]: The argument should be an array in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 35

Warning: Wrong parameter count for max() in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 35

Warning: array_values() [function.array-values]: The argument should be an array in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 36

Warning: Wrong parameter count for min() in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 36

Warning: Invalid argument supplied for foreach() in [path]/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 47


:s

Dennis Kaczor 03-19-2010 03:12 PM

Quote:

Originally Posted by Dennis Kaczor (Post 2004082)
This looks so simple, yet it does not seem to go to my forums. Is this correct with adding the forums in this area?

Here is the change
PHP Code:


 $url 
$vbulletin->options['homeurl'].'/forums/''/'.$contentTypes[$tag['contenttypeid']].urlencode($tag['tagtext']); 
    
$tagsHTML .= "<a href='$url' style='$size'>$text</a>"

I get this error message on the Home Screen, when I made the changes below

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/XXXXXXXXX/www/www/forums/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 52

Never mind, found how to solve this....


All times are GMT. The time now is 07:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01488 seconds
  • Memory Usage 1,849KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete