With 4.4 I was able to simply the output of taxonomy_render_nodes by means of the following code. You can see the result here.
function taxonomy_render_nodes($result) {
while ($node = db_fetch_object($result)) {
$number = module_invoke("comment", "num_all", $node->nid);
$info = "<br><span style=\"color: #999; font-size: 0.8em; font-weight: normal\"> submitted by: " . $node->name . " on " . format_date($node->created, "large") . "<br>" . $node->type . " | " . format_plural($number, "%count comment", "%count comments"). "</span>";
$items[] = "<br>" . l($node->title, "node/view/$node->nid", array("title" => format_plural($number, "%count comment", "%count comments"))) . $info;
}
return theme("tax_list", $items, $title);
}
I also added the function theme_tax_list to theme.inc:
function theme_tax_list($items = array(), $title = NULL) {
$output = "<div class=\"item-list\">";
if (isset($title)) {
$output .= "<h3>$title</h3>";
}
if (isset($items)) {
foreach ($items as $item) {
$output .= "$item<br>";
}
}
$output .= "</div>";
return $output;
}
This doesn't work properly under 4.5. Neither the node title nor the node author shows up in the listing of nodes. I have no idea why. Can anyone help me with this? I notice also that instead of '0 comments' I get '%count comments'. More than 0 comments appears correctly.