How can creare new button in topic button

NodeBB Plugins
  • I need to create a new button beetween " component="thread/sort"" and thread tools in topic page. I don't know how I can do this. Anyone can suggest some existing plugin or can I do this?

    0_1474624542392_Schermata del 2016-09-23 11:53:06.png

  • Easiest is some js in the custom header. (Although, if you are making a lot of changes, you really should be using a custom theme.)

    $(window).on('action:ajaxify.contentLoaded', function(){
      $('[component="thread/sort"]').after(' <button class="btn btn-default yourbutton" type="button">Do Something</button>');
        // Do whatever you want.

    (The leading space in the after() is intentional)

  • Althought i think it could be a cleaner approach, if you want the new button as part of plugin functionality you can take a look at nodebb-plugin-ignore-users there i put an icon instead of a button, inserted with client javascript, as @yariplus alreafy suggested, taking in consideration what page is rendered.

    You can see if that approach fits for your purpose on the client.js file of the mentioned plugin. I'm sure there would be better examples on official plugins but can't remember one right now that you can take a look at.

Suggested Topics

  • 0 Votes
    3 Posts

    @Mega Thanks Mega!
    I know this can work, I expect the formal release for this.😏

  • 2 Votes
    13 Posts

    Hi @julian , while restarting the forum (1.19.1) , I get this "warning" for canned-responses plugin... Is this a problem or normal?

     started 2022-02-03T04:28:25.721Z [4567/3637012] - info: [build] Building in series mode 2022-02-03T04:28:25.724Z [4567/3637012] - info: [build] plugin static dirs build started 2022-02-03T04:28:25.756Z [4567/3637012] - info: [build] plugin static dirs build completed in 0.032sec 2022-02-03T04:28:25.756Z [4567/3637012] - info: [build] requirejs modules build started 2022-02-03T04:28:35.741Z [4567/3637012] - info: [build] requirejs modules build completed in 9.984sec 2022-02-03T04:28:35.743Z [4567/3637012] - info: [build] client js bundle build started 2022-02-03T04:28:39.189Z [4567/3637012] - info: [build] client js bundle build completed in 3.446sec 2022-02-03T04:28:39.189Z [4567/3637012] - info: [build] admin js bundle build started 2022-02-03T04:28:43.542Z [4567/3637012] - info: [build] admin js bundle build completed in 4.353sec 2022-02-03T04:28:43.543Z [4567/3637012] - info: [build] client side styles build started 2022-02-03T04:28:51.795Z [4567/3637012] - info: [build] client side styles build completed in 8.252sec 2022-02-03T04:28:51.796Z [4567/3637012] - info: [build] admin control panel styles build started 2022-02-03T04:28:58.818Z [4567/3637012] - info: [build] admin control panel styles build completed in 7.022sec 2022-02-03T04:28:58.820Z [4567/3637012] - info: [build] templates build started [benchpress] warning: output bloat due to ambiguous inner BEGIN --> admin/plugins/canned-responses.tpl:44:17 | 44 | <!-- BEGIN responses --> | ^^^^^^^^^ `responses` could refer to the top-level value `responses` or the `.responses` property of the current element, so compiler must emit code for both cases | note: Migrate to modern syntax to avoid the ambiguity. This will become an error in the future. 2022-02-03T04:29:00.904Z [4567/3637012] - info: [build] templates build completed in 2.084sec 2022-02-03T04:29:00.905Z [4567/3637012] - info: [build] languages build started 2022-02-03T04:29:07.261Z [4567/3637012] - info: [build] languages build completed in 6.356sec 2022-02-03T04:29:07.264Z [4567/3637012] - info: [build] Asset compilation successful. Completed in 41.54sec. [cluster] Restarting... 2022-02-03T04:29:07.321Z [4567/3637012] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised. 2022-02-03T04:29:07.332Z [4567/3637012] - info: [app] Web server closed to connections. 2022-02-03T04:29:07.338Z [4567/3637012] - info: [app] Live analytics saved. Clustering enabled: Spinning up 1 process(es). 2022-02-03T04:29:07.393Z [4567/3637012] - info: [app] Database connection closed. 2022-02-03T04:29:07.394Z [4567/3637012] - info: [app] Shutdown complete. [cluster] Child Process (3637012) has exited (code: 0, signal: null) 2022-02-03T04:29:08.058Z [4567/3646564] - info: Initializing NodeBB v1.19.1
  • 0 Votes
    3 Posts

    @pitaj said:

    GitHub - psychobunny/nodebb-plugin-badges: Badges: an achievement system for NodeBB

    Badges: an achievement system for NodeBB. Contribute to psychobunny/nodebb-plugin-badges development by creating an account on GitHub.


    GitHub (

    Thanks a lot!

  • 1 Votes
    27 Posts

    @Tanner said in The Plugin Ideas Topic:

    XMPP integration with chat (have the protocol be tied to an XMPP server)

    I still really want this one. Or integration to Rocket would be even better.

  • Topic Color

    NodeBB Plugins
    8 Votes
    28 Posts

    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"