Available Hooks

The following is a list of all hooks present in NodeBB. This list is intended to guide developers who are looking to write plugins for NodeBB. For more information, please consult Writing Plugins for NodeBB <create>.

There are four types of hooks, filters, actions, static, and response hooks.

Please consult the autogenerated list of hooks. The aforementioned list is automatically generated from the NodeBB codebase and is not guaranteed to be complete at all times.

Special Hooks

There are a number of special hooks that are included in the NodeBB codebase that are not explicitly called out in the autogenerated hooks page. They are included below as they are either a) useful, or b) difficult to understand given its context.

Page Build Hooks

In addition to hooks executed on certain actions, a pair of hooks are also fired whenever a page is loaded (either via direct page access, or via a page transition):

Widget Render Hook filter:widget.render:<widget>

A widget defined by a plugin needs to let NodeBB know what's in the widget (e.g. html, and other assorted data). This is handled via a plugin hook fired whenever a widget is rendered. The hook name itself is defined by the widget name, so if a widget with the widget property set to mywidget is rendered, the hook filter:widget.render:mywidget will be fired.

For more information, please consult the page on writing widgets