Vigilante

Vigliant Media Framework

Documentation

Scripting with Vigilante

Extending Vigilante

To extend Vigilante's core libraries or to incorporate your own packages, save your packages in the /includes/custom/ subdirectory, then call them as includes in /includes/custom.php. (custom.php is called into common.php, which is then called into every page using Vigilante.)

Example 3-4-1 is a sample function called HelloWorld(), which prints out a "Hello world" message.

Example 3-4-1
function HelloWorld()
{
     echo "Hello, world!";
}

The function is saved in a file named more_functions.php in the /includes/custom/ subdirectory. To make this function available through Vigilante, an include line is added to /includes/custom.php, reading in more_functions.php.

Example 3-4-2
include($config['include_custom_path'] . "more_functions.php");