File/cms/include/common.inc.php

Description
Functions
debugger (line 148)

Print debug message.

This function is called at strategic places in the code. Uncommenting the the print command will activate the 'debugger' mode.

void debugger (string $msg, interger $val)
  • string $msg: The message you'd like to have printed.
  • interger $val: Not used for anything.
findbotid (line 166)

Get the first bot ID from the table.

  • return: The bot's ID.
  • uses: debugger() - Retrieves the bot's ID, from the bots table. WARNING: This is expected NOT to work in a multi-bot environment.
integer findbotid ()
findmainnode (line 201)

Retrieve the Main Node ID.

The main node is the start-node of the AIML tree, the trunk if you will. This node often contains the word <input> and the parent reference is always the bot's ID, only negative. Thus, making sure that it doesn't conflict with parent ID's of AIML categories.

integer findmainnode (integer $botid)
  • integer $botid: The bot's ID.
findParent (line 232)

Get the parent ID.

Retrieve the corresponding parent ID (i.e. the next word's pattern ID) for this pattern ID.

integer findParent (integer $patternID)
  • integer $patternID: The word's pattern ID.
getbotnames (line 106)

Get the chatterbots names from table

Retrieve an array with the botnames and their ID's from the bots table

  • return: Array-key is the botid, Array-value the botname
  • usedby: addition.php
array getbotnames ()
getRequest (line 37)

Make REQUEST variables in to regular variables.

Retrieves REQUEST variables (POST/GET) and turns them into regular variables If the REQUEST variable doesn't exist, it creates the variables with the default value that's also passed with it.

  • return: It creates a set of variables.
  • usedby: addition.php
void getRequest (string $param, string $default)
  • string $param: REQUEST variable name
  • string $default: default value in case variable doesn't exist
getTemplate (line 64)

Load template file from template folder.

Template function. Retrieves the template from the templates folder.

  • return: Template file contents for the to be retuned page.
  • usedby: useTemplate()
string getTemplate (string $TPL)
  • string $TPL: Name of the HTML template file.
templateCheck (line 262)

Check if template ID exists.

Check to see if a specific template ID is found in the templates tables.

boolean templateCheck (integer $templateID)
  • integer $templateID: The category's ID.
useTemplate (line 91)

Replace placeholders in template file with array elements.

Template function. Takes an array of values, and the name of the template and replaces the placeholders with their array equivilent values.

string useTemplate (string $TPL, array $ARRAY)
  • string $TPL: Name of the HTML template file.
  • array $ARRAY: The array where the key is the placeholder name and the value what it needs to be replaced with.

Documentation generated on Tue, 11 Jan 2005 18:41:02 +0100 by phpDocumentor 1.3.0RC3