## /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.

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

Functions
module_sort (line 564)

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

void module_sort ( $a, $b)

- $a
- $b

phorum_api_modules_check_updated_info (line 511)

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 ([boolean $do_reset = FALSE])

- 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 288)

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 (string $module)

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

phorum_api_modules_enable (line 258)

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 (string $module)

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

phorum_api_modules_list (line 87)

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 306)

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, 17 Mar 2010 01:45:26 -0500 by phpDocumentor 1.4.1