[nodebb-plugin-trophies] Trophies: custom award badges for your users
-
Hey,
Seeing that @psychobunny's badges plugin was not updated for quite a long time, I've decided I want to write something similar.
Preambule: I've never written single nodebb plugin before and, frankly, not experienced with nodejs at all. So this is my first approach in plugin writing. Here goes.
With this plugin you can create award badges through your admin panel and give them out to users. Trophies will be then displayed on their user profile page as little badges with names and tooltips.
Here, I have a screenshot:
When you give the award to someone, you can tick the "steal from everyone else" thing so only that one person would have it. Useful for trophies that should not have multiple instances (like "Top Scoring in Magic Blue Smoke Club").
Currently, size of the trophies is hardcoded to be 50x50 px. I'd like to change it in future.
Oh, and there is no automated trophies (like in @psychobunny's badges plugin, if I remember correct).
Here's a lame piece of screenshot of how it looks like on the admin side:
Anyways. I have tested it with my favourite testing technique – eyeballing that is, and it seems to work. This is my first try in writing plugins for NodeBB so there be dragons.
Source is on the github: https://github.com/toxuin/nodebb-plugin-trophies
Licensed the same way as @psychobunny's badges plugin since loosely based on it.I would appreciate comments, suggestions, crash reports (my favourite).
P.S. What do I have to do to get it submitted to the plugin catalogue?.. -
Anyways. I have tested it with my favourite testing technique – eyeballing that is, and it seems to work.
Sadly, this is my testing technique as well.
P.S. What do I have to do to get it submitted to the plugin catalogue?..
You need to fix this line here:
https://github.com/toxuin/nodebb-plugin-trophies/blob/master/package.json#L31change it to
"compatibility": "^1.0.0"
and runnpm publish
again. -
You can visit the below urls to see if the package manager sees your package for a specific version of nodebb.
https://packages.nodebb.org/api/v1/suggest?version=1.0.0&package=nodebb-plugin-trophies
https://packages.nodebb.org/api/v1/suggest?version=0.9.0&package=nodebb-plugin-trophies -
@julian well, as long as you have a widget area in your user profile template – you're golden. Persona template does not have it, by the way. So in my case – yeah, I had to edit some templates.
If there is a way of soft-adding widget areas from plugins – let me know.
Also, I can't seem to find the way Persona template defines it's widget areas. It does not have any library.js at all, but still has some widget areas defined. How does that work?..
-
Whoa.. This is awesome!!
Any new update about this plugin?
Can't wait -
@Muchsin-Assegaf is there any particular feature you're looking for to be added to the plugin?.. Otherwise, plugin just works, why need an update?..
-
I can't find this plugin in ACP.. I'm using host managed by nodebb
-
We r thinking to try the rewards plugin or this trophies one you just confused which one is updated
-
@faizanzahid I have not published any updates for this plugin, mainly because there was no feedback apart from that it works alright.
If you will encounter any problems with it - let me know and I will look into it. -
@toxuin Thanks man, i just installed on 1.9.2 and tried to award a trophy, the plugin was installed fine and ACP shows user awarded, but the user himself got no notification for the trophy, but the ns-awards plugin, i tried and he got notification of the medal.
and yes i didn't do the theme changes, i am using node bb persona so i didn;t know where exactly i need to add the line to show the trophy on profile.
Also, when i enabled the plugin, it didnt work, so i disabled it but for some reason the profile pages were broken even after disabling, it see here https://i.imgur.com/BAbjPNL.png
so i had to uninstall and then restart node bb