Question

I'm using the drupal vote up down module and a module which overrides the node display, leading me to have to put the vote up down into a block (as opposed to having it be automatically rendered).

Here is an issue with a snippit on how to do this in 1.x http://drupal.org/node/544354

Unfortunately 2.x is totally different. Does anyone know what function I should use? Thanks.

Was it helpful?

Solution

It's depend where to you want to show: node, comment, term? if node, see vote_up_down\vud_node\vud_node.module file: function vud_node_nodeapi(). Copy to your block one of these themed function, like this:


...
if ((arg(0) == 'node') && is_numeric(arg(1))) {
  $tag = variable_get('vud_tag', 'vote');
  $widget = variable_get('vud_node_widget', 'plain');
  $output .= theme('vud_widget', arg(1), 'node', $tag, $widget);
}
...
print $output;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top