This is pretty much a duplicate of http://drupal.org/node/313779, but you asked to have that one kept closed so I'm starting this one. I want to include the links for adding a friend or a fan to a block. I can get the links to show with the following:

print (friendlist_ui_user_links($node->uid));

The only problem is that it doesn't pick up the uid of the user being viewed. I'm sure I have to add something to the beginning, I'm just not sure what. Your help would be greatly appreciated.

Comments

scalp’s picture

Disregard. Looks like I've got it after a lot of trial and error.

if ((strcmp(arg(0), 'user') == 0) && is_numeric(arg(1))) {

  global $user;

    $contact = user_load(arg(1));

print (friendlist_ui_user_links($contact->uid));
}

Not sure if this is perfect or not, but it works for me! Let me know if there's anything that will cause problems down the road doing it this way.