开发者

Where is the last vote stored?

开发者 https://www.devze.com 2023-01-08 15:00 出处:网络
I\'m using FiveStars mo开发者_开发技巧dule and I\'m modifying the code. I need to get the last vote of a user for a specific node.

I'm using FiveStars mo开发者_开发技巧dule and I'm modifying the code. I need to get the last vote of a user for a specific node.

I'm sure that the module stores it, because it displays the stars the user previously selected, when he logs in and re-visits the node.

But I'm not able to find this in the code. (I only found the average vote for a node, and the count of nodes).


Take a look at fivestar_get_votes() in fivestar.module. To get the votes for, say, user 1 on node 34, you'd do fivestar_get_votes('node', 34, 'vote', 1). Alternatively, take a look at the Voting API, which fivestar_get_votes() uses.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号