Class p_master

Description

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

Located in /includes/functions_module.php (line 23)


	
			
Variable Summary
 mixed $module_ary
 mixed $p_class
 mixed $p_id
 mixed $p_mode
 mixed $p_name
 mixed $p_parent
Method Summary
 void add_mod_info ( $module_class)
 void adjust_url (string $url_extra)
 void assign_tpl_vars ( $module_url)
 void build_tree ( &$modules,  &$parents)
 void display ( $page_title, [ $display_online_list = true])
 void get_branch ( $left_id,  $right_id,  $remaining)
 void get_page_title ()
 void get_parents ( $parent_id,  $left_id,  $right_id,  &$all_parents)
 void get_tpl_name ()
 void is_active ( $id, [ $mode = false])
 void list_modules ( $p_class)
 void load ( $class,  $name, [ $mode = false])
 bool loaded (string $module_basename, [mixed $module_mode = false])
 void load_active ([ $mode = false], [ $module_url = false], [ $execute_module = true])
 void module_auth ( $module_auth, [ $forum_id = false])
 void set_active ([ $id = false], [ $mode = false])
 void set_display ( $id, [ $mode = false], [ $display = true])
Variables
mixed $acl_forum_id = false (line 33)
mixed $active_module = false (line 31)
mixed $active_module_row_id = false (line 32)
mixed $module_ary = array() (line 34)
mixed $p_class (line 26)
mixed $p_id (line 25)
mixed $p_mode (line 28)
mixed $p_name (line 27)
mixed $p_parent (line 29)
Methods
add_mod_info (line 817)

Add custom MOD info language file

void add_mod_info ( $module_class)
  • $module_class
adjust_url (line 489)

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.

void adjust_url (string $url_extra)
  • string $url_extra: Extra url parameters, e.g.: &u=$user_id
assign_tpl_vars (line 614)

Build navigation structure

void assign_tpl_vars ( $module_url)
  • $module_url
build_tree (line 577)

Build true binary tree from given array

Not in use

void build_tree ( &$modules,  &$parents)
  • &$modules
  • &$parents
display (line 772)

Display module

void display ( $page_title, [ $display_online_list = true])
  • $page_title
  • $display_online_list
get_branch (line 556)

Get tree branch

void get_branch ( $left_id,  $right_id,  $remaining)
  • $left_id
  • $right_id
  • $remaining
get_page_title (line 743)

Returns the desired page title

void get_page_title ()
get_parents (line 528)

Get parents

void get_parents ( $parent_id,  $left_id,  $right_id,  &$all_parents)
  • $parent_id
  • $left_id
  • $right_id
  • &$all_parents
get_tpl_name (line 735)

Returns desired template name

void get_tpl_name ()
is_active (line 508)

Check if a module is active

void is_active ( $id, [ $mode = false])
  • $id
  • $mode
list_modules (line 45)

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.

void list_modules ( $p_class)
  • $p_class
load (line 758)

Load module as the current active one without the need for registering it

void load ( $class,  $name, [ $mode = false])
  • $class
  • $name
  • $mode
loaded (line 240)

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

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

Loads currently active module

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

void load_active ([ $mode = false], [ $module_url = false], [ $execute_module = true])
  • $mode
  • $module_url
  • $execute_module
module_auth (line 278)

Check module authorisation

void module_auth ( $module_auth, [ $forum_id = false])
  • $module_auth
  • $forum_id
set_active (line 336)

Set active module

void set_active ([ $id = false], [ $mode = false])
  • $id
  • $mode
set_display (line 803)

Toggle whether this module will be displayed or not

void set_display ( $id, [ $mode = false], [ $display = true])
  • $id
  • $mode
  • $display

Documentation generated on Tue, 26 Aug 2008 08:34:04 +0200 by phpDocumentor 1.4.2