{"id":17132680,"url":"https://github.com/nicolassiver/nodebb-plugin-ns-awards","last_synced_at":"2025-10-11T20:06:15.554Z","repository":{"id":31125637,"uuid":"34685228","full_name":"NicolasSiver/nodebb-plugin-ns-awards","owner":"NicolasSiver","description":"A system for rewarding forum users. The plugin allows admin to define set of awards that could be granted to users for special accomplishments.","archived":false,"fork":false,"pushed_at":"2022-12-08T19:03:00.000Z","size":3100,"stargazers_count":31,"open_issues_count":5,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-13T23:46:08.852Z","etag":null,"topics":["awards","nodebb","plugin","profile"],"latest_commit_sha":null,"homepage":"https://community.nodebb.org/topic/4397/nodebb-plugin-ns-awards-ns-awards-give-medals","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicolasSiver.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"NicolasSiver","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-04-27T18:58:05.000Z","updated_at":"2024-08-06T20:49:02.000Z","dependencies_parsed_at":"2023-01-14T18:23:29.141Z","dependency_job_id":null,"html_url":"https://github.com/NicolasSiver/nodebb-plugin-ns-awards","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasSiver%2Fnodebb-plugin-ns-awards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasSiver%2Fnodebb-plugin-ns-awards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasSiver%2Fnodebb-plugin-ns-awards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicolasSiver%2Fnodebb-plugin-ns-awards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicolasSiver","download_url":"https://codeload.github.com/NicolasSiver/nodebb-plugin-ns-awards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219846838,"owners_count":16556422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awards","nodebb","plugin","profile"],"created_at":"2024-10-14T19:27:49.662Z","updated_at":"2025-10-11T20:06:10.522Z","avatar_url":"https://github.com/NicolasSiver.png","language":"JavaScript","funding_links":["https://github.com/sponsors/NicolasSiver"],"categories":[],"sub_categories":[],"readme":"# NodeBB Awards\n\nA system for rewarding forum users. The plugin allows admin to define set of awards that could be granted to users for special accomplishments.\n\n![Version](https://img.shields.io/npm/v/nodebb-plugin-ns-awards.svg)\n![Dependencies](https://david-dm.org/NicolasSiver/nodebb-plugin-ns-awards.svg)\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n \n\n- [How does it work?](#how-does-it-work)\n- [Screenshots](#screenshots)\n- [Themes](#themes)\n  - [Profile template](#profile-template)\n  - [Topic template](#topic-template)\n- [Filters](#filters)\n- [Styling](#styling)\n  - [Overview Page](#overview-page)\n  - [Profile View](#profile-view)\n  - [Topic View](#topic-view)\n- [API](#api)\n  - [`filter:ns.awards.getAwards`](#filternsawardsgetawards)\n  - [`static:ns.awards.rewardUser`](#staticnsawardsrewarduser)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## How does it work?\n\nPlugin introduces a new entity for your board: `Award`. It could be anything: ribbon, medal, special rank, etc.\n\n1. Visit `Awards` control panel in Admin Control Panel\n2. Create several awards, don't forget images.\n3. Reward users.\n4. If you want to list users' awards, you can augment `Account` or `Post` page templates.\n\n## Screenshots\n\n| Awards Overview  | Create New Award |\n| --- | --- |\n| ![Admin Panel View](screenshot.png)  | ![Create Award View](screenshot2.png) |\n\n| Give an Award  | User's Rewards Overview |\n| --- | --- |\n| ![Create Award View](screenshot3.png)  | ![User's Rewards](screenshot4.png) |\n\n| Rewards Logs  | Settings |\n| --- | --- |\n| ![Logging](screenshot5.png)  | ![Settings](screenshot6.png) |\n\n## Themes\n\n### Profile template\n\nUse flex template - `awards_profile_flex.tpl` for Persona v4. Place it wherever you like.\n\n```html\n\u003c!-- IMPORT partials/awards_profile_flex.tpl --\u003e\n```\n    \n### Topic template\n\nUse topic partial to show awards for every post. Award's metadata is the same as for Profile template.\n\nExample Persona Theme, edit `node_modules/nodebb-theme-persona/templates/partials/topic/post.tpl`:\n\n    \u003c!-- IMPORT partials/awards_topic.tpl --\u003e\n\n## Filters\n\nThe plugin injects rewards to the several places. It could be useful for theme enthusiasts. \nIt's possible to configure a limit or disable a feature in the settings.\n\n- Posts. Every post will have a new property `nsRewards` with a list of rewards.\n- Account. Every account will have a new property `nsRewards` with a list of rewards.\n\n## Styling\n\n### Overview Page\n\nThe overview page is based on Flexbox with simple CSS class name set. \nAlso, all layout is based on em values.\n\nKey CSS Classes:\n\n- `ns-awards-overview__item`, container for the list item\n- `ns-awards-overview__image`, since award image is responsive, it's possible to adjust a width of image container\n- `ns-awards-overview__users`, list of the awarded users\n\n### Profile View\n\nAccount/Profile page can include awards. \n\nKey CSS Classes:\n\n- `ns-awards-profile`, container, uses Flexbox\n- `ns-awards-profile__image`, image representation of the award\n\n### Topic View\n\nEvery post in the topic view can include awards.\n\nKey CSS Classes:\n\n- `ns-awards-topic`, container, uses Flexbox\n- `ns-awards-topic__item`, holder for the award\n- `ns-awards-topic__image`, image representation of the award\n\n## API\n\nThe plugin provides external API via hooks.\nAll API methods accept single object as a parameter.\nEvery API request should be authenticated with a token. Tokens could be generated in the ACP.\n\nExample of the request to get all available awards:\n\n```\n{\n    auth: {\n        token: '50bfa42d-31e2-434e-9634-505b973ee40e'\n    }\n}\n```\n\n### `filter:ns.awards.getAwards`\n\nGet all available awards.\n\nParameters:\n\n- `{Object} payload`\n- `{Object} payload.auth` - Authentication \n- `{String} payload.auth.token` - Authentication String\n\nReturns:\n\n- `{Object} result`\n- `{Array} result.awards`, returns the list of Award objects\n\n### `static:ns.awards.rewardUser`\n\nGive an award to the user. It's important to specify who will grant the award.\n\nParameters:\n\n- `{Object} payload`\n- `{Number} awardId` - Award Id\n- `{Number} fromUserId` - User Id who is giving the award\n- `{Number} toUserId` - User Id who is receiving the award\n- `{String} reason` - The message to explain why award was given\n- `{Object} payload.auth` - Authentication \n- `{String} payload.auth.token` - Authentication String\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolassiver%2Fnodebb-plugin-ns-awards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolassiver%2Fnodebb-plugin-ns-awards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolassiver%2Fnodebb-plugin-ns-awards/lists"}