Vigilante

Vigliant Media Framework

Documentation

Getting Started

Configuration

Open the config.php file in the /includes/ directory and set the following minimum configuration values.

  • $config['webmaster_email']
    Set this to your e-mail address or the e-mail address you wish to appear on auto-generated e-mail.
  • $config['webmaster_name']
    Name of webmaster. This name is placed on auto-generated e-mail, so it's best to keep it fairly anonymous.
  • $config['site_name']
    The name or title of your site.
  • $config['site_base_url']
    The base URL of your site.
  • $config['local_site_path']
    The file path to the root directory of your web documents.

At a point where you wish to employ your Vigilante-based code in a production environment, you can set configuration values based on different environments by setting them within the switch (ENVIRONMENT) statement. Three environment values are currently available with the statement:

  • dev
    For a development environment.
  • test
    For a test environment.
  • prod
    For a production environment

To set an environment, open the env.php file in the /includes/ directory and change the second argument of the define('ENVIRONMENT') statement to one of the environment values listed above. In your own code, you can then create conditional statements depending upon those environment values.

The switch (ENVIRONMENT) statement is most effective when dealing with separate database servers. The following configuration values are specified under each case statement within the switch (ENVIRONMENT) statement:

  • $config['mysql_host']
    Name of your MySQL host
  • $config['mysql_db']
    Name of your MySQL database
  • $config['mysql_login']
    Your MySQL database login
  • $config['mysql_password']
    Your MySQL database password
  • $config['send_mail']
    A flag to determine whether to allow auto-generated e-mail to be sent. If you do not have mail server software installed on your development environment, kept his value set this to false.

You can also set these optional configuration values.

  • $config['debug_trace_color']
    Color of debug messages printed by the DebugTrace() function.
  • $config['catch_error_color']
    Color of error messages printed by the CatchError() function.
  • $config['catch_message_color']
    Color of generic messages printed by the CatchMessage() function.
  • $config['sql_debug_query']
    Flag to print out SQL queries performed by functions in sql.php.
  • $config['sql_catch_error']
    Flag to print out MySQL errors performed by functions in the sql.php.
  • $config['sql_enable_add']
    Flag to enable functions in sql.php to write new records to the database.
  • $config['sql_enable_update']
    Flag to enable functions in sql.php to update existing records in the database.
  • $config['sql_enable_delete']
    Flag to enable functions in sql.php to delete records from the database.