print widget AFTER node's body
jacopo3001 - April 18, 2009 - 19:42
| Project: | Vote Up/Down |
| Version: | 6.x-1.0-beta2 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | ingo86 |
| Status: | closed |
Description
in node view, vote widget is printed as part of $content, before the node's body.
how can i control this?
i would like to be printed after the node, more compatible with my desired layout..?
thanks!

#1
From the package's README file :
in the node-storylink.tpl.php you'll notice that you can control where the voting widget can be displayed relative to content.
Play with that and let us know what you have come up with.
cheers
#2
It doesn't work. There are no widgets displayed.
#3
I assume this is because of this:
http://drupal.org/node/447374
Help would be appreciated!
#4
Open the file vote_up_down.module and find the function vote_up_down_nodeapi(). In that function there are two places where a weight is set to -10. Increase that value. Change it to 10 for example. This should place the vote up down widget below the text of the node. Probably this solves your problem.
#5
Use this function somewhere in node.tpl.php
<?phpprint theme("vote_up_down_widget$style", $node->nid, 'node');
?>
or this in comment.tpl.php
<?phpprint theme("vote_up_down_widget$style", $comment->cid, 'comment');
?>
Turn off "Vote widget display..." in "admin/settings/vote_up_down" to avoid getting double voting widgets.
#6
re #4 : I read all the time that you're not supposed to hack module functions within the modules themselves. So when you do that, how are you supposed to do it ? Can you copy the entire function, modify it and paste it into the template.php or some other place ?
#7
OK. I have a good solution. If you use this patch, variables $vote_up_down_widget and $vote_up_down_points are available. Then use
<?phpif ($vote_up_down_widget) { print $vote_up_down_widget; }
?>
in node(comment).tpl.php
It's not a hack, but changes in template.php not necessary.
#8
You can use the
vote_up_down_widget_form($node)function on beta6.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.