npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nodebb-plugin-ns-points-china

v1.0.3

Published

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

Downloads

266

Readme

NodeBB: Points

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

我做的改动

  1. 优化积分管理页面和积分排行榜的布局样式
  2. 兼容NodeBB v3版本
  3. 点赞、发帖、回复时增加alert提示
  4. 增加积分变动日志记录,点击用户主页积分可以查看
  5. 用户主页增加积分和等级字段
  6. 文案改为中文
  7. 记得在后台控制面板中将积分榜添加到导航栏中,不然不会显示积分排行榜
  8. 签到获取积分
  9. topic 主题页显示用户等级
  10. 排行榜显示当前用户的排名

演示1 演示2 演示3 演示4

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 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, find templates/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.