[nodebb-plugin-ns-awards] NS Awards, Give Medals!
-
Great looking plugin but I'm struggling to get it working. I'm using the Vanilla theme.
Here's what I've done so far:
- Added awards_profile_flex.tpl and awards_topic.tpl to nodebb-theme-vanilla/templates/partials
- Added the "<!-- IMPORT partials/awards_profile_flex.tpl -->" line to nodebb-theme-vanilla/templates/account/profile.tpl
- Added the "<!-- IMPORT partials/awards_topic.tpl -->" to nodebb-theme-vanilla/templates/topic.tpl
- Given a user an award
- Restarted NodeBB
Nothing showing on the profile page or on any posts. Inspecting the html shows no reference to any of the elements in the templates.
What am I missing?
-
I'm not sure if restart triggers template recompile.
When you changing templates for your theme, you have to recompile them.try to stop forum, build static assets (
./nodebb build
), and start it again: -
The plugin was not designed to handle triggers to do award assignments. But with the latest version, it's possible to write a plugin which can do it.
-
@nicolas amazing plugin I just give an idea about user defined awards as well.. so that other users can also give rewards to another users and followers... That way the names and the creativity of the Awards will be in finite because based on the number of users. And it will no longer be dependent of admin's soul creativity
-
@faizanzahid yes its working. Just getting this error randomly when creating polls sometimes.
-
@nicolas can you please tell me what exactly changes i have to do on my profile.tpl page and post page if i want to show rewards ? u mentioned about CSS classes, but where exactly do i put it and how, can u give an example plz?
We are using persona theme.
-
@sharonyue did you run
./nodebb build
and restart after making the edit? -
@PitaJ
Yes../nodebb stop
,./nodebb build
then./nodebb start
. Nothing happens.But I can enter the award in the API, and
site/awards
BTW, do I need to copy them there?
copy awards_profile_flex.tpl and awards_topic.tpl to nodebb-theme-vanilla/templates/partials
-
What theme are you using? That where you need to copy the templates to and modify the templates in.
-
5.0.1
New version is available.
- Changed NodeBB compability to work with NodeBB v1.11.0
-
5.1.0
The new version is available.
- Changed all core dependencies to use the latest secure versions
- Changed ACP Management layout to take all available width
- Fixed NodeBB database requests without a limit (kudos to Marek Dorda)
-
plugin doesn't work with v1.12.0. there is no award option in the admin panel.
2019-04-14T20:28:57.017Z [4567/19223] - �[33mwarn�[39m: [deprecated] requiring core modules with module.parent.require('./src/emitter') is deprecated. Please use require.main.require("./src/<module_name>") instead.
at /home/user/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:7:312019-04-14T20:28:57.020Z [4567/19223] - �[31merror�[39m: Error: Cannot find module './src/emitter'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Module.require.main.require (/home/user/nodebb/require-main.js:8:10)
at /home/user/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:7:31
at Object. (/home/user/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:42:3)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)2019-04-14T20:28:57.022Z [4567/19223] - �[33mwarn�[39m: [plugins] Unable to parse library for: nodebb-plugin-ns-awards