Would it be possible that once a user has been invited to the friends an alternative message would be displayed other than "Add to friends" e.g. "Friend Invite Pending"? So you don't end up sending multiple invites and gives a quick view of the status of the visited user. Low priority request!

Regards,

Marius

Comments

kenuck’s picture

Status: Active » Fixed

done.

cheers

mariusooms’s picture

Status: Fixed » Active

Hi Kenuck...I'm afraid I have one more question on this, I love how you implemented this so quickly by the way. Great work!

I see the link using the core user-profile, but how could I expose this link function manually in my custom user-profile? You'd think I'd know by now how to figure this stuff out, but unfortunately I think I will always be a designer first and code hacker second.

I'd appreciate any help on this...also because this link would fall outside the $profile['friend_blocks'] function, I'd like to call it straight into my user-profile.php.tpl, I guess that makes sense though.

Regards as always,

Marius

kenuck’s picture

Marius,

no worries, I'll try my best to help you out.

I think the call would be $profile['friend'] ... but this variable would only be avaliable if the user viewing the profile are not friends.

If you want to see all the avaliable vars, you could

 drupal_set_message(print_r($profile,1));

The above code will print out all that you have access to ... you'll need to view the source of the webpage.

hope this helps.

mariusooms’s picture

I'll try that...I realize that this is only shown to non-friends and that is the sole purpose of that link, so its good ;) As long as the pending message also shows, I'll be a happy camper.

Thanks for being gracious,

Marius

mariusooms’s picture

Looking at the source code I noticed the use of the definition lists dt and dd tags, I'm not sure if they make sense in this instance. I guess Drupal inserts these? Do you know a way to use li tags instead?

It is working perfectly though :) And using the following code I can show a message who's profile the user is viewing when the request link doesn't show.

print t('<li id="isFriend">@username is your Friend</li>',array('@username'=>$account->name));

Also I would even go as far as using this for the request link on line 281, what do you think?

$request_link = l(t('Add @username to Friends',array('@username'=>$account->name)),...

Regards,

Marius

mariusooms’s picture

Title: Message if request is pending » 'Add to friends' link & 'Request pending' message
Status: Active » Fixed

Marked as fixed, feel free to re-open if someone runs into more trouble.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 203320)