Package Exports
- nodebb-plugin-ns-points-china
- nodebb-plugin-ns-points-china/plugin/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nodebb-plugin-ns-points-china) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NodeBB: Points
Additional metrics for User Profiles. It's like experience in video games. Plugin is good for gamification of your board.
我做的改动
- 优化积分管理页面和积分排行榜的布局样式
- 兼容
NodeBB v3
版本 - 点赞、发帖、回复时增加
alert
提示 - 增加积分变动日志记录,点击用户主页积分可以查看
- 用户主页增加积分和等级字段
- 文案改为中文
- 记得在后台控制面板中将积分榜添加到导航栏中,不然不会显示积分排行榜
- 签到获取积分
- topic 主题页显示用户等级
- 排行榜显示当前用户的排名
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, levelrankProgress
[Number] - amount of points on current levelrankTotal
[Number] - amount of points needed to level-uptotal
[Number] - raw amount of points
Example: Default Function
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
, findtemplates/account/profile.tpl
, edit template in package directory -node_modules
Find block that is responsible for stats, and insert template where you want:
<div class="account-stats">
...
<!-- IMPORT partials/points_profile.tpl -->
...
</div>
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.