Git Product home page Git Product logo

nodebb-plugin-friends's Introduction

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

nodebb-plugin-friends's People

Contributors

barisusakli avatar julianlam avatar antosik avatar psychobunny avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.