How do I return the number of flags a user has? I've set a 'fan' flag to allow users to be flag to become fan. This, [flag-fan-count], which works for nodes, do not seem to work for users. Does anyone have any advice? Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | user_and_comment_count_tokens.diff | 1.84 KB | mooffie |
Comments
Comment #1
mooffie commentedYou're right. The [flag-xxx-count] tokens don't work for users and comments yet. I was aware of this glitch. The fix is very simple and will come soon.
Comment #2
mooffie commentedComment #3
mooffie commented(BTW, Miraploy, you report that you're using beta4. Count tokens in labels work correctly starting with beta5 only (see digg recipe). That's because earlier versions "pre loaded" the labels' text.)
Comment #4
Flying Drupalist commentedHi mooffie, I'm actually using the 17th dev, between beta4 and beta5. The count works on nodes for me. I can't upgrade to the latest dev because I need the rules integration, from here: http://drupal.org/node/298109, which afaik don't have an updated patch.
As rules is vital for me I'll have to wait for a reroll of that before I can test this patch. Thanks for the quick fix.
Comment #5
mooffie commentedI re-rolled the Rules patch.
(But you could apply this tokens patch without fear: it touches only 'flag.token.inc', which hasn't changed recently.)
Comment #6
Flying Drupalist commentedHi, thanks for the rules reroll. I applied that patch fine, but this one says flag.token.inc file does not exist. So I changed the index to Index: includes/flag.token.inc.
And it works! Thanks a lot.
Comment #7
mooffie commentedNathan, are you ok with this patch?
Comment #8
quicksketchLooks good to me!
Comment #9
mooffie commentedCommitted.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.