aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-08 13:01:04 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-08 13:01:04 +0000
commit96afdb5168c773ce45f1388e2a062a5a050d66b0 (patch)
tree8bb29b87fef526eb2be05443ac3915e2b0559212 /phpBB
parent4801f813cdf07fd029aac9fccea3d8b09d51612e (diff)
downloadforums-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')
-rw-r--r--phpBB/develop/add_permissions.php6
-rw-r--r--phpBB/includes/functions_module.php22
-rw-r--r--phpBB/mcp.php24
-rw-r--r--phpBB/styles/subSilver/template/ucp_header.html6
-rwxr-xr-xphpBB/ucp.php11
5 files changed, 35 insertions, 34 deletions
diff --git a/phpBB/develop/add_permissions.php b/phpBB/develop/add_permissions.php
index bba431eeb9..51578b4341 100644
--- a/phpBB/develop/add_permissions.php
+++ b/phpBB/develop/add_permissions.php
@@ -56,7 +56,6 @@ $f_permissions = array(
'f_read' => array(1, 0),
'f_post' => array(1, 0),
'f_reply' => array(1, 0),
- 'f_quote' => array(1, 0),
'f_edit' => array(1, 0),
'f_user_lock' => array(1, 0),
'f_delete' => array(1, 0),
@@ -69,7 +68,6 @@ $f_permissions = array(
'f_attach' => array(1, 0),
'f_download'=> array(1, 0),
'f_icons' => array(1, 0),
- 'f_html' => array(1, 0),
'f_bbcode' => array(1, 0),
'f_smilies' => array(1, 0),
'f_img' => array(1, 0),
@@ -77,7 +75,6 @@ $f_permissions = array(
'f_sigs' => array(1, 0),
'f_search' => array(1, 0),
'f_email' => array(1, 0),
- 'f_rate' => array(1, 0),
'f_print' => array(1, 0),
'f_ignoreflood' => array(1, 0),
'f_postcount' => array(1, 0),
@@ -161,11 +158,9 @@ $u_permissions = array(
'u_attach' => array(0, 1),
'u_sig' => array(0, 1),
'u_pm_attach' => array(0, 1),
- 'u_pm_html' => array(0, 1),
'u_pm_bbcode' => array(0, 1),
'u_pm_smilies' => array(0, 1),
'u_pm_download' => array(0, 1),
- 'u_pm_report' => array(0, 1),
'u_pm_edit' => array(0, 1),
'u_pm_printpm' => array(0, 1),
'u_pm_emailpm' => array(0, 1),
@@ -235,7 +230,6 @@ $sql = 'UPDATE ' . USERS_TABLE . " SET user_permissions = ''";
$db->sql_query($sql);
$cache->destroy('acl_options');
-$cache->save();
echo "<p><b>Done</b></p>\n";
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);
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index c333573f70..54a1912149 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -198,32 +198,12 @@ page_footer();
/**
* Functions used to generate additional URL paramters
*/
-function _module_main_front_url()
+function _module_main_url($mode)
{
return extra_url();
}
-function _module_main_forum_view_url()
-{
- return extra_url();
-}
-
-function _module_main_topic_view_url()
-{
- return extra_url();
-}
-
-function _module_main_post_details_url()
-{
- return extra_url();
-}
-
-function _module_logs_forum_logs_url()
-{
- return extra_url();
-}
-
-function _module_logs_topic_logs_url()
+function _module_logs_url($mode)
{
return extra_url();
}
diff --git a/phpBB/styles/subSilver/template/ucp_header.html b/phpBB/styles/subSilver/template/ucp_header.html
index cfe5f2a470..6ff1b3206f 100644
--- a/phpBB/styles/subSilver/template/ucp_header.html
+++ b/phpBB/styles/subSilver/template/ucp_header.html
@@ -112,7 +112,8 @@
<div style="padding: 2px;"></div>
<!-- ENDIF -->
-<table class="tablebg" width="100%" cellspacing="1">
+<!-- IF S_ZEBRA_ENABLED -->
+ <table class="tablebg" width="100%" cellspacing="1">
<tr>
<th>{L_FRIENDS}</th>
</tr>
@@ -150,7 +151,8 @@
</td>
</tr>
-</table>
+ </table>
+<!-- ENDIF -->
</td>
<td><img src="images/spacer.gif" width="4" alt="" /></td>
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 70b6447324..d9dfc9d1ba 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -249,4 +249,15 @@ $template->set_filenames(array(
page_footer();
+
+/**
+* Function for assigning a template var if the zebra module got included
+*/
+function _module_zebra($mode, &$module_row)
+{
+ global $template;
+
+ $template->assign_var('S_ZEBRA_ENABLED', true);
+}
+
?> \ No newline at end of file