Wow, it’s a very long time ago I released the last update. But now New Tag Cloud has some new features!
No you are able to filter for tags used in defined categories and skip tags. It’s very nice because you can say: Only display tags used in categories a, b and c but not the tags home, baby and car. I hope you like it!
That’s done too. I’ve implemented a caching feature. For the first time the cloud is generated normal but after generating, the complete HTML code will be written to the database and for every next time the cloud has to been shown, the plugin can read the complete HTML code from the database and can skip the generating process. That’s very cool Oh, the cache will be cleared every time you publish or update an post, so the cloud is up to date (sure, you have the ability to clear the cache manualy).
Often I’ve been asked for a way to filter the tags used by New Tag Cloud. Only tags used in posts from defined categories should be used. Today I found the time to play with possible SQL statements and found a good one:
[sql]SELECT wp_terms.term_id, wp_terms.name, LOWER(wp_terms.name) AS lowername, wp_term_taxonomy.count
LEFT JOIN wp_term_taxonomy ON wp_terms.term_id = wp_term_taxonomy.term_id
LEFT JOIN wp_term_relationships ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id
LEFT JOIN wp_posts ON wp_term_relationships.object_id = wp_posts.ID
WHERE wp_term_relationships.object_id IN
LEFT JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE term_id IN (1,2,…)
AND wp_term_taxonomy.taxonomy = ‘post_tag’
AND wp_term_taxonomy.count > 0
GROUP BY wp_terms.name
ORDER BY wp_term_taxonomy.count DESC[/sql]
This query is very similar to the old one and needs on my system only 0.05 seconds more than the old one. But lets take a look in detail.
We will start in lines 8 – 11. Realy, that is all the magic! This small query returns the IDs of all objects (in our case posts) wich are in the categories wich IDs have been placed in the brackets. Now the main query (lines 1-6 and 13-16) can filter the relevant posts for those, wich are returned by the sub query. Sure, in this case, we have to do a join with the posts table, but cause we are only interested in tags used in already published posts, we have to do it anyway.
So, in the next days I’ll implement this in the plugin and release the new version.
A few minutes ago I tested compatibility between my WordPress installation and the new WordPress 2.5 (nightly build). Everything works. The theme, all plugins (even my New Tag Cloud) and the widgets. So I think it should be possible to upgrade my blog to 2.5 on release date and optimize it later.
Gerade habe ich ein kleines yac Update veröffentlich. Dieses Update löst ein Problem mit bestimmten Formatierungszeichen die zu Problemen in manchen Browsern führen können. Der next4u.de-Chat hat das Bugfix direkt eingespielt bekommen. Nun ist Version 0.9.7 aktuell.
Für alle anderen yac Betreiber steht die aktuelle Version wie immer via SVN zur Verfügung.
Es sind zwar nicht viele, aber hier ein kleiner Überblick:
next4u.de: 1427h 15m
recensio.org: 632h 10m
funnydingo.de: 1427h 22m
Ich glaube bei recensio.org war der letzte Reboot nur wegen eines Serverumzugs notwenig (oder Bernhard?).
A few minutes ago I uploaded version 0.4 of New Tag Cloud. It’s only a testing version, so access the svn repository to download it. Read the readme.txt to see what’s new.
coke3grad had a very greate idea to get the tag cloud colored. By adding a class-property to the a-tag you are able to define more style definitions for the tag cloud. See coke3grad’s comment.
There is a little bug in version 0.3 of New Tag Cloud. If you have downloaded the plugin between 19th and 25th Nov please redownload it. See this comment for more informations.
Version 0.3 of NewTagCloud is released. Much fun!