Add friend button to members page

Hi,

I want to know if it is possible to add a friend button in members page, to be easier to a user add a friend without doing extra steps to send a friend request.
It's possible, and if so, how can I do it?

Thank you

  • Usually you find an add-friend-button on the profile-page of a user underneath the user-photo. Another option is to choose the add-friend-option from the dropdown-menu, which is shown when you move the mouse over a user-pic.

    It is possible to add a button on your own profile-page to add a user. Therefor you have to create a plugin to override/extend the view of the profile-page or to create a widget. In this case you can add an input user-picker in front of the button where you can let the user search for the username of his friend...

  • Thanks Viktor for you answer. I know where it is the add-friend-button available, but what I want is to put the add button on the members page as in Facebook.

    Thank you.

  • In this case I would re-create the members-plugin (copy the members-plugin as a new plugin and rename it), unregister the original members-plugin-view and make the changes in your new plugin (adding the button). For the action (of adding the friend) you find examples in the already exisiting actions (see above), maybe you can use these already existing actions without modifiying them...

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking