Tagadelic

Bèr Kessels - June 9, 2005 - 22:00

Tagadelic is a small module, without any databases, or configuration, that generates a page with weighted tags. The cool thing is that by merely altering font sizes, these lists suddenly gain a dimension.
Tagadelic offers various ways to add terms and vocabularies in one tag cloud. By using the urls, you can create your own clouds pages.
It also offers a sideblock for each taxonomy tree.

Because examples are cooler to look at then PHP or ugly ASCIIart READMEs, we want your implementation of tagadelic. Please post it in a comment to this project.

We are testing a really nice third-party feature-request system. Please use FeVote to vote for- or add, your favorite Tagadelic features

Related modules

Releases

Official releasesDateSizeLinksStatus
6.x-1.02008-Feb-2717.8 KBRecommended for 6.xThis is currently the recommended release for 6.x.
5.x-1.02008-Feb-1016.75 KBRecommended for 5.xThis is currently the recommended release for 5.x.
4.7.x-2.02006-Nov-159.67 KBRecommended for 4.7.xThis is currently the recommended release for 4.7.x.
Development snapshotsDateSizeLinksStatus
6.x-1.x-dev2008-Apr-2917.82 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.
5.x-1.x-dev2008-May-0216.77 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.

folktunes.org is tagadelic (example)

forresto - March 16, 2006 - 21:45

http://folktunes.org/tags

All tags are input with free-tagging, but structured in main categories:
http://folktunes.org/artists
http://folktunes.org/songs
http://folktunes.org/instruments
etc...

Tagadelic rocks.

Good Stuff...

marcopolo - April 16, 2006 - 12:39

I think the the readme file needs more information on how to setup this module.
Anyway after a few searches I was well on my way:

http://blog.photos2view.com/tagadelic-drupal.htm

Maybe the setup steps that can be included in the readme file are:

1 Upload the .module and the .css file to your modules folder
2 Activate the module from admin>modules
3 Activate the block if you want
4 or use a php snippet from http://wiki.bryght.com/tags/tagadelic-module to display in a page.

marcopolo ---
Blog | Photography | Best Designed Drupal Websites | Share Trading | Forex Trading |

Tagadelic:displaying all category/vocabulary tags in one block.

robbdavis - October 25, 2006 - 22:37

<?php
drupal_set_html_head
('<style type="text/css">@import url('.drupal_get_path('module','tagadelic').'/tagadelic.css);</style>');
$vocs[] = 3; //  id of the vocabulary of which you want to display a tag cloud
$output = theme('tagadelic_weighted',tagadelic_get_weighted_tags($vocs));
print
$output;
?>

This PHP snippet from bryght.com only displays tags from one particular vocabulary. Anyone know how I display all tags from all vocabularies in a block? Seems like it should be simple but I can't figure it out.

Thanks

Edit: I figured it out. $vocs[] needed to be initialized as an array with all the vocabulary numbers listed like so:

$vocs[] = 1;
$vocs[] = 2;
$vocs[] = 3; etc....

One line

ericwagner - November 9, 2006 - 22:18

You can do it on one line like this:

$vocs = array(1,2,3,4,5,6,7,8,9); // or whatever vocabularies you want

check this tags out:

kerstin_meyer - March 30, 2007 - 10:32

check out my implementation: http://www.onlinestreet.de/tags/

超级喜欢..

gz88 - April 17, 2006 - 19:33

超级喜欢..

According to

marcopolo - April 18, 2006 - 03:10

According to http://babelfish.altavista.com

this means

either "Super likes" or "Super? Happiness?"

marcopolo ---

Without babelfish, I can

beginner - May 14, 2006 - 09:10

Without babelfish, I can tell you that it means: "I like this module very much". :)

Cool module: that's exactly what I was looking for. I'm going to use it with wechange.

thanks.

--
http://www.reuniting.info/
Healing with Sexual Relationships.
http://www.wechange.org/
We live in a world of solutions.

www.senserely.com

alliax - April 19, 2006 - 04:35

An example on Senserely.com using tags in the whole vocabulary plus tags in the content. Works very well so far! Thank you.

Rss reader

szczym - May 22, 2006 - 19:18

Helo

http://cuckarnia.bzzz.net/tagadelic
Cuckarnia is an rss reader of few sites around bzzz and indymedia, 95% Polish language content. Made on aggregator2 and still 4.6

___
Obin.org - Independent media workshop

I just needed to

nbran@www.drupa... - June 6, 2006 - 19:48

I just needed to say...

Thanks !!!

The module works perfect...

---
Visit...
http://mysoul.go.dyndns.org
My soul...
Find your other... half !

thanks for this module!! my

rainer7 - July 30, 2006 - 19:57

thanks for this module!!

my website: http://www.digitalreise.de

SynthWise uses tagadelic in a simple way

unrev.org - October 4, 2006 - 00:27

Just finished updating a new theme for an existing site.

It uses tagadelic in a very simple way:

SynthWise Tags

There is only one vocab, and everything on the site is identified by /tag/thing - makes for an easy structure, easy pathauto and all that.

So there's another one!

Cheers for the fabuloso module.

Chapman

This looks great but....

bjraines - October 7, 2006 - 19:26

How do you get it to display on the main page?

Depends on what you mean by main page

joshk - October 12, 2006 - 15:47

You can set your drupal frontpage to be /tagadelic in the settings, or if you want to get fancy you can use the frontpage.module (or your own theme trickery or one of the many other neato-front modules) to add this call to whatever makes your frontpage happen:

theme('tagadelic_weighted', tagadelic_get_weighted_tags(array($vocabulary->vid))));

If you're doing this by hand, you'll want to replace $vocabulary->vid with the ID number of your tagging vocab.

------
Personal: Outlandish Josh
Professional: Chapter Three

Tagadelic in Drupal 5.0

rszrama - November 4, 2006 - 17:57

I converted the module and am using it in my newly redesigned 5.0 site:

http://ryan.grinhost.net

Free Parkour Uses Tagadelic

unrev.org - November 5, 2006 - 00:36

Hey guys, I'm using the

jorre - November 13, 2006 - 15:49

Hey guys, I'm using the following snippet to include tags in my page.tpl.php file

<?php
drupal_set_html_head
('<style type="text/css">@import url('.drupal_get_path('module','tagadelic').'/tagadelic.css);</style>');
$vocs[] = 3; //  id of the vocabulary of which you want to display a tag cloud
$output = theme('tagadelic_weighted',tagadelic_get_weighted_tags($vocs));
print
$output;
?>

is it possible to add some code there to make it respond to SORT order preferences I set in my module. Right now it only sorts by WEIGTH, but I would prefer sorting by title or random...

Pakfriet.be

Up and running @ http://adverlicio.us

JamesGardner - November 19, 2006 - 19:54

Great tool ~ thanks for creating and sharing it.

http://adverlicio.us/tagadelic

------------------
adverlicio.us | online advertising archive
Powered by Drupal

livbit.com

livbit - November 20, 2006 - 03:06

One of my website uses the tagadelic module...

www.livbit.com

Another Example...

chrishathaway - November 27, 2006 - 18:26

I'm using it on my site, Aggdata

This is the one of the best

bjraines - November 29, 2006 - 01:02

This is by far one of the best modules for Drupal

http://www.opensourcefriends.com - Ask the simple questions.

tag sort order problem... and solution

cquest - January 9, 2007 - 15:06

When tags are using non 7bits chars, they are not sorted correctly.

In tagadelic.module, I made the following change to _tagadelic_sort_by_title in order to use mbstring to sort tags correctly (it works at least for french tags):

Maybe iconv could be used there.

Function "to7bit" comes from php.net.

/**                                                                                                                                                               
* @args string $text line of encoded text                                                                                                                         
*      string $from_enc (encoding type of $text, e.g. UTF-8, ISO-8859-1)                                                                                          
*                                                                                                                                                                 
* @returns 7bit representation                                                                                                                                    
*/                                                                                                                                                                
function to7bit($text,$from_enc) {                                                                                                                                
    if (isset($from_enc))                                                                                                                                         
        $from_enc = mb_detect_encoding($text,"auto");                                                                                                             
    $text = mb_convert_encoding($text,'HTML-ENTITIES',$from_enc);                                                                                                 
    $text = preg_replace(                                                                                                                                         
          array('/&szlig;/','/&(..)lig;/',                                                                                                                        
               '/&([aouAOU])uml;/','/&(.)[^;]*;/'),                                                                                                               
          array('ss',"$1","$1".'e',"$1"),                                                                                                                         
                 $text);                                                                                                                                          
    return $text;                                                                                                                                                 
}                                                                                                                                                                 
                                                                                                                                                                  
/**                                                                                                                                                               
* callback for usort, sort by count                                                                                                                              
*/                                                                                                                                                               
function _tagadelic_sort_by_title($a, $b) {                                                                                                                       
                                                                                                                                                                  
if (extension_loaded('mbstring'))                                                                                                                                 
    return strnatcasecmp(to7bit($a->name), to7bit($b->name));                                                                                                     
else                                                                                                                                                              
    return strnatcasecmp($a->name, $b->name);                                                                                                                     
}                                                                                                                                                                 

Some more Tagadelic examples

Noki - January 18, 2007 - 14:33

Hi!

We use Tagadelic for some of our websites.

1. Informationsarchiv.net - http://www.informationsarchiv.net/

The site contains a news-section that uses tags as categories. The tag-cloud could be found at the index page.

2. Witze-Fun.de - http://www.witze-fun.de/

The site is one of the biggest joke-databases in germany. All jokes are parsed into tags automatically. The results are very good because it's easy to detect nouns in german. The generated tag-cloud could be found at the index page.

YATE - Yet another tagadelic example

unrev.org - January 19, 2007 - 03:16

I wanted to show this site as an example of Drupal 5 and tagadelic working flawlessly together.

Opal Myth Tags

Great module!

Sipi@sipiblog.hu - January 23, 2007 - 14:12

I just want to show how great is this module. My tags: Tagadelic at sipiblog.hu
Keep working, you may release the final for the 5.0!

Wonderfull tag-clouds

DWizzy - January 24, 2007 - 13:26

I just implemented it as part of a 404 page. Great! Perhaps some users would like the ability to use separators between tags, though.

Gradient Colors for different vocabularies

zielgruppe - February 3, 2007 - 19:53

I am using different vocabularies in my page, and I wanted to:

  • show the terms of all vocabularies in one tag cloud
  • display tag weighting not only by fontsize, but also by gradient color
  • have a specific color range for each vocabulary
  • have the actual number of post containing this term in brackets

Here's my website with the example: q14.net
Here's the code (use it for custom block):

<?php
$tags
= array();
$styles = array();
$gradients = array();

// color gradients, from dark to bright
array_push($gradients, array('003300', '336633', '339933', '66cc66', '99ff99' ));
array_push($gradients, array('000033', '003366', '333399', '6666cc', '9999ff' ));
array_push($gradients, array('330000', '663300', '993333', 'cc6666', 'ee9999' ));
array_push($gradients, array('000000', '333333', '666666', '888888', '999999' ));
array_push($gradients, array('003333', '336666', '339999', '669999', '99cccc' ));


$color_counter = 0;
foreach(
taxonomy_get_vocabularies() as $voc) {
  foreach(
tagadelic_get_weighted_tags(array($voc->vid)) as $tag) {
   
array_push($tags, $tag);
  }

 
// set css
 
$css_out.=".t_number{ color: #999}";

  for(
$i = 0; $i <= 10; $i++) {
   
$val = 0.7+$i/10;
   
$css = ".t".$voc->vid."_".$i." {font-size : ".$val."em }";
   
$css .=" .t".$voc->vid."_".$i.":link, .t".$voc->vid."_".$i.":visited { color: #".$gradients[$color_counter][count($gradients[$color_counter])-1].";}";
   
$css_out .= $css; // css should be in head actually
   
if(($i > 1)&&($i % 2 == 0)&& (count($gradients) > 0)) array_pop($gradients[$color_counter]);
  }
 
$color_counter++;
}

print
'<style type="text/css">'.$css_out.'</style>'."\n";

$tags = tagadelic_sort_tags($tags);

// own output method (not using tagadelic_theme()!!)
$output = '<span class="t_number">';
foreach (
$tags as $term) {
     
$output .= ''.l($term->name, taxonomy_term_path($term), array('class' => "t".$term->vid."_".$term->weight));
     
$output .= '('.$term->number_of_posts.')'." \n";
}
$output .= '</span>';

print
$output;



?>

Excellent module and a great snippet!

firstov - February 8, 2007 - 22:47

Excellent module and a great snippet!
Thanks much!
firstov.com
allcraftsonline.com

New site using tagadelic

yowzer - March 10, 2007 - 22:44

This is a great plugin! Keep up the good work.

Gamer Chicks Rule!
http://www.gamerchicksrule.com/content/
http://www.gamerchicksrule.com/content/tagadelic

Other site with module

apele - December 17, 2007 - 21:47

http://www.bestplacesofworld.com

Tagadelic and Gview module

Tagadelic Block Sorting in Drupal 5.1

jordanlewin - March 23, 2007 - 20:05

I've created a custom block to display a tag cloud using this code:

<?php
$vocs
= array(1,3);
$output = theme('tagadelic_weighted',tagadelic_get_weighted_tags($vocs));
print
$output;
?>

The tags it displays are not able to sort by title, currently only by weight. Anyone have any ideas why this won't let me sort the tags by title? I've set it to sort by title in the Taxonomy settings page. Is this a bug that hasn't been fixed yet for Tagadelic module for Drupal 5.1?

panduan dot org is tagadelic

rajaiskandarshah - April 4, 2007 - 07:30

was easy to set up - tho a simple instruction in the readme.txt will be helpful for complete newbies.

http://panduan.org/

Raja Iskandar Shah
Consulting for Malaysian Business
www.norazilaco.biz

another website using

rainer7 - April 4, 2007 - 17:28

another website using tagadelic. thanks.

www.zhulu.de

Abduzeedo

hayesr - April 11, 2007 - 20:47

This is not my site but has a very cool implementation of this module.

http://www.abduzeedo.com

Stock implementation

skwashd - April 16, 2007 - 05:24

I only display it in for my blog on my site, that may change if I get some time to play with it some more. It does what I want for now :)

Thanks for the nice module.

I will use it for my little

compiler - May 6, 2007 - 15:45

I will use it for my little site, so i'm curious about how stable it work.

Very good but problem with unpublished nodes

unghander - April 27, 2007 - 17:10

I have a little problem:

Can Tagadelic show only Tags from Nodes with the status "published"? Because it shows all Tags even those from unpublished nodes.

Another example...

Tyler Durden - May 7, 2007 - 18:55

Tagadelic module works perfect!! Thanks a lot!!

politeh.ridne.net - website of the students' union of Lviv Polytechnic National University (Ukraine)

Hi Tyler Which version of

danmurf - May 14, 2007 - 12:57

Hi Tyler

Which version of the tagadelic module are you using?

Many thanks
Dan

Hi, Dan! I think it's

Tyler Durden - May 21, 2007 - 21:46

Hi, Dan!

I think it's 4.6.x-1.x-dev

Here it is!

latte - May 31, 2007 - 00:48

http://www.rockstarlove.com

Still working on some of the UI and color scheming.
It also uses Leech module with the Yahoo Terms plugin. I set up a cron to run every 30 min. to grab Rss Feeds from the top celeb gossip sites.

I think i need to tone down the pink a bit. ;)

Pretty cool me thinks.

Latte/

Tagadeic helps EMF Pollution Remediation

levavie - June 28, 2007 - 05:41

See the left sidebar of EMF Pollution & Remediation

Amnon
-
Professional: Drupal Israel | Drupal Search
Personal: Hitech Dolphin: Regain Simple Joy :)

Exclude rather than Include categories

klktrk - July 17, 2007 - 04:40

Sometimes, as an admin, it's much easier to figure out (and easier to see) what you DON'T want in a tag cloud, as opposed to figuring out what you want included (and being left wondering if something isn't showing up just because it wasn't popular enough, or if there's something wrong with your code). For those few, here's a solution:

Put this in your template file:

<?php
/**
* Function based on tagadelic module, but customized for afterl use
* @param array $excluded_vids An array of vocabulary ids to not include in the output
* @param int $number_of_tags The number of tags to output. If not set, or set to 0, will default to global tagadelic settings
* @param int $steps The number of gradations from maximum popularity to lowest. If not set, or set to 0, will default to global tagadelic settings.
*/
function hottest_tags($excluded_vids = array(), $number_of_tags = 0, $steps = 0) {
 
//Let's fire off an error if the tagadelic module is not installed
 
if (!module_exist('tagadelic')) return t('The hottest tags function requires the tagadelic module.');

  if (empty(
$number_of_tags)) $number_of_tags = variable_get('tagadelic_page_amount', '60');
  if (empty(
$steps)) $steps = variable_get('tagadelic_levels', 6);

 
// query adapted from tagadelic module (tagadelic_get_weighted_tags)
  // returns a result set ordered by count, of tags NOT in passed categories.
 
if (empty($excluded_vids)) {
   
$result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', 0, $number_of_tags);
  }
  else {
   
$result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid WHERE d.vid NOT IN ('.substr(str_repeat('%d,', count($excluded_vids)), 0, -1) .') GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $excluded_vids, 0, $number_of_tags);
  }
 
//build weighting using tagadelic's built-in code
 
$tags = tagadelic_build_weighted_tags($result, $steps);
 
//sort the tags per global tagadelic settings
 
return theme('tagadelic_weighted', tagadelic_sort_tags($tags));
}
?>

then, make a new block (content type PHP), and put this in there:

<?php
/** The following variables can be left unset, if desired, and the defaults from the tagadelic module will be used */

/** @var array $excluded vids To exclude categories (vocabularies), set it like this: array(catID, catID, catID) */
$excluded_vids = array(1,2,3,4,5,6,7,8,346,350);

/** @var int $number_of_tags How many tags do you want in the output? */
$number_of_tags = 0;//0 means: Use the tagadelic module's setting

/** @var int $steps How many steps of gradation between most popular and least popular? */
$steps = 0;//0 means: Use the tagadelic module's setting.

print hottest_tags($excluded_vids, $number_of_tags, $steps);
?>

We're using this on afterellen.com to great effect. Thanks to all the contributors on here who got me started in the right direction.

Great site

lsabug - September 16, 2007 - 22:49

and thanks for the code.

Thx, great code

ACEBYTE - November 23, 2007 - 21:03

Thx klktrk, you can see my tags block in my web

http://www.acebyte.com
-= ACEBYTE =-

hey klktrk, do you know a

Lausch - March 16, 2008 - 05:29

hey klktrk,

do you know a way to create a tagcloud only with tags submitted by an user?

regards

Lausch

My blog use that module

andyceo - January 8, 2008 - 18:54

Here it is - http://andyceo.ruware.com

Hello and thanx, from Russia, Ulyanovsk! :)

Display number of tags

caprenter - February 4, 2008 - 09:52

I've altered a line in the module so that the number of tags appears when you rest your mouse (or focus on) a term in the tag cloud.

In tagadelic.module (I'm using Drupal 5, $Id: tagadelic.module,v 1.36.2.3 2007/03/13 09:58:31 ber Exp $) line 293:
    $output .= l($term->name, taxonomy_term_path($term), array('class'=>"tagadelic level$term->weight") ." \n";

Change it to this:

    $output .= l($term->name, taxonomy_term_path($term), array('class'=>"tagadelic level$term->weight", 'title'=>"Number of posts with this tag: $term->number_of_posts")) ." \n";

You should of course do this as a theme override function (see http://drupal.org/node/55126), and leave your tagadelic module alone! To do that you would put the whole theme function (found at line 287 in the module) in your template.php file. (change (your theme name here) to well, the name of your theme and no brackets!):

/**
* theme function that renders the HTML for the tags
* @ingroup themable
*/
function (your theme name here)_tagadelic_weighted($terms) {
  foreach ($terms as $term) {
    $output .= l($term->name, taxonomy_term_path($term), array('class'=>"tagadelic level$term->weight", 'title'=>"Number of posts with this tag: $term->number_of_posts")) ." \n";
  }
  return $output;
}

Hope this useful

Great idea - would be even

csc4 - February 24, 2008 - 10:22

Great idea - would be even better if it could become an option in the standard module

https://www.charlesleaver.com

chukaman - February 26, 2008 - 23:11

Real cool module, How can I

cybershan - February 27, 2008 - 14:49

Real cool module,

How can I set the URL from /Tagadelic to /tag ?

I just want to make the URL more readable.

I am going to redesign my site http://www.you-xi-ji.com by drupalm

Thanks in advance.

URL aliases

leafish_paul - February 27, 2008 - 16:06

Use the path module to add a URL alias from tagadelic -> tag

---
paul byrne
paul.leafish.co.uk | www.leafish.co.uk

Many thanks Paul, it works

cybershan - February 28, 2008 - 00:51

Many thanks Paul, it works now.

Problem

umurcan - March 30, 2008 - 21:37

Tagadelic 6.x-1.x-dev Tagadelic makes weighted tag clouds from your taxonomy terms.
Depends on: Array (missing)

i don't install tagadelic. Why?

A couple of recent sites

unrev.org - April 8, 2008 - 15:23

A couple of recent sites I've done that use tagadelic:

Olympics in Beijing
Freestyle Language

---
d'après moi, it's all part of unrev.org's entelechy

Tagadelic caching

Anshuman - May 11, 2008 - 15:43

Hi All,

I was checking the CVS messages and comparing some checkins, and noticed that a caching solution was provided in version 1.38 (#78573 by arthurf, refer to http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/tagadelic/t... )

However, in the last released stable version 5.x-1.0 (2008-Feb-10), the module file version is 1.36.2.8, which doesnt seem to be having any caching.

Any idea which release has/will have caching for Drupal-5?

Regards,
Anshuman

 
 

Drupal is a registered trademark of Dries Buytaert.