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!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | vote_up_down.patch | 1.4 KB | Gyt |
Comments
Comment #1
poloparis commentedFrom 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
Comment #2
Flying Drupalist commentedIt doesn't work. There are no widgets displayed.
Comment #3
Flying Drupalist commentedI assume this is because of this:
http://drupal.org/node/447374
Help would be appreciated!
Comment #4
fmueller commentedOpen 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.
Comment #5
Gyt commentedUse this function somewhere in node.tpl.php
print theme("vote_up_down_widget$style", $node->nid, 'node');or this in comment.tpl.php
print 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.
Comment #6
poloparis commentedre #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 ?
Comment #7
Gyt commentedOK. I have a good solution. If you use this patch, variables $vote_up_down_widget and $vote_up_down_points are available. Then use
in node(comment).tpl.php
It's not a hack, but changes in template.php not necessary.
Comment #8
ingo86 commentedYou can use the
function on beta6.