Writing Your First NodeBB Plugin

Since my last post about a month ago talking about the initial release of the NodeBB forums plugin system, we’ve had quite a few plugins written already. Now that the system is more mature, I thought I’d write a quick how-to guide for the aspiring plugin developer.

I’m going to use the NodeBB Youtube Plugin as an example – it’s a really simple addon that finds YouTube links in the post content and then embeds the Flash player inline.


Screenshot

So without further ado, lets get started. Click through to proceed to the guide. :)

Continue reading

Monetizing your NodeBB forum with AdSense

I wrote a really simple sidebar plugin today for NodeBB called NodeBB AdSense. With this plugin you can embed AdSense scripts into the sidebar to monetize your site.

To be fair its nothing more than an example plugin to demonstrate how to add a snippet of JS/HTML to the category view’s sidebar. Hopefully in the future we can do something more cooler with that, perhaps a small editor in the ACP to modify the ad dimensions or scheme. Maybe something like this adsense generator – but a little bit more cooler looking ;)

Click through for screenshots and installation instructions.

Continue reading

Cash MOD for NodeBB

This weekend I thought I’d buckle down and get crackin’ on some NodeBB plugins. I figured that over the next little while I’ll write a few plugins that I’ve been accustomed to using over the years with other forum software. This will give me a chance to find potential flaws in the plugin system and also give me the opportunity to set up various hooks in important places in the core.

More importantly, with a few skeleton plugins for people to look at, I’m hoping we can garner some interest in it from third-party developers.

I’m happy to say that I’ve released my first NodeBB plugin on NPM. Well… it’s actually my third, but the other two are “tutorial” plugins (check them out: Sample Admin Page and Sample Static Page).

So on to the fun stuff. The Cash MOD for NodeBB is a points plugin which awards the user virtual currency every time they post. They get more points per character typed, which gives the user a bit of an incentive to write higher quality posts. It isn’t a fully featured points addon yet – for example, we ought to have an ACP panel to modify user’s points – but the basics are all in (feel like improving it? fork it! :)).

Does this mean we could see an RPG addon built for NodeBB? Perhaps a port of ADR from phpBB? Or how about an Avatar system like Nulavatar? Man, that would be pretty cool… maybe one day after NodeBB development comes to the end of the roadmap I should really take a crack at it.

Click through to see screenshots of the Cash MOD in action!

Continue reading

Writing plugins for NodeBB

Julian from Design Create Play wrote a wiki article on how to write plugins for NodeBB. The plugins system as a whole is a pretty barebones module which we will work on improving as time goes on. That said, there are already quite a few plugins available which are installable via npm.

A third party plugin for parsing BBCode by adarqui is already under development, which is pretty exciting. Hopefully we can see more NodeBB plugins from developers as time progresses.