Closed (fixed)
Project:
User Relationships
Version:
6.x-1.0-rc2
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2009 at 14:00 UTC
Updated:
30 Nov 2009 at 20:41 UTC
How can I add the number of friends a user has in the footer of the view?
i tried creating a custom php field counting the number of entries and storing it in $static but i couldnt print it in the footer...
it would be good if there was a field with the number of friends a user has available in the views.
Comments
Comment #1
alex.k commentedshould return you the number of all approved relationships the user has. Pls see docs for user_relationships_load() in user_relationships_api.api.inc for additional filtering you might want such as type of the relationship.
Comment #2
andrenoronha commentedthank you so much Alex
i got there.
Comment #3
halloffame commentedWhere does this code suppose go? I tried putting it in my view footer but its not working. I'm looking for a similar thing. But more precisely along the 'more' link. Something like 'more (xxx)'.
Comment #4
andrenoronha commentedI made my own more link to show the number of users.
put this code in the footer, but remember to use PHP code input:
notice that "/user/'. $account->uid .'/allfriends" stands for the url of the page view of this view.
Comment #5
indiralanza commentedHi
I need to recover the related nodes involved in a relationship, I dont know how to do it. Maybe I can make a db query to get the nodes references of other node, or working with views and accesing to the data of the view programally? I really need to solve it, I dont know how?? Please write back soon.