class p_master
Class handling all types of 'plugins' (a future term)
Properties
| $p_id | ||
| $p_class | ||
| $p_name | ||
| $p_mode | ||
| $p_parent | ||
| $include_path | ||
| $active_module | ||
| $active_module_row_id | ||
| $acl_forum_id | ||
| $module_ary |
Methods
|
p_master($include_path = false)
Constuctor Set module include path |
||
|
set_custom_include_path(string $include_path)
Set custom include path for modules Schema for inclusion is include_path . |
||
|
list_modules($p_class)
List modules |
||
| bool |
loaded(string $module_basename, mixed $module_mode = false)
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 |
|
|
module_auth($module_auth, $forum_id = false)
Check module authorisation |
||
|
set_active($id = false, $mode = false)
Set active module |
||
|
load_active($mode = false, $module_url = false, $execute_module = true)
Loads currently active module |
||
|
adjust_url(string $url_extra)
Appending url parameter to the currently active module. |
||
|
is_active($id, $mode = false)
Check if a module is active |
||
|
get_parents($parent_id, $left_id, $right_id, $all_parents)
Get parents |
||
|
get_branch($left_id, $right_id, $remaining)
Get tree branch |
||
|
build_tree($modules, $parents)
Build true binary tree from given array Not in use |
||
|
assign_tpl_vars($module_url)
Build navigation structure |
||
|
get_tpl_name()
Returns desired template name |
||
|
get_page_title()
Returns the desired page title |
||
|
load($class, $name, $mode = false)
Load module as the current active one without the need for registering it |
||
|
display($page_title, $display_online_list = true)
Display module |
||
|
set_display($id, $mode = false, $display = true)
Toggle whether this module will be displayed or not |
||
|
add_mod_info($module_class)
Add custom MOD info language file |
Details
at line 41
public
p_master($include_path = false)
Constuctor Set module include path
at line 61
public
set_custom_include_path(string $include_path)
Set custom include path for modules Schema for inclusion is include_path .
modulebase
at line 81
public
list_modules($p_class)
List modules
This creates a list, stored in $this->moduleary of all available modules for the given class (ucp, mcp and acp). Additionally $this->moduley_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.
at line 276
public bool
loaded(string $module_basename, mixed $module_mode = false)
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
at line 314
public
module_auth($module_auth, $forum_id = false)
Check module authorisation
at line 372
public
set_active($id = false, $mode = false)
Set active module
at line 430
public
load_active($mode = false, $module_url = false, $execute_module = true)
Loads currently active module
This method loads a given module, passing it the relevant id and mode.
at line 525
public
adjust_url(string $url_extra)
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/mcpnotes.php - $this->pmaster->adjusturl() call.
at line 544
public
is_active($id, $mode = false)
Check if a module is active
at line 564
public
get_parents($parent_id, $left_id, $right_id, $all_parents)
Get parents
at line 592
public
get_branch($left_id, $right_id, $remaining)
Get tree branch
at line 613
public
build_tree($modules, $parents)
Build true binary tree from given array Not in use
at line 650
public
assign_tpl_vars($module_url)
Build navigation structure
at line 771
public
get_tpl_name()
Returns desired template name
at line 779
public
get_page_title()
Returns the desired page title
at line 794
public
load($class, $name, $mode = false)
Load module as the current active one without the need for registering it
at line 808
public
display($page_title, $display_online_list = true)
Display module
at line 839
public
set_display($id, $mode = false, $display = true)
Toggle whether this module will be displayed or not
at line 853
public
add_mod_info($module_class)
Add custom MOD info language file