New Tag Cloud v0.7 released

Wow, it’s a very long time ago I released the last update. But now New Tag Cloud has some new features!

Filtering
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!

Caching
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).

Filter tags in New Tag Cloud

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
FROM wp_terms
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
(
SELECT object_id
FROM wp_term_relationships
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.

Windows 7 langsamer bei HDD Burstrate!?

Ich habe gerade mal mit HD Tach die Performance meiner Platten gemessen. Ich war erstaunt, dass die Zugriffe langsamer waren als unter Windows XP SP3. Da ich seit dem letzten Test unter Windows XP einiges an der Hardware geändert habe, habe ich die Messung unter XP wiederholt. Selbes Ergebnis. Beim Burst ist Windows 7 langsamer. Hier mal ein paar Screenshots (rot = Windows 7, blau = Windows XP SP3).

Kleines yac Update

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.