I use theme('user_vote', $node,$comment) in comment.tpl.php.
When node has more than one revision user vote is multiplied * number of revisions.

Maybe first sql query in theme_user_vote function can be altered in a way it returns only current revisions, not all?

Thanks for this useful module. If you can use help any other than looking for bugs - let me know.

CommentFileSizeAuthor
#3 pollfield.patch326 bytesakrywko

Comments

mario_prkos’s picture

Thank you for offering a help. It is always welcome. This feature is made by request of one user and I am not sure is this tested right. This has to be done and I appreciate what you already done. Keep in touch I will look in it. Any suggestions for solution are welcome.

Thanks!

akrywko’s picture

Status: Active » Needs work

I'm using this feature to make pools more reliable. What I really need is easy way to show every authenticated user who vote on every option. Using comments and current user_vote function isn't comfortable at all but it works. I only need to demand comment from every voter. Maybe you can solve this in more friendly and readable way?

In meantime I dig a little in drupal's sql tables..
Try using

$poll_result = db_query("SELECT * FROM {%s} INNER JOIN `node` ON {%s}.nid = node.nid WHERE {%s}.nid = %d AND {%s}.vid = node.vid", $table_content, $table_content, $table_content, $node->nid, $table_content);

instead

$poll_result = db_query("SELECT * FROM {%s} WHERE nid = %d", $table_content, $node->nid);

about line 480 in pollfield.module

akrywko’s picture

StatusFileSize
new326 bytes

Patch for dev version from December 1, 2009.

I'm learning making patches. Is it correct?

mario_prkos’s picture

Thanks I will applied it.

nibblebot’s picture

Status: Needs work » Fixed

appears to be fixed in dev

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.