Creating a tag cloud in symfony

As you can see, I've created a tag cloud implementation here on my website. For this, I actually started writing a plugin, and I'm actually still working with that one here. But since the functionality was already implemented in another plugin as well, after a short discussion it was decided that my more limited implementation (just the tag cloud) would be moved to the snippets part of the symfony website as a helper.

As you can see, I've created a tag cloud implementation here on my website. For this, I actually started writing a plugin, and I'm actually still working with that one here. But since the functionality was already implemented in another plugin as well, after a short discussion it was decided that my more limited implementation (just the tag cloud) would be moved to the snippets part of the symfony website as a helper.

So now, my tag cloud is available as a helper, here . Feel free to use it if you want, it's pretty straightforward. It's a simple call to the helper class in your template:

use_helper('Tagcloud');
TagcloudHelper::showCloud($tags);
 

Where $tags is an array with a predetermined format, being tagname => weight, such as this:

array('tag1' => 10, 'tag2' => 15, 'tag3' => 4); 
 

A simple stylesheet then determines the size of the various steps in the cloud. It's easy, and it works ;)


Add comment

Comments

gravatar craig: I cannot get this to work.

I am using SF1.2 and using the helper, I get an error that it is trying to call a Non-Static method (showCloud)


October 20, 2009
gravatar buy dissertation proposal online: I succeded in creating tag clouds, thanks!
May 11, 2011
gravatar Craigslist Hawaii real estate: This factor will make you website more successful and hope so that very soon you will get desired results. Thanks for providing such nice, valuable and informative post. Keep it up
June 9, 2011
gravatar vehicle: Thanks for the codes. But I will not take a chance on it. Just be happy with the plugin in this case.
July 6, 2011
gravatar Boston classifieds: i think this tag cloud is work as a helper and you do good work to create it.i like to read informative blogs and this blog is also so good and helpful.thanks for taking time to discus this topic..
September 26, 2011
gravatar online dating sites: im going to share but i need to ask for more info and don't think that im selfish i just need to share this blog to my workmate..thanks
October 14, 2011
gravatar Suryo: thanks for sharing this, very helpful :lol:
November 30, 2011
gravatar Room for rent in Islamabad: The following article actually established my very own little brown eyes towards the several merchants which usually organizations currently have by means of internet marketing.i like to read informative blogs and this blog is also so good and helpful.thanks for taking time to discus this topic..
December 9, 2011
gravatar coach outlet online: If you buy Coach items at the
coach outlet online

store, the goods will be sent out within 24 hours after confirming your payment and arrive to your door within 7 work days.No one can deny the shopping at the
coach factory outlet

is satisfactory. For the low prices and good quality.
January 29, 2012
gravatar coach outlet: coach outlet

handbags You can not just save your cash but also your time inside a convenient way to obtain the exact same bags product and do not be concerned the shippment of one's products.The
coach outlet store online

are utilized for formal event in company area that will display your excellent taste.Not only does a briefcase make is easier to carry things.
January 29, 2012
gravatar frases engracadas: I acclimated symfony generate:project symfony_project and that appeared to work. Also I had to use symfony generate:app symfony_project for the next footfall too.

January 31, 2012
gravatar Diamond Sofa: Excellent article my friend. This is exactly what I've been looking for for quite a time now...
Thanks for this wonderful post! It has been extremely useful. I wish that you will proceed posting your wisdom with us.
February 7, 2012
gravatar ashley furniture: i found your site on msn, thanks for putting up such a beautiful blog.
You completed several good points there. I did looking about the issue and found the majority of people will go along with with all your blog.
February 7, 2012
gravatar Robert Michael Furniture : Its amazing, looking at the time and effort you put into your blog and detailed information you provide. I’ll bookmark your blog and visit it weekly for your new posts.
February 24, 2012
gravatar offset patio umbrella: The information provided in this blog helped me tremendously.Now made it easy for me to understand and implement own concept.
February 24, 2012
gravatar Time Warner Cable Packages: This was a great article to say the least. I really do think that this was a great and informative article to read.
February 24, 2012
gravatar coach outlet online: The Coach Outlet Online Store sells many series. The Coach shoulder bags are always the best popular series because they are very practical and beautiful.
March 10, 2012
gravatar Custom Logo: woh I love your blog posts, saved to fav! .
April 17, 2012
gravatar dc skate shoes: Program software performs the function of the program it implements, either by directly providing instructions to the computer hardware or by serving as input to another piece of software. The term was coined to contrast to the old term hardware. Thanks.
April 19, 2012

Php5_zce_logo

Upcoming events

I will be speaking 05-06-2012: Forum PHP
I will be attending 06-06-2012: Symfony Live Paris 2012
I will be attending 07-06-2012: Symfony Live Paris 2012
I will be attending 08-06-2012: Symfony Live Paris 2012
I will be attending 09-06-2012: Symfony Live Paris 2012
I will be attending 23-06-2012: PHP TestFest NL

Tags

1337 2008 2010 2011 4developers access modifiers accessibility AdaLovelaceDay09 advent agavi agile alfred amsterdam apache api apple article articles atk atkMetaNode audioscrobbler autoloading automation azure backwards compatibility barcelona barcodes bash bbc bbq beatstad belgium best practices bittorrent blogging blogs boards of canada book books bughuntday bundle caching cake cal evans calendar career cat cerf certificate cfp cilex clear cms cologne common sense communities community components composer conference conferences contest continuous integration contribute contribution crisis css curl custom d-day datetime DbFinderPlugin decorator decorators deployment deps devdays development directoryindex directoryiterator docblox doctrine documentation download dpc dpc09 dpc10 dpc11 DPC2008 dreamhost drupal dv7 eclipse ed editors efficiency enterprise errors event events expertise ezcomponents facebook filter-branch filteriterator finland flickr fork framework frameworks freelance freeze frontend fun game games geoip germany getting real git github globiterator gnome-do google google calendar googletalk graceful degradation hack hackers hidden gem hiphop howto hp HR html http i386 ibuildings icann ide ideasofmarch idm imovie inclusivity indy ingewikkeld integration international php conference internet interview ipad IPC ipc ipc08 ipc10 ipc11se iterators iterm2 javascript jenkins jenkins-php job job openings jobeet john peel joomla joomladays kiva kubuntu launcher launchy left on the web libcurl libraries library lighttpd lime linktuesday linux live london loudblog m2ts mac magazines malware mambo marjolein mediterra meeting meme meta methodology micro-financing microframework microsoft migration movie music mysql namespace namespaces netbeans netherlands newsfire nllgg northeastphp nos odmarco open source opinion ORM osx paradiso paris partnership pavilion pear pecl performance personal pfc10 pfc11 pfcongres pfcongrez pfz photo php PHP php5.3 phpabstract phpazure phpBB phpbb phpbelgium phpbenelux phpbnl10 phpday phpdoc phpdocumentor phpgg phpitalia phpnw phpnw08 phpnw11 phpstorm phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations private projects protected prototype PSR-0 public python qa qr codes re2c recruiting refactoring review rewrite ruby on rails san francisco schedule scifi script security sensio seven things sfdaycgn sflive2011 shell scripting silex simplexml slides smfony software sogeti solar sound speakers spl ssh standard standards star trek static steer strings stylesheets subversion symfony symfony live Symfony2 symfonycamp symfonyday symfonylive symfonyUnderControlPlugin talk talks tech techademy technology techportal tek09 telecommuting terratec terrorism testfest testing textmate textpattern the right tool timeout tips tld todo tomas tools training twig uncon unet usability usergroup validation vhost video vim vinyl virus warp webinar weblogging webservices wiki windows winphp women wordpress work workshop world world of warcraft wpi writing wunderlist xml xpath xsd yara year youtube zc11 ZCE zemanta zend zend framework zend server zend studio zendcon Zend_Form zite
© 2004 - 2012 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Delicious, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.4.0.1