[nodebb-plugin-topic-badges] Topic Badges
-
haha yeah, ideally we'll have some ACP functionality to be able to select what tags are eligible per category, and have a dropdown. most of my plugins are kind of like "proof of concept" stuff, I really hope somebody will take it and make something more cooler with it. as per my youtube plugin, so many people have built plugins based on that for dailymotion, vimeo, etc etc. I'd love to do it but I'm just so busy
-
Whats happend with user badges?
-
I believe most future plugins have been considered, however, have been deferred due to a somewhat massive overhaul and stabilization of the entire application which is totally understandable since its still in its early stages.
After all of the necessary refactoring and when 0.4.0 is released you might see more plugins.
So in all essence, what I am saying is patience my dear friend.
-
Thanks for the reminder, no its not - it crashes when I "mark as solved" (everything else works). Will get back to you shortly
-
Just released v0.0.7 which should be compatible up to latest
-
I'm using this plugin on my forums and using this little JS you can add icons to the badges as well:
<script type="text/javascript"> $(window).on('action:widgets.loaded', function() { $('.topic-badge').each(function(index, el) { var badgeType = el.textContent; switch (badgeType) { case('Manga'): var icon = 'fa-book'; break; } if (icon) { $(el).prepend('<span class="fa ' + icon + '"></span> ') } }); }); </script>
Preview:
-
It's a novel idea, but frankly I don't think this needs to be its own thing. I would roll it into tags.
Reason #1: You get weird URLs
Example 1: /topic/868/nodebb-plugin-topic-badges-topic-badges/
Example 2: /topic/1107/nodebb-plugin-google-adsense-google-adsenseReason #2: It would fit neatly in with tags
Here's how it could work: When I start a post with a[
, I could be presented with an auto-complete list (a la @mentions) of canonical tags, i.e. tags that will be shown in this top spot, and might have an icon attached to it etc. No extra text would be added to the URL/title, it'd just be added as a tag.Reason #3: Tags are more powerful
I don't really see the point in giving a thread thenodebb-plugin-google-adsense
badge unless this badge can be used as a filter to show only threads using this badge. In other words, how tags work. -
@Erlend-Sogge-Heggen I would add to your suggestion the ability to add color to certain tags (admin only). I needed the topic badges for a forum that handles two types of contents (like books and films) and tags weren't enough. Since NodeBB doesn't support sub-categories, I had to rely on this. Using colors (even priorities!) in tags would allow a better sight of the post contents.
-
@fmartingr This is possible through CSS.
Let's say your users use the tag Book & Film. The URL for these two would be
/tags/book
&
/tags/film
Using css selectors, you can do something like this to your custom css:
a[href="/tags/book"] > span { background: red; }
&
a[href="/tags/film"] > span { background: green; }
Replace green/red with #hex codes if you prefer.
What this does is any tag created, with a href value of film or book will be coloured differently. You can do this for any "official" tags you use. Any others will be the default blue or whatever colour you've changed it to.
Screenshot for proof
-
@a_5mith I know that it can be done with CSS, as you can add the icons too. But I'd rather prefer an admin interface instead of CSS/JS hacks. Too much of that last months doing a vbulletin setup for a customer.. But I think is that over multiple label types I suppose.
Thanks for the remainder.
-
what would be cool is if the badges had a sorta setup, like the solved unsolved look/ui
-
I just updated to 0.7.2 and this plugin is throwing errors at me:
4/8 06:06 [1752] - error: TypeError: undefined is not a function at Object.TopicBadges.addThreadTools [as method] (/opt/nodebb/node_modules/nodebb-plugin-topic-badges/library.js:29:15) at /opt/nodebb/src/plugins/hooks.js:89:12 at /opt/nodebb/node_modules/async/lib/async.js:269:13 at iterate (/opt/nodebb/node_modules/async/lib/async.js:146:13) at Object.async.eachSeries (/opt/nodebb/node_modules/async/lib/async.js:162:9) at Object.async.reduce (/opt/nodebb/node_modules/async/lib/async.js:268:15) at fireFilterHook (/opt/nodebb/src/plugins/hooks.js:81:9) at Plugins.fireHook (/opt/nodebb/src/plugins/hooks.js:62:5) at Object.threadTools (/opt/nodebb/node_modules/async/lib/async.js:653:23) at /opt/nodebb/node_modules/async/lib/async.js:580:25
This happens when any topic is loaded with the addon enabled. Control panel reports 0.1.1 installed.