[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch




/includes/ -> functions_module.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 1153 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

p_master:: (23 methods):

Class: p_master  - X-Ref

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

__construct($include_path = false)   X-Ref
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_self($module_auth)   X-Ref
Check module authorisation.

This is a non-static version that uses $this->acl_forum_id
for the forum id.

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

This is a static version, it must be given $forum_id.
See also module_auth_self.

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.

param: string|false $mode mode, as passed through to the module
param: string|false $module_url If supplied, we use this module url
param: bool $execute_module If true, at the end we execute the main method for the new instance

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

param: string $class module class (acp/mcp/ucp)
param: string $name module name (class name of the module, or its basename
param: string $mode mode, as passed through to the module

display($page_title, $display_online_list = false)   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

get_short_name($basename)   X-Ref
Retrieve shortened module basename for legacy basenames (with xcp_ prefix)

param: string $basename A module basename
return: string The basename if it starts with phpbb_ or the basename with

get_module_identifier($basename)   X-Ref
If the basename contains a \ we don't use that for the URL.

Firefox is currently unable to correctly copy a urlencoded \
so users will be unable to post links to modules.
However we can replace them with dashes and re-replace them later

param: string    $basename    Basename of the module
return: string    Identifier that should be used for

is_full_class($basename)   X-Ref
Checks whether the given module basename is a correct class name

param: string $basename A module basename
return: bool True if the basename starts with phpbb_ or (x)cp_, false otherwise

Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1