Under 4.5 I modified taxonomy_render_nodes() in taxonomy module in order to get a simple listing of node titles. I have upgraded to 4.6.2 and the same modification works with the exception of the name of the poster, which doesn't appear. You can see a sample of the output here. Can someone tell me what is wrong with $node->name? I tried format_name($node) but that just gave 'anonymous' for the output. You'll see that I've also added tax_list() to theme.inc.

function taxonomy_render_nodes($result) {
if (db_num_rows($result) > 0) {
  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, "1 comment", "%count comments"). "</span>";
    $items[] = "<br>" . l($node->title, "node/view/$node->nid", array("title" => format_plural($number, "1 comment", "%count comments"))) . $info;
  }

  $output .= theme("tax_list", $items, $title);
  $output .= theme('pager', NULL, variable_get('default_nodes_main', 10), 0);
	}
  else {
    $output .= t('There are currently no posts in this category.');
  }
	return $output;
}

Comments

droopy’s picture

Can anyone help me with this one?