[nodebb-plugin-glossary] Glossary Plugin for NodeBB
-
This plugin allows defining keywords and descriptions in the admin control panel. These keywords will display a tooltip when the user mouse overs them in posts. Keywords are also displayed at /glossary along with information about each keyword.
Installation
npm install nodebb-plugin-glossary
Screenshots
Admin Page
Post Content
Glossary Page
More info:
GitHub - NodeBB/nodebb-plugin-glossary: A glossary plugin
A glossary plugin. Contribute to NodeBB/nodebb-plugin-glossary development by creating an account on GitHub.
GitHub (github.com)
-
-
@baris Perhaps I missed something here, but I've installed the plugin, but cannot see any reference to it in the ACP ? It's installed and active. On checking the logs, I see
2021-11-10T11:08:08.547Z [4567/1025689] - [33mwarn[39m: [plugins/nodebb-plugin-glossary] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead. 2021-11-10T11:08:08.548Z [4567/1025689] - [33mwarn[39m: [plugins] Unable to load library for: nodebb-plugin-glossary 2021-11-10T11:08:08.548Z [4567/1025689] - [31merror[39m: Error: Cannot find module 'XRegExp' Require stack: - /home/sudonix/nodebb/require-main.js - /home/sudonix/nodebb/app.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:93:18) at Module.require.main.require (/home/sudonix/nodebb/require-main.js:8:10) at Object.<anonymous> (/home/sudonix/nodebb/node_modules/nodebb-plugin-glossary/library.js:5:30) at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12)
I tried
npm i xregexp
and then a rebuild, but still got the same message -
@phenomlab Can you try with [email protected]?
-
ability to upload from csv 路 Issue #2 路 NodeBB/nodebb-plugin-glossary
A glossary plugin. Contribute to NodeBB/nodebb-plugin-glossary development by creating an account on GitHub.
GitHub (github.com)
-
@baris
[email protected]
doesn't seem to exist ?nodebb-plugin-glossary
A glossary plugin. Latest version: 1.1.0, last published: a year ago. Start using nodebb-plugin-glossary in your project by running `npm i nodebb-plugin-glossary`. There are no other projects in the npm registry using nodebb-plugin-glossary.
npm (www.npmjs.com)
-
@baris One thing I've noticed here is that the plugin seems gratuitous in terms of REGEX - it's matching on any part of the word, meaning things like
AI
is detected insidedisdain
andcertain
- is there any way we can have a setting that looks for a complete match rather than partial ? -
@baris I found the issue (for my case). In
library.js
the regex statement looks for insensitive as belowkeyword.nameRegex = XRegExp(`(?:^|\\s|\\>|;)(${keyword.name})`, 'gi');
I've changed it to
keyword.nameRegex = XRegExp(`(?:^|\\s|\\>|;)(${keyword.name})`, 'g');
Which works fine for my use case (virtually all of the acronyms I have are in upper case). However, lower case words are still affected.
Issue with over gratuitous regex 路 Issue #3 路 NodeBB/nodebb-plugin-glossary
One thing I've noticed here is that the plugin seems gratuitous in terms of REGEX - it's matching on any part of the word, meaning things like AI is detected inside disdain and certain - is there any way we can have a setting that looks ...
GitHub (github.com)
-
@baris From what I see, the plugin is actually firing on whole words
In this case, it's matching on
bits
as well asbit
(which it should)And also matching on
dev
insidedevil
EDIT: Sorry - this was due to the CSV import I have... Ignore that
-
@baris another suggestion would be to empty the table storing the glossary items. When you import 1000 plus from a CSV it's very clunky to have to delete them all one by one if you need to.
Allow option to empty glossary content 路 Issue #5 路 NodeBB/nodebb-plugin-glossary
A suggestion would be to empty the table storing the glossary items. When you import 1000 plus from a CSV it's very clunky to have to delete them all one by one 馃檪 if you need to.
GitHub (github.com)