Active
Project:
User Relationships
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 May 2009 at 20:02 UTC
Updated:
8 Apr 2012 at 13:50 UTC
Hi,
I would like to add 'this user has x amount of relationships' to the content profile template.
Something similar exists for flags as follows:
<?$flag = flag_get_flag('recommend') or die('No "recommend" flag!');
$count = $flag->get_count($uid);
if ($count == 0) {
print t("");
} else {
print t('This Member has <a href="@view-url">@in-words</a>', array(
'@view-url' => url("user/$uid/recommendations"),
'@in-words' => format_plural($count, '1 Recommendation', '@count Recommendations'),
));
}?>Please, how would I change that for relationships?
Look forward to any reply, and thank you.
Comments
Comment #1
63reasons-AS commentedComment #2
63reasons-AS commentedComment #3
liliplanet commentedIt's been a while .. please would be wonderful if I could either add in a block on or the custom profile tpl
user has X amount of relationships, and perhaps by relationship type?
x number of fans
x number of colleagues
Most appreciate any reply, and thank you :)
Comment #4
liliplanet commented* bump * sorry .. but this is important, any help most appreciated :)
Comment #5
alexx90 commentedin drupal forums you will never get answer just forget about that
i asked many times for help before you but no one alive her
Comment #6
mrf commentedUser relationships doesn't have a function to return a relationships count, but I needed this for UR Limits.
If you install the module you can then use:
Substitute the ID of your relationship for $rtid and $uid is the user's id.
Or just take that function and adapt it for your own needs.
Comment #7
RKS commentedI wonder what you would include as $uid if you wanted it global? So if "Friend" is 1 you could substitute that easily but for all users and not just one how would you substitute?
Comment #8
mrf commentedReturning pending and total counts for a particular user is a common request and could be useful within the modules own UI.
Comment #9
Blue commentedThis should better be done with views. Subscribe