Vigilante

Vigliant Media Framework

Documentation

Scripting with Vigilante

Setting up a page to use Vigilante

To access the Vigilante libraries, the first line in your PHP script must include the common.php file from the /includes/ directory. Depending upon your server configuration, you may need to use a full file system path.

Example 3-2-1
include("/includes/common.php");
Example 3-2-2
include("$DOCUMENT_ROOT/includes/common.php");
Example 3-2-3
include("/file/path/to/includes/common.php");
Example 3-2-4
include("C:/file/path/to/includes/common.php");

The next lines in your script should initialize your database connection and Smarty object. Use the SQL() and Smarty() functions.

Example 3-2-5
include("$DOCUMENT_ROOT/includes/common.php");
SQL();
Smarty();

In Example 3-2-5, the database connection is assigned to the reserved variable $Conn, and the Smarty object is assigned to the reserved variable $smarty.