Docs for page modules.php

## /modules.php

Description

This script implements the Phorum module admin API.

This API is used for managing Phorum modules. It can be used to retrieve information about the available modules and takes care of activating and deactivating them.

- license: Phorum
- copyright: 2007, Phorum Development Team

Functions
module_sort (line 527)

A small utility function which can be used to sort modules by name using the uasort() command.

void module_sort (mixed $a, mixed $b)
phorum_api_modules_check_updated_info (line 474)

Check if there are modules for which the module information is updated.

- return: An array of module names for which the module information was updated.

array phorum_api_modules_check_updated_info ([mixed $do_reset = FALSE], boolean $do_reset )

- boolean $do_reset : If this parameter has a true value, then the active status for the module information is stored in the database.

phorum_api_modules_disable (line 251)

Flag a module as disabled.

This will only flag the module as disabled. After calling this function, phorum_api_modules_save() has to be called to store the new module settings in the database.

void phorum_api_modules_disable (mixed $module, string $module )

- string $module : The name of the module to disabled.

phorum_api_modules_enable (line 221)

Flag a module as enabled.

This will only flag the module as enabled. After calling this function, phorum_api_modules_save() has to be called to store the new module settings in the database.

void phorum_api_modules_enable (mixed $module, string $module )

- string $module : The name of the module to enable.

phorum_api_modules_list (line 71)

Retrieve a list of all available modules.

This function will scan the mods directory to find all available modules. For each module, the module information (info.txt or inline module info) is collected.

- return: An array, containing the following fields:
  - modules: An array of available modules. The keys are module names and the values are arrays, containing detailed module information.
  - priorities: An array containing scheduling priority rules.
  - deprecated: An array of warnings about deprecated module hooks or an empty array if there are no deprecation warnings.
  - problems: An array of (HTML formatted) errors and warnings regarding module problems.

array phorum_api_modules_list ()
phorum_api_modules_save (line 269)

Store the module information in the database.

This function will sort out all module and hook priorities for the enabled modules and write the result data ($PHORUM["mods"] and $PHORUM["hooks"]) to the database.

void phorum_api_modules_save ()

Documentation generated on Wed, 16 Jan 2008 08:31:14 -0600 by phpDocumentor 1.3.0RC5