diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-08 13:01:04 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-04-08 13:01:04 +0000 |
commit | 96afdb5168c773ce45f1388e2a062a5a050d66b0 (patch) | |
tree | 8bb29b87fef526eb2be05443ac3915e2b0559212 /phpBB/includes/functions_module.php | |
parent | 4801f813cdf07fd029aac9fccea3d8b09d51612e (diff) | |
download | forums-96afdb5168c773ce45f1388e2a062a5a050d66b0.tar forums-96afdb5168c773ce45f1388e2a062a5a050d66b0.tar.gz forums-96afdb5168c773ce45f1388e2a062a5a050d66b0.tar.bz2 forums-96afdb5168c773ce45f1388e2a062a5a050d66b0.tar.xz forums-96afdb5168c773ce45f1388e2a062a5a050d66b0.zip |
- changed _module_*_url to only use the main module name but the mode as parameter
- custom module lang function now suffixed by _lang
- added general custom function with mode and module_row parameter
- do not display friends/foes if zebra has been disabled
git-svn-id: file:///svn/phpbb/trunk@5767 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r-- | phpBB/includes/functions_module.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index cbd689a3ff..9df7a53e08 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -176,12 +176,19 @@ class p_master $depth = sizeof($this->module_cache['parents'][$row['module_id']]); // We need to prefix the functions to not create a naming conflict - $url_func = '_module_' . $row['module_name'] . '_' . $row['module_mode'] . '_url'; - $lang_func = '_module_' . $row['module_name']; + + // Function for building 'url_extra' + $url_func = '_module_' . $row['module_name'] . '_url'; + + // Function for building the language name + $lang_func = '_module_' . $row['module_name'] . '_lang'; + + // Custom function for calling parameters on module init (for example assigning template variables) + $custom_func = '_module_' . $row['module_name']; $names[$row['module_name'] . '_' . $row['module_mode']][] = true; - $this->module_ary[] = array( + $module_row = array( 'depth' => $depth, 'id' => (int) $row['module_id'], @@ -194,7 +201,7 @@ class p_master 'mode' => (string) $row['module_mode'], 'display' => (int) $row['module_display'], - 'url_extra' => (function_exists($url_func)) ? $url_func() : '', + 'url_extra' => (function_exists($url_func)) ? $url_func($row['module_mode']) : '', 'lang' => ($row['module_name'] && function_exists($lang_func)) ? $lang_func($row['module_mode'], $row['module_langname']) : ((!empty($user->lang[$row['module_langname']])) ? $user->lang[$row['module_langname']] : $row['module_langname']), 'langname' => $row['module_langname'], @@ -202,6 +209,13 @@ class p_master 'left' => $row['left_id'], 'right' => $row['right_id'], ); + + if (function_exists($custom_func)) + { + $custom_func($row['module_mode'], $module_row); + } + + $this->module_ary[] = $module_row; } unset($this->module_cache['modules'], $names); |