[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/ -> functions_module.php (summary)

(no description)

Copyright: (c) 2005 phpBB Group
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 883 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

p_master:: (19 methods):
  p_master()
  set_custom_include_path()
  list_modules()
  loaded()
  module_auth()
  set_active()
  load_active()
  adjust_url()
  is_active()
  get_parents()
  get_branch()
  build_tree()
  assign_tpl_vars()
  get_tpl_name()
  get_page_title()
  load()
  display()
  set_display()
  add_mod_info()


Class: p_master  - X-Ref

Class handling all types of 'plugins' (a future term)

p_master($include_path = false)   X-Ref
Constuctor
Set module include path


set_custom_include_path($include_path)   X-Ref
Set custom include path for modules
Schema for inclusion is include_path . modulebase

param: string $include_path include path to be used.

list_modules($p_class)   X-Ref
List modules

This creates a list, stored in $this->module_ary of all available
modules for the given class (ucp, mcp and acp). Additionally
$this->module_y_ary is created with indentation information for
displaying the module list appropriately. Only modules for which
the user has access rights are included in these lists.

loaded($module_basename, $module_mode = false)   X-Ref
Check if a certain main module is accessible/loaded
By giving the module mode you are able to additionally check for only one mode within the main module

param: string $module_basename The module base name, for example logs, reports, main (for the mcp).
param: mixed $module_mode The module mode to check. If provided the mode will be checked in addition for presence.
return: bool Returns true if module is loaded and accessible, else returns false

module_auth($module_auth, $forum_id = false)   X-Ref
Check module authorisation


set_active($id = false, $mode = false)   X-Ref
Set active module


load_active($mode = false, $module_url = false, $execute_module = true)   X-Ref
Loads currently active module

This method loads a given module, passing it the relevant id and mode.

adjust_url($url_extra)   X-Ref
Appending url parameter to the currently active module.

This function is called for adding specific url parameters while executing the current module.
It is doing the same as the _module_{name}_url() function, apart from being able to be called after
having dynamically parsed specific parameters. This allows more freedom in choosing additional parameters.
One example can be seen in /includes/mcp/mcp_notes.php - $this->p_master->adjust_url() call.

param: string $url_extra Extra url parameters, e.g.: &u=$user_id

is_active($id, $mode = false)   X-Ref
Check if a module is active


get_parents($parent_id, $left_id, $right_id, &$all_parents)   X-Ref
Get parents


get_branch($left_id, $right_id, $remaining)   X-Ref
Get tree branch


build_tree(&$modules, &$parents)   X-Ref
Build true binary tree from given array
Not in use


assign_tpl_vars($module_url)   X-Ref
Build navigation structure


get_tpl_name()   X-Ref
Returns desired template name


get_page_title()   X-Ref
Returns the desired page title


load($class, $name, $mode = false)   X-Ref
Load module as the current active one without the need for registering it


display($page_title, $display_online_list = true)   X-Ref
Display module


set_display($id, $mode = false, $display = true)   X-Ref
Toggle whether this module will be displayed or not


add_mod_info($module_class)   X-Ref
Add custom MOD info language file




Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1