Monday 11 June 2007

Tagadelic patch

We've noticed that there's a small bug in the Tagadelic module for Drupal.

It doesn't pay attention to the status of nodes. ie: it uses unpublished content for its calculations.

Here's a patch to remedy that:
--- tagadelic.module.old        2007-06-10 17:55:54.980771815 +0100 
+++ tagadelic.module    2007-06-10 18:03:32.950326194 +0100 
@@ -211,7 +211,7 @@
    if (!is_array($vids) || count($vids) == 0) {
      return array();
    }
-  $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 IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size); 
+  $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 INNER JOIN {node} nod ON n.nid = nod.nid WHERE d.vid IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') AND nod.status = 1 GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size);
     return tagadelic_build_weighted_tags($result, $steps);  
}

Sunday 10 June 2007

Who's the daddy?

The 12 weeks are finally up and the world can now officially know... Katie and I are expecting a baby!


So far the due date is around 28th December which will be another day to add to growing list of birthdays, celebrations, etc. around that time of the year. We should get a more accurate date in the near future as we're going for our first ultrasound scan on the 27th June (after our Hungarian wedding on the 23rd).


Apart from feeling exhausted all the time, Katie's doing well (if not a little nervous about the entire prospect). Watching childbirth on TV or DVD doesn't help inspire any confidence - despite my reassurances.


Of course, we're both thrilled, as are our parents. ... and, when the time arrives, we'll definitely be ordering some tiny, little shoes from Lucky Little Elephant. </plug> ;)