/sources/zones2.php

Description
Functions
actual_add_zone (line 42)

Add a zone.

void actual_add_zone (ID_TEXT $zone, SHORT_TEXT $title, [ID_TEXT $default_page = 'start'], [SHORT_TEXT $header_text = ''], [ID_TEXT $theme = 'default'], [BINARY $wide = 0], [BINARY $require_session = 0], [BINARY $displayed_in_menu = 1])
  • ID_TEXT $zone: Name of the zone
  • SHORT_TEXT $title: The zone title
  • ID_TEXT $default_page: The zones default page
  • SHORT_TEXT $header_text: The header text
  • ID_TEXT $theme: The theme
  • BINARY $wide: Whether the zone is wide
  • BINARY $require_session: Whether the zone requires a session for pages to be used
  • BINARY $displayed_in_menu: Whether the zone in displayed in the menu coded into some themes
cleanup_block_name (line 363)

Make a block codename look nice

  • return: A nice human readable version of the name
string cleanup_block_name (ID_TEXT $block)
  • ID_TEXT $block: The raw block codename
extract_module_functions_page (line 517)

Extract code to execute the requested functions with the requested parameters from the module requested.

  • return: A list of pieces of code to do the equivalent of executing the requested functions with the requested parameters
array extract_module_functions_page (ID_TEXT $zone, ID_TEXT $page, array $functions, [?array $params = NULL])
  • ID_TEXT $zone: The zone it is in
  • ID_TEXT $page: The page name
  • array $functions: Array of functions to be executing
  • ?array $params: A list of parameters to pass to our functions (NULL: none)
extract_module_info (line 543)

Extract the info function from a module at a given path.

  • return: A module information map (NULL: module contains no info method)
?array extract_module_info (PATH $path)
  • PATH $path: The path to the module
find_all_blocks (line 325)

Get an array of all the blocks that are currently installed.

  • return: Map of all blocks (name->[sources/sources_custom])
array find_all_blocks ()
get_block_parameters (line 378)

Gets parameters for a block

  • return: A list of parameters the block takes
array get_block_parameters (ID_TEXT $block)
  • ID_TEXT $block: The name of the block to get parameters for
get_module_overridables (line 120)

Get a list of overridable SP's for a module.

  • return: A pair: List of overridable SP's, SP-page
array get_module_overridables (ID_TEXT $zone, ID_TEXT $page)
  • ID_TEXT $zone: The zone it is in
  • ID_TEXT $page: The page name
init__zones2 (line 24)

Standard code module initialisation function.

void init__zones2 ()
reinstall_block (line 436)

Reinstall a block if it has become corrupted for any reason.

Again, you should not need to use this function.

  • return: Whether installation was required
boolean reinstall_block (ID_TEXT $block)
  • ID_TEXT $block: The name of the block to reinstall
reinstall_module (line 222)

Reinstall the specified module.

  • return: Whether a module installer had to be run
boolean reinstall_module (ID_TEXT $zone, ID_TEXT $module)
  • ID_TEXT $zone: The zone name
  • ID_TEXT $module: The module name
uninstall_block (line 485)

This function totally uninstalls a block from the system. Yet again, you should not need to use this function.

void uninstall_block (ID_TEXT $block)
  • ID_TEXT $block: The name of the block to uninstall
uninstall_module (line 289)

Completely uninstall the specified module from the system.

void uninstall_module (ID_TEXT $zone, ID_TEXT $module)
  • ID_TEXT $zone: The zone name
  • ID_TEXT $module: The module name
upgrade_block (line 394)

Upgrades a block to the latest version available on your ocPortal installation. [b]This function can only upgrade to the latest version put into the block directory.[/b] You should not need to use this function.

  • return: 0=No upgrade. -2=Not installed, 1=Upgrade
integer upgrade_block (ID_TEXT $block)
  • ID_TEXT $block: The name of the block to upgrade
upgrade_module (line 157)

Upgrade the specified module.

  • return: 0=No upgrade. -2=Not installed, 1=Upgrade
integer upgrade_module (ID_TEXT $zone, ID_TEXT $module)
  • ID_TEXT $zone: The zone name
  • ID_TEXT $module: The module name
_find_all_modules (line 707)

Get an array of all the modules.

  • return: A map of page name to type (modules_custom, etc)
array _find_all_modules (ID_TEXT $zone)
  • ID_TEXT $zone: The zone name
_find_all_pages (line 622)

Get an array of all the pages of the specified type (module, etc) and extension (for small sites everything will be returned, for larger ones it depends on the show method).

  • return: A map of page name to type (modules_custom, etc)
array _find_all_pages (ID_TEXT $zone, ID_TEXT $type, [string $ext = 'php'], [boolean $keep_ext_on = false], [?TIME $cutoff_time = NULL], [integer $show_method = 0])
  • ID_TEXT $zone: The zone name
  • ID_TEXT $type: The type (including language, if appropriate)
  • string $ext: The file extension to limit us to (without a dot)
  • boolean $keep_ext_on: Whether to leave file extensions on the page name
  • ?TIME $cutoff_time: Only show pages newer than (NULL: no restriction)
  • integer $show_method: Selection algorithm constant
_find_all_pages_wrap (line 560)

Get an array of all the pages everywhere in the zone (for small sites everything will be returned, for larger ones it depends on the show method).

  • return: A map of page name to type (modules_custom, etc)
array _find_all_pages_wrap (ID_TEXT $zone, [boolean $keep_ext_on = false], [boolean $consider_redirects = false], [integer $show_method = 0])
  • ID_TEXT $zone: The zone name
  • boolean $keep_ext_on: Whether to leave file extensions on the page name
  • boolean $consider_redirects: Whether to take redirects into account
  • integer $show_method: Selection algorithm constant

Documentation generated on Sun, 02 Jan 2011 23:29:39 +0000 by phpDocumentor 1.4.3