Page tree
Skip to end of metadata
Go to start of metadata

What this guide is

This Guide will walk you through the module creation process for FreePBX 2.10+.

If you would like to create a module outside of FreePBX that isn't a FreePBX module, but has access to all of the features and functions, then please take a look at Bootstrap.

We generally try to follow a loose MVC model of programming.

For a visual example of a working FreePBX module, please see our "Hello World" example on GitHub: https://github.com/FreePBX/helloworld

Directory Structure

Our module directory should be created in /<webroot>/admin/modules, and the structure will be as follows (click each for more information):

 <modulename>/module.xml
 install.php
 uninstall.php
 functions.inc.php
 bin
 assets
 i18n
 views

Additional files can be as such (and there is no limit to these):

<modulename>page.<pagename>.php
 <pagename>.html.php

Note: install.sql and uninstall.sql are depreciated and never worked quite right

Assets

<modulename>assetsjsyourfiles.js
  cssyourfiles.css


less<modulename>.less (<modulename>.less is loaded first if it exists)


images


fonts

These files are linked on "apply config".

FreePBX 12.0 and Higher Additions

<modulename><modulename>.class.php (CamelCase)

For BMO development see: FreePBX Big Module Object (BMO)

FreePBX 13.0 and Higher

<modulename>Console<modulename.class.php (CamelCase)

For console development see: FWConsole Development


 

  • No labels