Skip to content

NodeBB Plugins

1.9k টপিক 15.6k পোস্টগুলি

Discussion regarding NodeBB Plugin development.

This category can be followed from the open social web via the handle [email protected]

উপবিভাগ


  • Have a question about building a plugin? Ask here

    470 2k
    470 টপিক
    2k পোস্টগুলি
    <baris>B
    Yes you can write plugins in ESM now and it will work with nodebb 4.12.0 and up, use nodebb.require to import core modules if you need instead of require.main.require
  • Need a plugin developed? Ask here!

    246 1k
    246 টপিক
    1k পোস্টগুলি
    Moonlight RikaM
    Yes, the above is exactly what I wanted. Just something for someone to be able to make an new account and then they can use that 'account' for their character/persona/whatever they choose for this. In my case it was for people making characters for their own roleplays and posting as said account in threads etc. While it would be nice to add moderation functions and admin functions I wasn't sure what would work or not for that.
  • Interested in writing a plugin?

    Pinned বন্ধ
    1
    12 Votes
    1 পোস্টগুলি
    11k দেখেছেন
    julianJ
    Please take a look at the official Plugin Writing Guide
  • Some plugins that can help you improve your forum

    19
    7 Votes
    19 পোস্টগুলি
    13k দেখেছেন
    M
    @palmoni כתב: @Moshe כתב: Handling comments, if there are multiple administrators managing the forum, there should be an option to leave comments on the handling to know the status of the referral, who is handling it, and what they decided and/or did. I added it Thank you! I think there are still very minor improvements to the design. [image: 1782887719723-13b2b3b5-d297-4b54-aef8-a6d352dd5b9e-image.jpeg]
  • 3 Votes
    1 পোস্টগুলি
    252 দেখেছেন
    ccD2sC
    Introduction This tutorial will teach you how to write a modern NodeBB plugin using TypeScript, ES Modules, and Rolldown. Starting with NodeBB 4.12.0, you can use ES Modules to write plugins. Rolldown is a Fast Rust bundler that you can use to compile NodeBB plugins written in TypeScript. Installation Create a new plugins folder, then run: pnpm init pnpm add -D rolldown typescript @types/node # or use your favorite package manager Configuration Create a tsconfig.json file (assuming you're writing this in the lib folder): { "compilerOptions": { "target": "ES2020", "module": "node16", "moduleResolution": "node16", "types": ["node"], "declaration": true, "allowImportingTsExtensions": true, "noEmit": true, "forceConsistentCasingInFileNames": true, "noImplicitAny": false, "incremental": true, "composite": true, "skipLibCheck": true }, "include": ["lib", "rolldown.config.ts"], "exclude": ["node_modules", "build"] } If you need to write client-side code (assuming you're writing it in the public folder), create a public/tsconfig.json file: { "compilerOptions": { "target": "ES2020", "module": "umd", "moduleResolution": "node10", "declaration": true, "allowImportingTsExtensions": true, "noEmit": true, "forceConsistentCasingInFileNames": true, "noImplicitAny": false, "incremental": true, "composite": true, "skipLibCheck": true }, "include": ["lib"] } Create a plugin.json file: { "id": "...", "name": "...", "description": "...", "url": "...", "hooks": [ ... ], "scripts": ["build/public/client.js"] // if you need client-side scripts } Create a rolldown.config.ts file: import { defineConfig } from "rolldown"; export default defineConfig([ { input: ["lib/index.ts"], platform: "node", output: { dir: "build", format: "es", cleanDir: true, strict: true, topLevelVar: true, minify: { compress: true, mangle: false }, sourcemap: true } }, // if you need client-side scripts { input: ["public/lib/client.ts"], platform: "browser", output: { dir: "build/public", format: "umd", cleanDir: true, strict: true, entryFileNames: "lib/[name].js", chunkFileNames: "lib/[name].js", topLevelVar: true, minify: { compress: true, mangle: false }, sourcemap: true } } ]); Add the following to package.json: { ... "type": "module", "main": "./build/index.js", "scripts": { "dev": "rolldown -c ./rolldown.config.ts --watch", "build": "rolldown -c ./rolldown.config.ts && tsc --noEmit", "typecheck": "tsc --noEmit" }, "devDependencies": { "@types/node": "^25.9.3", "rolldown": "^1.1.1", "typescript": "^6.0.3" }, "nbbpm": { "compatibility": "^4.12.0" } ... } Development You can now use pnpm build to build plugins and pnpm dev to develop plugins. You can create a symbolic link from the plugin directory to /path/to/nodebb/node_modules to enable the plugin locally. Bundle SCSS Add the following to rolldown.config.ts: import { defineConfig, RolldownPluginOption } from "rolldown"; import fs from "node:fs"; import path from "node:path"; // Add the SCSS plugin const rolldownCopyScssPlugin: RolldownPluginOption = { name: "rolldown-plugin-copy-scss", buildStart() { const srcDir = path.resolve("public/scss"); if (!fs.existsSync(srcDir)) return; const files = fs.readdirSync(srcDir); for (const file of files) { if (file.endsWith(".scss")) { const filePath = path.join(srcDir, file); const source = fs.readFileSync(filePath, "utf-8"); this.emitFile({ type: "asset", fileName: `css/${file}`, source: source }); } } } }; export default defineConfig([ // In the client build options { input: ["public/client.ts"], platform: "browser", output: { dir: "build/public", format: "umd", cleanDir: true, strict: true, entryFileNames: "lib/[name].js", chunkFileNames: "lib/[name].js", topLevelVar: true, minify: { compress: true, mangle: false }, sourcemap: true }, plugins: [rolldownCopyScssPlugin] // Load the SCSS plugin } ]); Using jQuery To use jQuery, first install its type definitions: pnpm add -D @types/jquery Add the following to public/tsconfig.json: { "compilerOptions": { ... "types": ["jquery"], ... }, ... } If you still get an error, add /// <reference types="jquery"/> to the top of your TypeScript file.
  • [nodebb-plugin-timestamp][ESM] Insert a relative time component into the post

    1
    3 Votes
    1 পোস্টগুলি
    242 দেখেছেন
    ccD2sC
    Note: This is a Vibe Coding plugin. NodeBB Plugin Timestamp https://github.com/TASA-Ed/nodebb-plugin-timestamp Add a button to the post composer for inserting relative timestamps. Other users see a relative time (e.g. "3 days from now") — hover to reveal the exact time in their local timezone. This plugin uses ES modules, so it is only compatible with NodeBB 4.12.0 and later. [image: ac198a72-2f08-4c17-82a0-29dbb1c0e4d0.webp] [image: 20f15e8a-d0f3-4020-ad62-75237ea6b6e9.webp] Features Composer toolbar button for inserting timestamps Datetime picker dialog for easy selection Server-side parsing: [timestamp]1700000000000[/timestamp] → <time> HTML element Client-side localization via toLocaleString() Relative time rendering compatible with NodeBB's built-in timeago Installation npm install nodebb-plugin-timestamp # or via NodeBB ACP plugin manager Usage While composing a post, click the clock icon in the editor toolbar. Select a date and time in the picker dialog. A [timestamp]...[/timestamp] tag is inserted at the cursor position. After posting, it renders as a relative time. Hover to see the exact time. Development # Install dependencies pnpm install # Dev build with watch pnpm dev # Production build pnpm build # Type check pnpm typecheck # Lint pnpm lint # Format pnpm fmt License MIT
  • [nodebb-plugin-internalnotes] internal notes and topic assignment

    13
    6 Votes
    13 পোস্টগুলি
    2k দেখেছেন
    BrutalBirdieB
    HeyO @julian I created a PR for the docs based on the findings above and while at it updated some doc pages to use the admonitions instead of just > **note** and such. Creates prettier looking doc like: [image: 1780471889784-6ea28fdd-dbd7-4bf6-a909-2f3514c4b496-image.jpeg] Compared to: [image: 1780471948488-84ff59ea-94a7-4a5b-8c62-fdff4fbc9ab7-image.jpeg] https://github.com/NodeBB/docs/pull/113
  • Tenor GIF plugin update

    tenorgif nodebb plugins
    7
    1 Votes
    7 পোস্টগুলি
    2k দেখেছেন
    crazycellsC
    @julian said: @crazycells @astro-what the Tenor GIF plugin has been updated to v4 and transparently uses the Klipy API now. You'll need to generate a new API key when you update to v4. thank you
  • 3 Votes
    1 পোস্টগুলি
    1k দেখেছেন
    James RossJ
    I built a plugin to fix a problem that was slowly eating my server, and figured it might help others here too: nodebb-plugin-cloudflare-cache. It's also on npm. Background I ported a large, long-running forum from vBulletin over to NodeBB, and almost right away the Node process was working much harder than the real human traffic could explain. It was bots. A big forum has a huge URL surface, and crawlers were hitting all of it constantly, each request a full dynamic render even though a crawler is just an anonymous visitor seeing the same HTML as every other guest. The fix is to serve those guest page views from Cloudflare's edge instead of rebuilding them in Node, while keeping logged-in members fully dynamic. Doing that safely by hand means carefully ordered Cache Rules, so I packaged it into one click from the admin panel. Features Guest HTML edge caching. Anonymous page views are served from Cloudflare. Anything with a session cookie bypasses the cache automatically and stays dynamic. Safe by default. API, Socket.IO, admin, and auth routes (/login, /register, /reset, /compose, and so on) are never cached. Static asset caching. Long-TTL edge and browser caching for /assets/, plugin static files, uploads, and icons. One-click deploy from the admin panel. Verify your token, auto-detect your Zone ID, preview the generated rules, then deploy. Non-destructive. It only touches the rules this plugin manages and preserves any existing custom cache rules in your zone. Built-in cache warmer. Crawls your sitemap as an anonymous guest to pre-warm the edge, on demand, on startup, or on a schedule. Admin-only API. Every management endpoint is guarded by admin privileges. Tested. Ships with a unit test suite. Cache Rules It writes three ordered Cache Rules into Cloudflare's http_request_cache_settings phase, which Cloudflare evaluates top-down: Order Rule Behavior 1 Bypass API, Socket.IO, admin, and auth routes are never cached. 2 Static assets /assets/, plugin static files, uploads, and icons. Long TTL, default 30 days. 3 Guest HTML HTML cached at the edge only when no session cookie is present. Default 1h edge TTL. Because the bypass rule comes first, dynamic and authenticated traffic is protected before the guest-HTML rule can ever match. Requirements NodeBB 3.2 or newer, Node.js 18 or newer A Cloudflare-proxied (orange-cloud) DNS record for the forum SSL/TLS mode set to Full or stricter if your origin uses TLS, and WebSockets enabled for Socket.IO A Cloudflare API token with Zone > Cache Rules > Edit, Zone > Zone Settings > Read, and optionally Zone > Zone > Read for zone auto-detection Install It's listed in the NodeBB plugin registry on npm, so the easiest route is straight from the ACP: go to Admin > Extend > Plugins > Find Plugins, search for Cloudflare Cache, then install and activate. If you prefer the command line, from your NodeBB root: npm install nodebb-plugin-cloudflare-cache ./nodebb build ./nodebb restart Either way, once it's active, open Admin > Plugins > Cloudflare Cache and run Verify Token and Zone, then Preview Generated Rules, then Deploy Cache Rules. Verifying it works # Guest page: first MISS, then HIT curl -sI 'https://yourforum.com/' -b '' | grep -i cf-cache-status # Session traffic bypasses the guest rule and stays dynamic curl -sI 'https://yourforum.com/' -H 'Cookie: express.sid=anything' | grep -i cf-cache-status Version history v0.3.0 (latest): Two-step cache warming. Clicking "Warm Cache Now" first discovers URLs from the sitemap and shows the total count before starting. The discover endpoint reads server CPU count, free memory, and load average, then suggests concurrency and delay settings, which you can adjust in the confirmation panel with a live time estimate. If discovery hits the Maximum URLs limit, the admin is warned to raise it. v0.2.0: Live progress bar for cache warming in the admin UI, showing the discovery phase, completion percentage, and counters for warmed, cached, uncacheable, and errors. Warming now runs asynchronously, so the POST returns immediately and large URL sets (10k+) no longer hit HTTP timeouts. Added a GET /warm/status polling endpoint. v0.1.1: Return 409 Conflict instead of 500 when the warmer is already running. Cloudflare BYPASS and DYNAMIC statuses are now split into a separate uncacheable counter instead of being counted as warmed. Enriched the warm log and admin detail message with sitemap and URL discovery counts. v0.1.0: First public release. Edge-caches the forum on Cloudflare and warms anonymous pages from the sitemap, with guest HTML edge caching, automatic session-cookie bypass, and an admin-only API. Links: GitHub, npm. Feedback, bug reports, and PRs are all welcome, especially from anyone else who's migrated a large board and watched the crawlers pile on. Happy to answer questions in this thread.
  • New Plugin for Azure Entra ID

    1
    0 Votes
    1 পোস্টগুলি
    243 দেখেছেন
    Bellona NikeB
    I'm with ReadMirrorGlass.com. We needed this so we wrote one. It works with minimal config. We're busy working on the rest of ReadMirrorGlass.com but we're happy to contribute this back to the community. It's also available on GitHub. Enjoy and come visit us for long-form web serials once everything is working. https://www.npmjs.com/package/nodebb-plugin-sso-azure-external-id https://github.com/starkhydra/readmirrorglass-nodebb-plugin-sso-azure-external-id
  • Multilingual forum support

    3
    0 Votes
    3 পোস্টগুলি
    4k দেখেছেন
    Zielony XDZ
    @julian nope, I am looking to show and hide categories based on language. if I select EN flag I want only international and EN categories to show up (hiding other languages), the same would happen for other languages. international posts would have a bar with flags (perhaps some tab view that can show selected post in parts based on selected tab, it could be a whole separate plugin) so you could select a language like FR for example and it would show the post in french. I'm not sure how do I implement this sort of things like the category language bar. In the editor it would look like that: [TAB="[[myplugin:flag_en]]"](Here is the content that will only show after selecting tab with english flag) [TAB="[[myplugin:flag_es]]"](Here would be translated content to spanish) then the plugin would display it as tabs and switch the content based on selected option. that is my idea. would it be possible to implement this as a plugin? and if so, how? do I have to make a new template that will replace old post view? how do I put my own element in a nodebb page such as the main page?
  • [nodebb-plugin-username-denylist] block usernames at registration time

    5
    3 Votes
    5 পোস্টগুলি
    1k দেখেছেন
    BrutalBirdieB
    Oh! WOW! I was looking for a plugin like this, but for some reason I did not find it! Would be interesting to know how that plugin interacts with the nodebb-plugin-sso-oauth2-multiple We have an OpenID/OAuth2 provider that does not serve usernames thus the fallback options are needed but also not a perfect fit for us. That is why I also created a PR https://github.com/NodeBB/nodebb-plugin-sso-oauth2-multiple/pull/157 that adds two functions to upload a custom icon and a third fallback option to allow the user to choose a username. I made sure that my plugin nodebb-plugin-username-denylist works with nodebb-plugin-sso-oauth2-multiple (including the changes I made). So now our users can use our OpenID/OAuth2 provider, chose a username and still are subjected to the denylist. fyi: credentials in the video are revoked and useless https://youtu.be/El2H6gz24fg
  • 3 Votes
    3 পোস্টগুলি
    719 দেখেছেন
    sqlikS
    Yeah, I saw it. But I mainly wanted to build it for myself. Instead of customizing yet another fork, I preferred to build my own plugin from scratch - it was about the same amount of work. And since I’ve already done it, why not share it?
  • [nodebb-plugin-poll] Poll plugin

    plugin poll
    199
    14 Votes
    199 পোস্টগুলি
    319k দেখেছেন
    <baris>B
    Published 4.0.6, which fixes a XSS issue.
  • nodebb-plugin-extended-markdown Issues.

    1
    3
    0 Votes
    1 পোস্টগুলি
    477 দেখেছেন
    Anthony.A
    We were fiddling with the markdown options to see if everything worked - and while a few minor issues I could fix with css (such as checkbox lists keeping the bullet) [image: 1773919256983-af74d19f-7dc1-4733-994f-d3b277196a5a-image.jpeg] For reference in case others want to know how I attempted to fix it: // Change all ul li within post content to "∙" .content ul li::marker { content: "∙"; } // Do not change ordered lists to "∙",but keep them as they were. ol li::marker { content: initial; } // Remove bullets from bullted checkbox lists. li:has(.plugin-markdown input[type="checkbox"])::marker { content: none !important; } Result: [image: 1773919512795-f0c1ecf4-73e0-41da-9eb4-96a5fd1e5de5-image.jpeg] But the major reason I am posting is the grouped codeblocks: https://github.com/MinecraftForgeFrance/nodebb-plugin-extended-markdown/issues/18 [image: 1773919418176-94b2768f-5e99-4d6c-be23-dab2354c4781-image.jpeg] I posted in the github issues, but no reply. I am not sure if the project is simply inactive, or the devs just simply haven't gotten around to it - but I thought it was worth a shot posting here as well.
  • A plugin that allows the administrator to view and manage user chats

    6
    5 Votes
    6 পোস্টগুলি
    1k দেখেছেন
    palmoniP
    @DownPW As I wrote, it is already whitelisted and can be installed directly in the interface without the need for a terminal. I think NodeBB does not want to officially integrate it because it gives access to private areas that they do not want to allow by default, but anyone who wants can install it. I will incorporate your translations later, anyone who wants translations into additional languages ​​is welcome to open a pull request.
  • [nodebb-plugin-poll] Poll is not showing

    8
    1 Votes
    8 পোস্টগুলি
    1k দেখেছেন
    <baris>B
    @downpw thanks added in https://github.com/NodeBB/nodebb-plugin-poll/commit/840e888a5338c67f9de4b783f5b616076e58cc2a
  • [nodebb-plugin-openai] NodeBB OpenAI Plugin

    plugin openai
    51
    2
    6 Votes
    51 পোস্টগুলি
    29k দেখেছেন
    xiaoyeX
    @KirillJsxh You may find this method helpful.https://jinxiusky.cn/topic/203
  • [nodebb-plugin-reactions] Reactions plugin for NodeBB

    121
    11 Votes
    121 পোস্টগুলি
    93k দেখেছেন
    JürgenJ
    wow - that was damned fast - thank you so much. We'll provide some i8n these days
  • [Plugin] Global Chat Search - Search across all your conversations

    1
    2 Votes
    1 পোস্টগুলি
    550 দেখেছেন
    palmoniP
    [Plugin] Global Chat Search - Search across all your conversations Standard NodeBB chat search is great for searching within a specific room, but what if you need to find that one message and you can't remember which chat it was in? NodeBB Chat Search adds a global search bar to your chat sidebar, allowing you to search through every conversation you've ever been a part of. Features Global Context: Searches across all room IDs associated with your UID. Performance Focused: Fetches messages in batches of 50 to ensure the server remains responsive during deep searches. Sticky UI: Your search query and results persist even when you navigate between different chat rooms. Smart Navigation: Clicking a result takes you directly to that message and highlights it with a smooth scroll and background transition. Rich Previews: Displays room names, sender avatars, and timestamps using the native NodeBB look and feel. Technical Details Hooks Used: static:app.load for server initialization and filter:scripts.client for injecting the search interface. DOM Management: Uses a MutationObserver to ensure the search bar is injected correctly regardless of how the chat page is loaded. State Management: Implements window.chatSearchState to prevent losing search results during Ajaxify transitions. Compatibility: Built for NodeBB ^3.0.0. Installation npm install nodebb-plugin-chat-search Install the plugin via the terminal. Activate it in the Administrator Control Panel (ACP). Rebuild and Restart your NodeBB instance. Links GitHub: https://github.com/palmoni5/nodebb-plugin-chat-search Issues: Report a bug Feel free to leave feedback or feature requests below!
  • [nodebb-plugin-location-to-map] Location to map plugin

    plugin location nodebb
    4
    3 Votes
    4 পোস্টগুলি
    4k দেখেছেন
    <baris>B
    Updated this plugin to work on nodebb 2.x, 3.x & 4.x. Looks like google's static map api requires an API key now, so there is an admin page to put that in. Also updated the plugin so it displays the map in a dropdown and links to interactive maps. Tested on harmony and persona. [image: maps.gif] [image: maps2.gif]
  • whitelist

    12
    0 Votes
    12 পোস্টগুলি
    2k দেখেছেন
    <baris>B
    You can install it with npm install nodebb-plugin-registration-notification@latest