After some more code digging and experiments I can answer my own question. A theme is a normal plugin and as such does not inherit any behavior from other plugins.
So you need to copy everything you need from the base theme library.js to your child theme. And of course, you need to declare client scripts explicitly.
Loading of missing templates from base theme is the only link between the base and the child theme.
[nodebb-plugin-canned-responses] Canned Responses Plugin
-
Canned Responses for NodeBB
This plugin exposes a new user settings page that allows you to define snippets of text that can be quickly appended to a post.
Comes in handy for getting across messages that you often find yourself typing over and over again.
Installation
Install this plugin via plugins page in your ACP. Alternatively,
npm install nodebb-plugin-canned-responses
Compatibility
This plugin is compatible with the latest version of NodeBB (v0.7.0-dev, as of the time of writing). Requires a commit hash more recent than f0f31e077f5268d0b01753e37011d0ecf0e4d10b
Screenshots
-
How do you inster a canned repsonse to a post?
-
@SirGamer click this icon in the composer, it opens up a modal window for you to pick one.
-
@pichalite OK.
-
v1.0.4 updates compatibility string for NodeBB v0.9.0.
-
@julian I love the canned response plugin but the options window is hidden behind the composer. I tried collapsing the composer but no luck.
Am I doing something wrong?
-
Hm... are you using a skin?
-
@julian Yes I am. I am also using lots of custom css.
-
@julian Hi, I haven't heard back so I'm following up.
-
@noobbb For the time being, you'll want to disable the skin... looks like some overrides need to be made for them to work better for skins
-
@julian test post
-
@julian Any chance this plugin is going to be updated and add more options for admins/mods to set settings?
-
Hi @julian , while restarting the forum (1.19.1) , I get this "warning" for canned-responses plugin... Is this a problem or normal?
[32m started[39m[0m [0m2022-02-03T04:28:25.721Z [4567/3637012] - [32minfo[39m: [build] Building in series mode 2022-02-03T04:28:25.724Z [4567/3637012] - [32minfo[39m: [build] plugin static dirs build started 2022-02-03T04:28:25.756Z [4567/3637012] - [32minfo[39m: [build] plugin static dirs build completed in 0.032sec 2022-02-03T04:28:25.756Z [4567/3637012] - [32minfo[39m: [build] requirejs modules build started 2022-02-03T04:28:35.741Z [4567/3637012] - [32minfo[39m: [build] requirejs modules build completed in 9.984sec 2022-02-03T04:28:35.743Z [4567/3637012] - [32minfo[39m: [build] client js bundle build started 2022-02-03T04:28:39.189Z [4567/3637012] - [32minfo[39m: [build] client js bundle build completed in 3.446sec 2022-02-03T04:28:39.189Z [4567/3637012] - [32minfo[39m: [build] admin js bundle build started 2022-02-03T04:28:43.542Z [4567/3637012] - [32minfo[39m: [build] admin js bundle build completed in 4.353sec 2022-02-03T04:28:43.543Z [4567/3637012] - [32minfo[39m: [build] client side styles build started 2022-02-03T04:28:51.795Z [4567/3637012] - [32minfo[39m: [build] client side styles build completed in 8.252sec 2022-02-03T04:28:51.796Z [4567/3637012] - [32minfo[39m: [build] admin control panel styles build started 2022-02-03T04:28:58.818Z [4567/3637012] - [32minfo[39m: [build] admin control panel styles build completed in 7.022sec 2022-02-03T04:28:58.820Z [4567/3637012] - [32minfo[39m: [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] - [32minfo[39m: [build] templates build completed in 2.084sec 2022-02-03T04:29:00.905Z [4567/3637012] - [32minfo[39m: [build] languages build started 2022-02-03T04:29:07.261Z [4567/3637012] - [32minfo[39m: [build] languages build completed in 6.356sec 2022-02-03T04:29:07.264Z [4567/3637012] - [32minfo[39m: [build] Asset compilation successful. Completed in 41.54sec. [cluster] Restarting... 2022-02-03T04:29:07.321Z [4567/3637012] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised. 2022-02-03T04:29:07.332Z [4567/3637012] - [32minfo[39m: [app] Web server closed to connections. 2022-02-03T04:29:07.338Z [4567/3637012] - [32minfo[39m: [app] Live analytics saved. Clustering enabled: Spinning up 1 process(es). 2022-02-03T04:29:07.393Z [4567/3637012] - [32minfo[39m: [app] Database connection closed. 2022-02-03T04:29:07.394Z [4567/3637012] - [32minfo[39m: [app] Shutdown complete. [cluster] Child Process (3637012) has exited (code: 0, signal: null) 2022-02-03T04:29:08.058Z [4567/3646564] - [32minfo[39m: Initializing NodeBB v1.19.1