[nodebb-plugin-beep] NodeBB Censor Curse Words Plugin



  • Hi all,
    I made a small plugin to help filter out curse words in a post.
    It looks for curse words and censors them out.
    To install
    npm install nodebb-plugin-beep
    and find the source:
    https://github.com/ninenine/nodebb-plugin-beep
    This is my fist attempt so be gentle ;)



  • @mr_99 Congrats on your first plugin.
    Have you put this on npm yet?



  • @Ted Yeah I have
    try
    npm install nodebb-plugin-beep



  • @mr_99, just thought I'd check. ;)
    I'll give this a test run and supply you with some feedback after I fix something on the plugin I'm coding.



  • @Ted Thanks



  • @Ted am not quite sure, I have removed and reinstalled the plugin on my site and it's working okay for me.
    Could you walk me through how you installed it?
    Can you see the nodebb-plugin-beep folder in the node_modules folder of your nodebb installation ?



  • Up and running successfully - my server decided to be silly.

    The plugin works using a predefined list of curse words. Perhaps in future revisions the admins could add words to this, and users could decide whether or not they even want their language to be censored.

    Everything seems to function great. It even censors titles. The only slight glitch I've found is that if a "curse word" is posted with some sort of capitalization, the censorship process removes the caps.

    All in all, it's pretty neat and solid, with plenty of uses beyond keeping potty-mouths in check.

    Capture.PNG



  • @Ted Nice. Thanks for the feedback.
    I will look for a workaround. Am also working on an admin settings interface.
    If you want to change the list of banned words you would have to open the index.js file and edit the array.


  • Admin

    awesome! :) this is going to be epic once you get the ACP interface going too 👍



  • @psychobunny @Ted Added the APC interface, you can change the words you want to ban now.
    You can update with :
    npm install nodebb-plugin-beep


  • Admin

    Awesome work @mr_99 !! 😄


  • GNU/Linux

    Thanks @mr_99



  • Thanks for the feedback guys. I have pushed much prettier version to npm, I thought my code was broken till I realized a greasemonkey script was not playing nice with the client side script.

    @Ted the case of the words will be maintained and not be converted to lower case.

    Also, please note that urls will also be censored, which means they will most probably 404.



  • @mr_99 when i turned this on in Firefox the forum become lagging when scrolling.



  • @Hưng-Thành-Nguyễn Should be fixed now 😄



  • A possible expansion of this plugin would be to potentially reject posts containing certain words. Not that you'd be looking to block posts of those who curse, but if you were having spammers manually register and post a similar message, you could use a string from that message to prevent it from being posted.



  • @mr_99 yeah it's fixed :D



  • Is there any way that you can customize the curse word output?

    like: NodeBB --> NödeBB



  • @Ted said:

    A possible expansion of this plugin would be to potentially reject posts containing certain words. Not that you'd be looking to block posts of those who curse, but if you were having spammers manually register and post a similar message, you could use a string from that message to prevent it from being posted.

    Yeah, +1 for this
    That would be an awesome spam blocker plugin :D



  • I have this error:

    8/2 22:32 [29610] - ^[[31merror^[[39m: TypeError: Cannot read property 'buildHeader' of undefined
    at Object.Beep.init [as method] (/opt/nodebb/node_modules/nodebb-plugin-beep/index.js:17:54)
    at /opt/nodebb/src/plugins.js:460:13
    at /opt/nodebb/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/opt/nodebb/node_modules/async/lib/async.js:46:24)
    at Object.async.each (/opt/nodebb/node_modules/async/lib/async.js:124:9)
    at fireStaticHook (/opt/nodebb/src/plugins.js:450:9)
    at Object.Plugins.fireHook (/opt/nodebb/src/plugins.js:406:5)
    at Plugins.reloadRoutes (/opt/nodebb/src/plugins.js:129:11)
    at /opt/nodebb/node_modules/async/lib/async.js:656:23
    TypeError: Cannot read property 'buildHeader' of undefined
    at Object.Beep.init [as method] (/opt/nodebb/node_modules/nodebb-plugin-beep/index.js:17:54)
    at /opt/nodebb/src/plugins.js:460:13
    at /opt/nodebb/node_modules/async/lib/async.js:125:13
    at Array.forEach (native)
    at _each (/opt/nodebb/node_modules/async/lib/async.js:46:24)
    at Object.async.each (/opt/nodebb/node_modules/async/lib/async.js:124:9)
    at fireStaticHook (/opt/nodebb/src/plugins.js:450:9)
    at Object.Plugins.fireHook (/opt/nodebb/src/plugins.js:406:5)
    at Plugins.reloadRoutes (/opt/nodebb/src/plugins.js:129:11)
    at /opt/nodebb/node_modules/async/lib/async.js:656:23

    What should I do?


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.