[nodebb-plugin-topic-badges] Topic Badges

  • GNU/Linux

    I am back 🙂
    Looks nice. Is it like tags ? Or like prefix ?

  • GNU/Linux Admin

    More like a prefix... stylised tags like "Solved" and such.

  • @psychobunny said:

    ah, I see

    I think I'll save that for the future. Would love to have an ACP where you could define colours for specific badge tags, and perhaps have a whitelist of badges allowed per category (optionally using regex so we could target nodebb-plugin-x and colour it one way). That's a lot of work and I think I'll stop here for now hopefully some altruistic individual will come and tackle the rest 😄

    My current forum has this similar functionality, rather than typing in individual prefixes, the poster selects one from a dropdown. (Tags are predefined in ACP). Each prefix can be filtered so that only those prefixes are displayed. So I too hope an altruistic individual will tackle the rest. 😸

  • Admin

    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?

  • Plugin & Theme Dev Anime Lovers GNU/Linux

    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. 😈

  • GNU/Linux

    Is it compatible with 0.4x ?

  • Admin

    Thanks for the reminder, no its not - it crashes when I "mark as solved" (everything else works). Will get back to you shortly 😛

  • GNU/Linux

    lol. Hope it will come back soon 😉

  • Admin

    Just released v0.0.7 which should be compatible up to latest 👍

  • This post is deleted!

  • 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) {
    				var icon = 'fa-book';
    		if (icon) {
    			$(el).prepend('<span class="fa ' + icon + '"></span> ')


    Screenshot 2014-07-04 11.14.25.png

  • 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-adsense

    Reason #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 the nodebb-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.

  • Personally I haven't used this plugin since tags came in, seems a little bit unnecessary having two different ways to specify the same information.

  • @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




    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.

  • @fmartingr I wouldn't call it a hack, having a background option in the ACP would produce very similar code.

  • @a_5mith But you will have it located into a "tags" admin option instead of merged into other css rules.

  • @fmartingr combining CSS and minifying it is good practice. But it's the individual admins choice how they use their forum. 👍

Suggested Topics

| | |

© 2014 – 2022 NodeBB, Inc. — Made in Canada.