From 914a1d1d77ffcfb3591272f3122b1ed88517bc23 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 6 Nov 2010 12:38:21 +0000 Subject: [PATCH] Added todos to language/en/mods/info_acp_portal.php & language/en/mods/portal.php; Fixed how color palette gets displayed and also fixed the small button areas of the color palette; When adding a Module, the users now see the Module name rather than the file name; --- root/adm/style/portal/acp_portal_welcome.html | 14 ++++++++++---- root/includes/acp/acp_portal.php | 18 +++++++++++++++--- root/language/en/mods/info_acp_portal.php | 1 + root/language/en/mods/portal.php | 1 + 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/root/adm/style/portal/acp_portal_welcome.html b/root/adm/style/portal/acp_portal_welcome.html index e8a78f56..3b7ab6ec 100644 --- a/root/adm/style/portal/acp_portal_welcome.html +++ b/root/adm/style/portal/acp_portal_welcome.html @@ -40,7 +40,6 @@
{L_PORTAL_WELCOME}
-
diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index b499e3b4..8eeab170 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -424,19 +424,31 @@ class acp_portal $c_class = new $class(); if ($c_class->columns & column_string_const($add_module)) { - $fileinfo[] = substr($class, 7, -7); + if ($c_class->language) + { + $user->add_lang('mods/portal/' . $c_class->language); + } + $fileinfo[] = array( + 'module' => substr($class, 7, -7), + 'name' => $user->lang[$c_class->name], + ); } } } } closedir($dh); - sort($fileinfo); + // we sort the $fileinfo array by the name of the modules + foreach($fileinfo as $key => $cur_file) + { + $name_ary[$key] = $cur_file['name']; + } + array_multisort($name_ary, SORT_REGULAR, $fileinfo); $options = ''; foreach ($fileinfo as $module) { - $options .= ''; + $options .= ''; } $s_hidden_fields = build_hidden_fields(array( diff --git a/root/language/en/mods/info_acp_portal.php b/root/language/en/mods/info_acp_portal.php index c9e3760c..06bf47bd 100644 --- a/root/language/en/mods/info_acp_portal.php +++ b/root/language/en/mods/info_acp_portal.php @@ -35,6 +35,7 @@ if (empty($lang) || !is_array($lang)) // @todo: check for unneeded language variables // @todo: change language variables to English ones +// @todo: merge into mods/portal/ $lang = array_merge($lang, array( // Manage blocks diff --git a/root/language/en/mods/portal.php b/root/language/en/mods/portal.php index 6b04a2e3..60d34195 100644 --- a/root/language/en/mods/portal.php +++ b/root/language/en/mods/portal.php @@ -32,6 +32,7 @@ if (empty($lang) || !is_array($lang)) // You do not need this where single placeholders are used, e.g. 'Message %d' is fine // equally where a string contains only two placeholders which are used to wrap text // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine +// @todo: merge into mods/portal/ // Common $lang = array_merge($lang, array(