Giter VIP home page Giter VIP logo

nodebb-plugin-ns-points's Introduction

NodeBB: Points

Additional metrics for User Profiles. It's like experience in video games. Plugin is good for gamification of your board.

Ranking Calculation

Ranking calculator is a function, that should accept 2 parameters - settings and raw points. Settings could vary from one calculator to another. Calculator must return object with properties listed below:

  • rank [Number] - user rank, level
  • rankProgress [Number] - amount of points on current level
  • rankTotal [Number] - amount of points needed to level-up
  • total [Number] - raw amount of points

Themes

Plugin populates both: Profile and Topic views. Search for points property in corresponding entities.

Profile View

If you want points in Profile, do very basic changes to your theme:

Example: Vanilla Theme, /account/profile.tpl, edit template in package directory - node_modules

<div class="text-center account-stats">

    <div class="inline-block text-center">
        <span class="human-readable-number" title="{reputation}">{reputation}</span>
        <span class="account-bio-label">[[global:reputation]]</span>
    </div>

    <div class="inline-block text-center">
        <span class="human-readable-number" title="{postcount}">{postcount}</span>
        <span class="account-bio-label">[[global:posts]]</span>
    </div>

    <div class="inline-block text-center">
        <span class="human-readable-number" title="{profileviews}">{profileviews}</span>
        <span class="account-bio-label">[[user:profile_views]]</span>
    </div>

    <!-- IF points -->
    <div class="inline-block text-center">
        <span class="human-readable-number" title="{points}">{points}</span>
        <span class="account-bio-label">Points</span>
    </div>
    <!-- ENDIF points -->
    
</div>

Topic View

Every post will have additional field: points. If you want to use client-side ranking calculation, you could require ranking helper via forum/points/ranking and don't forget to add points settings to your topic.tpl, add this line: <!-- IMPORT partials/variables/points_settings.tpl -->

TODO

  • Add Gifts: ability to add points through ACP with a notification
  • Add Transfers: user can transfer some of his points as a reward for some bounty or help or user generated competition
  • Add Points Grid: multipliers or raw values for different categories
  • Add Fresh Points: provide information for points that are earned today
  • Add Complexity to Point calculation: encourage tags in topic creation
  • Add Stuggering animation to overview page
  • Add Custom ranking calculators
  • Add ACP Panel for raw point rewards
  • Add API for raw point rewards
  • Add Custom Notifications for levels
  • Add Presets for ranking calculation
  • Add Sections to Overview page: all time, today, personal.
  • Add Utility for initial point calculation
  • Add Tests (Mocha/Tape)

Changelog

v1.2.0 - 10.05.2015

  • Use Posts filter
  • Added Settings to Topic View

v1.1.0 - 10.05.2015

  • Rank calculation moved to client-side

v1.0.0 - 26.04.2015

  • Very first release

nodebb-plugin-ns-points's People

Contributors

nicolassiver avatar

Watchers

 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.