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-glossary] Glossary Plugin for NodeBB
-
-
Published, 0.0.10 with some more fixes. I tried your csv and SNMP is working with latest. Obviously I haven't tested all 1000+ keywords
-
@baris thanks very much for this. I'll test it now
Edit - from what I can see, everything now works as expected. Thanks
-
Published 0.0.16
- New /glossary page to show a list of keywords
- Ability to change or remove the icon displayed next to the keyword
- Tooltips will work outside of topic pages ie on user profiles or recent cards plugin
-
@baris not seeing this in npm yet ?
-
@baris now that I know the trick...
-
Added i18n, feel free to send pull requests to add new languages. https://github.com/NodeBB/nodebb-plugin-glossary/commit/616ab500cd6ad906ace7eb7510f7f08789d3515d
-
-
If the same word is used multiple times in a post only the first one will be turned into a link if single match is turned on.
-
It is necessary to disable the use of keywords in URLs. Plugin must not affect URL
-
Hi @baris , would you consider adding a "notes" or "extra info" section at .com/glossary page?
It can look like this:
There can be various use cases of this section. I believe it is also usual for regular dictionaries to have a notes section for:
- origin or history of the word
- other forms of the word
- example sentences
etc.
-
additionally, is it possible to customize /glossary page just like the /feed page?
(header and footer sections would suffice)
-
@crazycells said in [nodebb-plugin-glossary] Glossary Plugin for NodeBB:
additionally, is it possible to customize /glossary page just like the /feed page?
You can do this with
nodebb plugin customize
- there isn't a widget etc from recollection. -
@phenomlab said in [nodebb-plugin-glossary] Glossary Plugin for NodeBB:
@crazycells said in [nodebb-plugin-glossary] Glossary Plugin for NodeBB:
additionally, is it possible to customize /glossary page just like the /feed page?
You can do this with
nodebb plugin customize
- there isn't a widget etc from recollection.is adding this code to the top of the template enough?
<div data-widget-area="header"> {{{each widgets.header}}} {{widgets.header.html}} {{{end}}} </div>
or adding this to the bottom?
<div data-widget-area="footer"> {{{each widgets.footer}}} {{widgets.footer.html}} {{{end}}} </div>
I cannot see glossary.tpl in widget customize page...
-
@crazycells no, you won't do as there is no widget.
If you use the customize plugin, you can change it there
-
@phenomlab said in [nodebb-plugin-glossary] Glossary Plugin for NodeBB:
If you use the customize plugin, you can change it there
Yes, this is what I did. I added those codes above to the tpl file... one to the top, one to the bottom and saved, restarted the forum...
what else should I add to the tpl file to be able to edit the page in the widget customize section?
-
@crazycells I just tried this myself, and get the same result
Added
<div data-widget-area="header"> {{{each widgets.header}}} {{widgets.header.html}} {{{end}}} </div>
Rebuilt, reloaded, but nothing shows in the widget section.
-
maybe @baris can direct us... what codes should we add to the glossary.tpl file in order to be able to add widget to the page?
I am more interested in header and footer widgets, not side widgets...
-
I will add the widget areas and info field to the plugin.
-
Published 0.0.19
- Added widget areas to glossary.tpl
- Added info field which is displayed on the /glossary page