Hi, I would like to split node comments in two groups:

  • First one would be for comments from friends.
  • Second one would be for comments from no-friends.

I have a view (views module) wich renders the comments for certain users indicated by an argument (wich is the users identification number). So, my final problem is how to get the users related to other. Something like:

    $current_uid = $user->uid;
    $rtype = 'friends'; // or its rtype code 
    $friends = get_related_users($current_uid, $rtype);
    ...
    print get_view($view_name, $arg = $friends);

* Of course, that was just pseudocode.

I've search for a similar function in the code of the module but I haven't found anything. Any idea/suggestion/help about this issue?

Regards and thanks in advance.

Comments

mrf’s picture

Status: Active » Fixed

I don't think there is anything like that in the main module but have a look at User Relationship Locator the queries you need, or at least good starting points should all be there.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.