nodebb-plugin-friends
Friendship plugin ala facebook
Last updated 9 months ago .
· Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install nodebb-plugin-friends 
SYNC missed versions from official npm registry.

nodebb-plugin-friends

Friendship plugin ala facebook

Replaces the default follow mechanic (ala Twitter) with a moderated friending system which allows users to approve/deny friend requests.

Optional

If you want a friends button in the /users list, add the following in partials/users_list.tpl

<!-- IF users.isFriends -->
<button class="btn btn-link friend-button" data-uid="{users.uid}" data-type="unfriend" data-username="{users.username}">[[plugin-friends:action.remove-friend]]</button>
<!-- ELSE -->
<button class="btn btn-warning friend-button" data-uid="{users.uid}" data-type="friend" data-username="{users.username}">[[plugin-friends:action.add-friend]]</button>
<!-- ENDIF users.isFriends -->

Integration with Write API

If you have the Write API Plugin installed, the following routes are exposed for you to use:

  • /friends/:uid
    • GET /
      • Retrieves all friendship-related data pertaining to the user specified via uid, including pending friendship data
      • Can only be called by an administrative account
    • POST /
      • Requests a friendship from user specified via userslug, or accepts a pending friendship, if one is outstanding
      • Accepts: Nothing
    • DELETE /
      • Unfriends the user specified via uid (relative to the calling user), or rejects a friendship request, if one is outstanding
      • Accepts: Nothing

Current Tags

  • 3.0.1                                ...           latest (9 months ago)

17 Versions

  • 1.0.0                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.3                                ...           8 years ago
  • 1.1.4                                ...           7 years ago
  • 1.1.5                                ...           7 years ago
  • 1.1.6                                ...           7 years ago
  • 1.1.7                                ...           4 years ago
  • 1.2.0                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 2.0.0                                ...           2 years ago
  • 3.0.0                                ...           a year ago
  • 3.0.1                                ...           9 months ago
Dependencies (0)
None
Dev Dependencies (3)

Copyright © npmmirror.com | 浙ICP备15033595号-63 |