• New update 1.0.2 fixing a front-end bug that was preventing the plugin to work on Vanilla theme.
    Sorry for that feel free to use it on Vanilla based theme and Lavender now 😉


  • Well I have a problem. It seems that when a user without admin privileges is logged the plugin don't work as expected.
    The reason is simple, I have to call /api/admin/plugins/topic-color to retrieve the configuration which is stored here. I do it from front so if the user is not admin there's a 403 and only the admin users have their topics name correctly displayed.
    So is there a way to counter this ? I have thought of doing this in the plugin back but I haven't managed to send the config variable to my main.js after.


  • This is now fixed.
    Please update to the 1.1.0 version :

    • Fixed non admin users not able to see colorified topics of non admin users.
    • Notifications are cleaned from the ugly code

    I've just added a new renderer on the front pointing to /api/plugins/topic-color.

    Edit :
    Version 1.1.1 is out:

    • Topics in user profile are now colorified.

    Version 1.1.2 too :

    • Topics in widget last topics are colorified.

  • Version 1.1.3 :

    • Added preview on Home (Lavender theme and derivations)
    • Added Notifications

    Both in clean mode because there's no API information on home.


  • @esiao You sure?

    https://community.nodebb.org/api/home/

    Or did you mean something else.


  • @a_5mith Oh thanks didn't figured out it was /api/home. I was doing /api/ and getting a 404.
    I will color the subject on home I'll edit this message if there's no reply when it's done 😉

    And now it's done :
    Version 1.1.4 :

    • Preview on home are colored 🙂
  • GNU/Linux Admin

    Hahhha... uh-oh.

    @esiao, an hour and a half ago, I removed the /api/home route, and now it's /api 😆

    I hope I didn't inadvertently break your plugin!


  • @julian Ahah okay I'll pull the changes and fix that, no problem just a new patch to come 😄
    edit : Version 1.1.5 out fixing that 😉


  • @julian tut... 😛


  • I've a question. There seems to be a change to the hook action:app.load becoming static:app.load. I've not updated the plugin tho because I have a bug when I change this in plugin.json.
    Whenever I try to acces a page on the forum I have a :
    Cannot GET /[route]

    Going back to action app.load resolve this. Any clues of what is happening ? Or do I need to wait for next version to update my plugin ?
    One more thing I've seen that I've forgotten the search results so there will be an update to expect and if I could include this aswell it could be nice.



  • Version 1.2.0 is out.


  • While the plugin is fully functional on 0.5.0...

    Major issue DO NOT USE THIS PLUGIN WITH LATEST MASTER BUILD !
    Your topics will return 404 pages. Deactivating the plugin give access back.

    On the code side and why there will likely be an update in not a long time but I need to be sure before.
    NodeBB seems to have changed how the slugs are interpreted, so a topic called I'm a test is accessible via
    domain/topic/1/i-m-a-test

    If you write %(violet)[I'm a test] the address will become
    domain/topic/1/violet-i-m-a-test

    The thing is that having the color in the url was something I considered ugly and so I used a little regex to clean the address like to be again
    domain/topic/1/i-m-a-test

    But what worked before is no longer working it will return a 404 because NodeBB is looking for this address to display the topic information
    domain/api/topic/1/i-m-a-test?_=1411760431011

    Checking domain/api/topic/1/ returns domain/topic/1/violet-i-m-a-test so I guess it could just be a URL rewriting thing. I also don't know why the slugs would have change to be the exact same as the topic before doing domain/topic/1/whatever was displaying the topic.

    I did that rewriting for SEO issues and also to avoid things like domain/topic/14/rgb-41-223-143-test

    @baris, @julian, @psychobunny
    What is the behaviour to keep, if the new one is the one to preserve I'll update the plugin in consequence, but I think rewriting urls should be something to consider.

  • NodeBB Admin

    The wrong slugs are returning 404 now because of this issue.

    Previously if you would include an image in your post with ![](test) it would load the entire topic again because it would make a request to domain.com/topic/1/test and since the slug didn't matter it would reload the entire topic.

    If we can figure out a better way to handle this instead of just sending 404 for wrong slugs then we can go back to ignoring slug.


  • @baris Isn't the problem to figure out why ![](test) is calling domain.com/topic/1/test ?
    So if understand I'll have to wait and see if I remove this feature from the plugin or keep it.

    Maybe the solution is to be able to set custom slugs via plugin on action:topic.save

  • NodeBB Admin

    It's just the way it works, it treats it as a local image and tries to load from /topic/1/test which matches the topic route and loads the topic if we don't check the slug.

    I haven't found another way to prevent it other than checking the slug and making sure its correct.


  • New version 1.3.0
    Update for NodeBB v0.6.0 compatibility
    Infinite scrolling supported


  • It's better when the good version of NodeBB is given (dumb me).
    Patch 1.3.1 "compatibility": "^0.5.0" → "compatibility": "^0.6.0"


Suggested Topics

| | |

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