diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index da9374be..644a738c 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -52,7 +52,7 @@ class acp_portal $display_vars = array( 'title' => 'ACP_PORTAL_GENERAL_TITLE', 'vars' => array( - 'legend1' => 'ACP_PORTAL_GENERAL_INFO', + 'legend1' => 'ACP_PORTAL_CONFIG_INFO', 'board3_enable' => array('lang' => 'PORTAL_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'board3_left_column' => array('lang' => 'PORTAL_LEFT_COLUMN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'board3_right_column' => array('lang' => 'PORTAL_RIGHT_COLUMN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), @@ -404,14 +404,15 @@ class acp_portal $c_class = new $class(); if ($c_class->columns & column_string_const($add_module)) { - $fileinfo[] = substr($class, 7, -7); + $user->add_lang('mods/portal/' . $c_class->language); + $fileinfo[] = $user->lang[$c_class->name]; } } } } closedir($dh); - ksort($fileinfo); + sort($fileinfo); $options = ''; foreach ($fileinfo as $module) diff --git a/root/language/en/mods/info_acp_portal.php b/root/language/en/mods/info_acp_portal.php index e6526c5f..c9e3760c 100644 --- a/root/language/en/mods/info_acp_portal.php +++ b/root/language/en/mods/info_acp_portal.php @@ -46,6 +46,7 @@ $lang = array_merge($lang, array( // general 'ACP_PORTAL' => 'Portal', 'ACP_PORTAL_GENERAL_INFO' => 'Allgemeine Einstellungen', + 'ACP_PORTAL_CONFIG_INFO' => 'Allgemeine Einstellungen', 'ACP_PORTAL_GENERAL_TITLE' => 'Portal Administration', 'ACP_PORTAL_GENERAL_TITLE_EXP' => 'Thank you for choosing Board3 Portal! This is where you can manage your portal page. The options below let you customize the various general settings.', 'PORTAL_ENABLE' => 'Enable Portal', @@ -107,9 +108,8 @@ $lang = array_merge($lang, array( 'SELECT_LINK_ICON' => 'Select an icon…', - // paypal - 'PORTAL_PAY_ACC' => 'Paypal Account', - 'PORTAL_PAY_ACC_EXPLAIN' => 'Gib deine e-mail-Adresse an, die du bei Paypal benutzt, z.B. xxx@xxx.com', + // Logs + 'LOG_PORTAL_CONFIG' => 'Altered Portal settings
» %s', /** * A copy of Handyman` s MOD version check, to view it on the portal overview diff --git a/root/language/en/mods/portal/portal_announcements_module.php b/root/language/en/mods/portal/portal_announcements_module.php index 19f7be7a..dd5a16c9 100644 --- a/root/language/en/mods/portal/portal_announcements_module.php +++ b/root/language/en/mods/portal/portal_announcements_module.php @@ -50,27 +50,27 @@ $lang = array_merge($lang, array( // ACP 'ACP_PORTAL_ANNOUNCE_SETTINGS' => 'Global announcements settings', - 'ACP_PORTAL_ANNOUNCE_SETTINGS_EXPLAIN' => 'This is where you customize the global announcements block.', + 'ACP_PORTAL_ANNOUNCE_SETTINGS_EXP' => 'This is where you customize the global announcements block.', 'PORTAL_ANNOUNCEMENTS' => 'Display global announcements', - 'PORTAL_ANNOUNCEMENTS_EXPLAIN' => 'Display this block on the portal.', + 'PORTAL_ANNOUNCEMENTS_EXP' => 'Display this block on the portal.', 'PORTAL_ANNOUNCEMENTS_STYLE' => 'Compact global announcements block style', - 'PORTAL_ANNOUNCEMENTS_STYLE_EXPLAIN' => '"Yes" means use the compact style for for global announcements. "No" means use the large style (text view).', + 'PORTAL_ANNOUNCEMENTS_STYLE_EXP' => '"Yes" means use the compact style for for global announcements. "No" means use the large style (text view).', 'PORTAL_NUMBER_OF_ANNOUNCEMENTS' => 'Number of announcements on the portal', - 'PORTAL_NUMBER_OF_ANNOUNCEMENTS_EXPLAIN' => '0 means infinite', + 'PORTAL_NUMBER_OF_ANNOUNCEMENTS_EXP' => '0 means infinite', 'PORTAL_ANNOUNCEMENTS_DAY' => 'Number of days to display the announcement', - 'PORTAL_ANNOUNCEMENTS_DAY_EXPLAIN' => '0 means infinite', + 'PORTAL_ANNOUNCEMENTS_DAY_EXP' => '0 means infinite', 'PORTAL_ANNOUNCEMENTS_LENGTH' => 'Maximum size/length of global announcements', - 'PORTAL_ANNOUNCEMENTS_LENGTH_EXPLAIN' => '0 means infinite', + 'PORTAL_ANNOUNCEMENTS_LENGTH_EXP' => '0 means infinite', 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM' => 'Announcements forums', - 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM_EXPLAIN' => 'Forum(s) from which we retrieve the announcements. Leave this blank to retrieve announcements from all the forums. If "Exclude forums" is set to "Yes", select the forums you want to exclude.
If "Exclude forums" is set to "No" select the forums you want to see.
Select/Deselect multiple forums by holding CTRL and clicking.', + 'PORTAL_GLOBAL_ANNOUNCEMENTS_FORUM_EXP' => 'Forum(s) from which we retrieve the announcements. Leave this blank to retrieve announcements from all the forums. If "Exclude forums" is set to "Yes", select the forums you want to exclude.
If "Exclude forums" is set to "No" select the forums you want to see.
Select/Deselect multiple forums by holding CTRL and clicking.', 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE' => 'Exclude forums', - 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE_EXPLAIN'=> 'Select "Yes" if you want to exlude the selected forums from the announcements block, and "No" if you want to see only the selected forums in the announcements block.', + 'PORTAL_ANNOUNCEMENTS_FORUM_EXCLUDE_EXP'=> 'Select "Yes" if you want to exlude the selected forums from the announcements block, and "No" if you want to see only the selected forums in the announcements block.', 'PORTAL_ANNOUNCEMENTS_PERMISSIONS' => 'Enable/disable permissions', - 'PORTAL_ANNOUNCEMENTS_PERMISSIONS_EXPLAIN' => 'When displaying announcements, consider a user's forum-viewing permissions.', + 'PORTAL_ANNOUNCEMENTS_PERMISSIONS_EXP' => 'When displaying announcements, consider a user's forum-viewing permissions.', 'PORTAL_ANNOUNCEMENTS_ARCHIVE' => 'Enable the announcements archive system', - 'PORTAL_ANNOUNCEMENTS_ARCHIVE_EXPLAIN' => 'If enabled the announcements archive system / page numbers will be displayed.', + 'PORTAL_ANNOUNCEMENTS_ARCHIVE_EXP' => 'If enabled the announcements archive system / page numbers will be displayed.', 'PORTAL_SHOW_REPLIES_VIEWS' => 'Display the number of replies and views', - 'PORTAL_SHOW_REPLIES_VIEWS_EXPLAIN' => 'This setting pertains to the compact block.
When Yes, the number of replies and views are shown in 2 extra columns. When No, replies and views will be shown beside the forum name. Select No if you have problems with the display of the extra columns due to the extra width required.', + 'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'This setting pertains to the compact block.
When Yes, the number of replies and views are shown in 2 extra columns. When No, replies and views will be shown beside the forum name. Select No if you have problems with the display of the extra columns due to the extra width required.', )); ?> \ No newline at end of file diff --git a/root/language/en/mods/portal/portal_latest_members_module.php b/root/language/en/mods/portal/portal_latest_members_module.php new file mode 100644 index 00000000..66955287 --- /dev/null +++ b/root/language/en/mods/portal/portal_latest_members_module.php @@ -0,0 +1,43 @@ + 'Newest members', + + // ACP + 'ACP_PORTAL_MEMBERS_SETTINGS' => 'Newest members settings', + 'ACP_PORTAL_MEMBERS_SETTINGS_EXP' => 'This is where you customize the newest members block.', + 'PORTAL_MAX_LAST_MEMBER' => 'Maximum number of newest members shown', + 'PORTAL_MAX_LAST_MEMBER_EXP' => '0 means infinite', +)); + +?> \ No newline at end of file diff --git a/root/portal/modules/portal_latest_members.php b/root/portal/modules/portal_latest_members.php new file mode 100644 index 00000000..d4e66b71 --- /dev/null +++ b/root/portal/modules/portal_latest_members.php @@ -0,0 +1,105 @@ +lang}/mods/portal/" + */ + var $language = 'portal_latest_members_module'; + + function get_template_side($module_id) + { + global $config, $template, $db, $user; + + $sql = 'SELECT user_id, username, user_regdate, user_colour + FROM ' . USERS_TABLE . ' + WHERE user_type <> ' . USER_IGNORE . ' + AND user_inactive_time = 0 + ORDER BY user_regdate DESC'; + $result = $db->sql_query_limit($sql, $config['board3_max_last_member']); + + while(($row = $db->sql_fetchrow($result)) && ($row['username'])) + { + $template->assign_block_vars('latest_members', array( + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'JOINED' => $user->format_date($row['user_regdate'], $format = 'd M'), + )); + } + $db->sql_freeresult($result); + + return 'latest_members_side.html'; + } + + function get_template_acp($module_id) + { + return array( + 'title' => 'ACP_PORTAL_MEMBERS_SETTINGS', + 'vars' => array( + 'legend1' => 'ACP_PORTAL_MEMBERS_SETTINGS', + 'board3_max_last_member' => array('lang' => 'PORTAL_MAX_LAST_MEMBER' , 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), + ) + ); + } + + /** + * API functions + */ + function install($module_id) + { + set_config('board3_max_last_member', 8); + return true; + } + + function uninstall($module_id) + { + global $db; + + $del_config = array( + 'board3_max_last_member', + ); + $sql = 'DELETE FROM ' . CONFIG_TABLE . ' + WHERE ' . $db->sql_in_set('config_name', $del_config); + return $db->sql_query($sql); + } +} + +?> \ No newline at end of file diff --git a/root/styles/prosilver/template/portal/modules/latest_members_side.html b/root/styles/prosilver/template/portal/modules/latest_members_side.html new file mode 100644 index 00000000..ff2bb118 --- /dev/null +++ b/root/styles/prosilver/template/portal/modules/latest_members_side.html @@ -0,0 +1,9 @@ + +{$LR_BLOCK_H_L} {L_LATEST_MEMBERS}{$LR_BLOCK_H_R} + {L_USERNAME} + {L_JOINED}
+ + {latest_members.USERNAME_FULL} + {latest_members.JOINED}
+ +{$LR_BLOCK_F_L}{$LR_BLOCK_F_R} \ No newline at end of file diff --git a/root/styles/prosilver/theme/images/portal/portal_members.png b/root/styles/prosilver/theme/images/portal/portal_members.png new file mode 100644 index 00000000..8e649a80 Binary files /dev/null and b/root/styles/prosilver/theme/images/portal/portal_members.png differ