Oh, this is driving me insane. Really.
I'm using the vote up/down module and need to display the number of points a node has, but NOT in the links section ($links), but within the content($content) section (using Contemplate).
If I insert this code in my node template:
print $node->links['vote_up_down_points']['title']
It gets printed correctly, but it also gets printed on the links section. If I disable the link on the vote up/down settings page ("Do not display link"), the variable $node->links['vote_up_down_points']['title'] is also gone in contemplate.
So, I'm trying to override the links ($links) code using http://drupal.org/node/44708 and http://drupal.org/node/134442 as a guide, but they refer to 4.7 only, and I'm too much of a newbie to be able to adapt this code to 5.2. Anyway, here's what my code looks like in template.php:
function phptemplate_links($links, $attributes = array()) {
return _phptemplate_callback('links', array('links' => $links, 'attributes' => $attributes));
}
and in links.tpl.php:
$link_count = count($links);
print $links;
However, with this code no link section is printed out to the screen andI have no idea what I'm doing wrong... I've been reading Drupal.org for 9 hours trying to get around this problem, but no luck...