Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicolassiver/nodebb-plugin-ns-points
Additional metrics for User Profiles. It's like experience in video games. Plugin is good for gamification of your board.
https://github.com/nicolassiver/nodebb-plugin-ns-points
Last synced: 7 days ago
JSON representation
Additional metrics for User Profiles. It's like experience in video games. Plugin is good for gamification of your board.
- Host: GitHub
- URL: https://github.com/nicolassiver/nodebb-plugin-ns-points
- Owner: NicolasSiver
- License: mit
- Created: 2015-04-25T11:17:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T08:02:28.000Z (almost 2 years ago)
- Last Synced: 2024-10-05T12:36:58.822Z (about 1 month ago)
- Language: JavaScript
- Size: 601 KB
- Stars: 22
- Watchers: 6
- Forks: 19
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# NodeBB: Points
Additional metrics for User Profiles. It's like experience in video games. Plugin is good for gamification of your board.
![Version](https://img.shields.io/npm/v/nodebb-plugin-ns-points.svg)
![Dependencies](https://david-dm.org/NicolasSiver/nodebb-plugin-ns-points.svg)
- [The Ranking Calculation](#the-ranking-calculation)
- [Themes](#themes)
- [Profile View](#profile-view)
- [Topic View](#topic-view)## The Ranking Calculation
The 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's rank, level
- `rankProgress` [Number] - amount of points on current level
- `rankTotal` [Number] - amount of points needed to level-up
- `total` [Number] - raw amount of pointsExample: [Default Function](https://github.com/NicolasSiver/nodebb-plugin-ns-points/blob/f34a4cf6c69b4c8b1abbf88efc3a0f1d8ad6fcf2/public/js/ranking.js#L9-L27)
## Themes
Plugin populates both: `Profile` and `Topic` views. Search for `points` property in corresponding entities.
Don't forget to add link on _overview_ page, link should look like - `/points`### Profile View
If you want points in Profile, do very basic changes to your theme:
> Example: Persona Theme, `v4`, find `templates/account/profile.tpl`, edit template in package directory - `node_modules`
Find block that is responsible for [stats](https://github.com/NodeBB/nodebb-theme-persona/blob/4c32d4b0b16711bde6ee84d6b18dfb13dbfc24c0/templates/account/profile.tpl#L14-L41), and insert template where you want:
```html
...
...
```### Topic View
Every post will have additional field: `points`.
If you want utilize points calculation feature in topic view, you should use theme that supports such type of integration.