Sample Code: Hello World Module

Here a simple example how to create a hello world module.

1. Database changes:

INSERT INTO `liveoffice`.`config` SET `code` = 50, `value` = 'helloworld', `desc` = 'module', `property` = 1;

2. Files:


#1: Create a folder called: helloworld
#2: Create the following files:
  • helloworld/action.php - view/hide source
  • helloworld/class/HelloWorld.class.php - view/hide source
  • helloworld/lang/en.php - view/hide source
  • helloworld/templates/theme/default/index.html - view/hide source
  • helloworld/templates/theme/default/imgs/icon_mini.png (16x16)
  • helloworld/templates/theme/default/imgs/icon_min.png (48x48)
  • helloworld/templates/theme/default/imgs/icon.png (64x64)
  • helloworld/templates/theme/default/imgs/icon_small.png (22x22)

3. Create the cache template folder:

mkdir -m 777 -p /tmp/templates_c/preference/theme/default/