Custom Hooks

The Forum implements several custom hooks to allow for a more customizable environment. For more information on built in mediawiki hooks, go to MediaWiki Manual. The custom hooks are:

TopLevelTabs

Description

This hook is called to populate the top level tabs. Typically in the implemented function it will call the TabUtils::createTab function.

Define Function

function createTab(&$tabs) { ... }

SubLevelTabs

Description

This hook is called to populate the second level tabs. Typically in the implemented function it will call the TabUtils::createSubTab function and append the subtab to one of the top level tabs

Define Function

function createSubTabs(&$tabs) { ... }

ToolboxHeaders

Description

This hook is called to populate the headers in the toolbox. Typically in the implemented function it will call the TabUtils::createToolboxHeader function.

Define Function

function createToolboxHeader(&$toolbox) { ... }

CheckImpersonationPermissions

Description

This is called when a person is trying to impersonate someone else. Normally a user will not have permissions to see any page on the forum as another user (unless they are a manager), however by calling this hook it a page can override this with its own access control logic.

Define Function

function checkImpersonationPermissions($person, $realPerson, $ns, $title, $pageAllowed) { ... }

ImpersonationMessage

Description

When a user is impersonating someone a message is displayed to them. It is a pretty generic message so calling this hook can be used to override the message if it needs to be more specific.

Define Function

function impersonationMessage($person, $realPerson, $ns, $title, $message) { ... }

Table Of Contents

Previous topic

Important Files/Folders

Next topic

AnnokiControl

This Page