Closed (fixed)
Project:
Flag Friend
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2009 at 04:14 UTC
Updated:
15 Jul 2010 at 12:43 UTC
Hi,
I have used $flag->get_user_count to get total count but I believe it includes pending friends I have flagged, is there anyway to get total counts for approved friends only? Thanks
Comments
Comment #1
sirkitree commentedCurrently there is not way other than a direct query of the flag_friend table. However I'm open to adding this as a feature. Do you have a proposed way of going about adding it?
Comment #2
dropchew commentedI did a search through views issues and the only temporary solution I can find is to get total pager items in a views template...Sorry I have limited coding knowledge...
Comment #3
sirkitree commentedThis would be quite useful, however I think we really need to implement our own function for this. $flag->get_user_count() is going to be unreliable for a few reasons.
1) It only will get you a list of 'pending' friends, or people that you have requested to be friend with.
2) Of that list, it will include 'blocked' users, rendering the count different than what Views will report.
3) We need a list of actual friends (from the flag_friend table) instead of just flagged users, or requests.
Making this a task.
Comment #4
gausarts commentedSubscribing. Thanks
Comment #5
sammyman commentedIs there any update to this. I have been struggling with the same problem. Is there any "quick fix" for the meantime? I was using $flag->get_user_count until I finally realized it was only showing pending friends.
Comment #6
Ralla commentedtry this simple query:
Comment #7
sammyman commentedI tried that but it didn't work. This code did for me however:
Not sure if it is the best way to write the code, but it works! Thanks!
Comment #8
sirkitree commentedseeing as this function was added at some point (I lost track) marking as fixed.
Comment #10
sammyman commentedSorry for bringing this up late, but how do you implement this if it has been added?
Comment #11
sirkitree commentedYou implemented it just fine in #7