Closed (fixed)
Project:
Flag
Version:
6.x-1.1
Component:
Flag core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2009 at 12:10 UTC
Updated:
23 Jun 2009 at 18:17 UTC
I have an idea for a type of voting system where I would create basically a YES flag and a NO flag. What I would like to show on the page is the mathematical sum of (YES count) - (NO count) so if a node had 9 yes clicks and 4 no clicks, the number 5 would show on the page. Is that possible?
Comments
Comment #1
quicksketchWhile technically possible, it's not a build-in feature of Flag. You can use the flag_get_counts() function to accomplish what you're attempting.
In your node.tpl.php (or preferably tempate.php, if you preprocess the variable) you can do something like this:
Comment #2
esllou commentedyes, it's too complicated an idea to be fair. Wouldn't be able to make Views with the counts anyway. Thanks.