diff --git a/root/language/de/mods/portal/portal_announcements_module.php b/root/language/de/mods/portal/portal_announcements_module.php
index b66d2735..84198bb6 100644
--- a/root/language/de/mods/portal/portal_announcements_module.php
+++ b/root/language/de/mods/portal/portal_announcements_module.php
@@ -45,7 +45,7 @@ $lang = array_merge($lang, array(
'JUMP_NEWEST' => 'Zum letzten Beitrag springen',
'JUMP_FIRST' => 'Zum ersten Beitrag springen',
'JUMP_TO_POST' => 'Rufe den Beitrag auf',
- 'BACK' => 'Zurück',
+ 'BACK' => 'Zurück',
));
?>
\ No newline at end of file
diff --git a/root/language/de/mods/portal/portal_leaders_module.php b/root/language/de/mods/portal/portal_leaders_module.php
new file mode 100644
index 00000000..fa066f8a
--- /dev/null
+++ b/root/language/de/mods/portal/portal_leaders_module.php
@@ -0,0 +1,39 @@
+ 'Keine Administratoren',
+ 'NO_MODERATORS_P' => 'Keine Moderatoren',
+ 'NO_GROUPS_P' => 'Keine Gruppen',
+));
+
+?>
\ No newline at end of file
diff --git a/root/language/de/mods/portal/portal_user_menu_module.php b/root/language/de/mods/portal/portal_user_menu_module.php
new file mode 100644
index 00000000..f2a3e7f2
--- /dev/null
+++ b/root/language/de/mods/portal/portal_user_menu_module.php
@@ -0,0 +1,41 @@
+ 'Benutzer-Menü',
+ 'UM_LOG_ME_IN' => 'Mich bei jedem Besuch automatisch anmelden',
+ 'UM_HIDE_ME' => 'Meinen Online-Status während dieser Sitzung verbergen',
+ 'UM_MAIN_SUBSCRIBED' => 'Benachrichtigungen verwalten',
+ 'UM_BOOKMARKS' => 'Lesezeichen verwalten',
+));
+
+?>
\ No newline at end of file
diff --git a/root/language/en/mods/portal/portal_leaders_module.php b/root/language/en/mods/portal/portal_leaders_module.php
new file mode 100644
index 00000000..20ad67ca
--- /dev/null
+++ b/root/language/en/mods/portal/portal_leaders_module.php
@@ -0,0 +1,39 @@
+ 'No Administrators',
+ 'NO_MODERATORS_P' => 'No Moderators',
+ 'NO_GROUPS_P' => 'No Groups',
+));
+
+?>
\ No newline at end of file
diff --git a/root/language/en/mods/portal/portal_user_menu_module.php b/root/language/en/mods/portal/portal_user_menu_module.php
new file mode 100644
index 00000000..394b4486
--- /dev/null
+++ b/root/language/en/mods/portal/portal_user_menu_module.php
@@ -0,0 +1,41 @@
+ 'User menu',
+ 'UM_LOG_ME_IN' => 'Remember me',
+ 'UM_HIDE_ME' => 'Hide me',
+ 'UM_MAIN_SUBSCRIBED'=> 'Subscribed',
+ 'UM_BOOKMARKS' => 'Bookmarks',
+));
+
+?>
\ No newline at end of file
diff --git a/root/portal/modules/portal_leaders.php b/root/portal/modules/portal_leaders.php
new file mode 100644
index 00000000..d51afa29
--- /dev/null
+++ b/root/portal/modules/portal_leaders.php
@@ -0,0 +1,218 @@
+lang}/mods/portal/"
+ */
+ var $language = 'portal_leaders_module';
+
+ function get_template_center($module_id)
+ {
+ global $config, $template;
+
+ $template->assign_vars(array(
+ 'EXAMPLE' => $config['portal_configname'],
+ ));
+
+ return 'modulename_center.html';
+ }
+
+ function get_template_side($module_id)
+ {
+ global $config, $template, $user, $auth, $db;
+
+ // Display a listing of board admins, moderators
+ $user->add_lang('groups');
+
+ $user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
+
+ $admin_id_ary = $mod_id_ary = $forum_id_ary = array();
+ foreach ($user_ary as $forum_id => $forum_ary)
+ {
+ foreach ($forum_ary as $auth_option => $id_ary)
+ {
+ if (!$forum_id && $auth_option == 'a_')
+ {
+ $admin_id_ary = array_merge($admin_id_ary, $id_ary);
+ continue;
+ }
+ else
+ {
+ $mod_id_ary = array_merge($mod_id_ary, $id_ary);
+ }
+
+ if ($forum_id)
+ {
+ foreach ($id_ary as $id)
+ {
+ $forum_id_ary[$id][] = $forum_id;
+ }
+ }
+ }
+ }
+
+ $admin_id_ary = array_unique($admin_id_ary);
+ $mod_id_ary = array_unique($mod_id_ary);
+
+ // Admin group id...
+ $sql = 'SELECT group_id
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'ADMINISTRATORS'";
+ $result = $db->sql_query($sql);
+ $admin_group_id = (int) $db->sql_fetchfield('group_id');
+ $db->sql_freeresult($result);
+
+ $sql = 'SELECT forum_id, forum_name
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_type = ' . FORUM_POST;
+ $result = $db->sql_query($sql);
+
+ $forums = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forums[$row['forum_id']] = $row['forum_name'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = $db->sql_build_query('SELECT', array(
+ 'SELECT' => 'u.user_id, u.group_id as default_group, u.username, u.user_colour, u.user_allow_pm, g.group_id, g.group_name, g.group_colour, g.group_type, ug.user_id as ug_user_id',
+ 'FROM' => array(
+ USERS_TABLE => 'u',
+ GROUPS_TABLE => 'g'
+ ),
+ 'LEFT_JOIN' => array(
+ array(
+ 'FROM' => array(USER_GROUP_TABLE => 'ug'),
+ 'ON' => 'ug.group_id = g.group_id AND ug.user_pending = 0 AND ug.user_id = ' . $user->data['user_id']
+ )),
+ 'WHERE' => $db->sql_in_set('u.user_id', array_unique(array_merge($admin_id_ary, $mod_id_ary))) . '
+ AND u.group_id = g.group_id',
+ 'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC'
+ ));
+
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $which_row = (in_array($row['user_id'], $admin_id_ary)) ? 'admin' : 'mod';
+
+ // We sort out admins not having the admin group as default
+ // The drawback is that only those admins are displayed which are within
+ // the special group 'Administrators' and also having it assigned as their default group.
+ // - might change
+ if ($which_row == 'admin' && $row['default_group'] != $admin_group_id)
+ {
+ // Remove from admin_id_ary, because the user may be a mod instead
+ unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]);
+
+ if (!in_array($row['user_id'], $mod_id_ary))
+ {
+ continue;
+ }
+ else
+ {
+ $which_row = 'mod';
+ }
+ }
+
+ if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
+ {
+ $group_name = $user->lang['GROUP_UNDISCLOSED'];
+ $u_group = '';
+ }
+ else
+ {
+ $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
+ $u_group = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']);
+ }
+
+ $template->assign_block_vars($which_row, array(
+ 'USER_ID' => $row['user_id'],
+ 'GROUP_NAME' => $group_name,
+ 'GROUP_COLOR' => $row['group_colour'],
+
+ 'U_GROUP' => $u_group,
+
+ 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
+ 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
+ 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']),
+ ));
+ }
+ $db->sql_freeresult($result);
+
+ return 'leaders_side.html';
+ }
+
+ function get_template_acp($module_id)
+ {
+ return array(
+ 'title' => 'ACP_CONFIG_MODULENAME',
+ 'vars' => array(
+ /*'legend1' => 'ACP_MODULENAME_CONFIGLEGEND',
+ 'portal_configname' => array('lang' => 'MODULENAME_CONFIGNAME', 'validate' => 'string', 'type' => 'text:10:200', 'explain' => false),
+ 'portal_configname2' => array('lang' => 'MODULENAME_CONFIGNAME2', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),*/
+ ),
+ );
+ }
+
+ /**
+ * API functions
+ */
+ function install($module_id)
+ {
+ // nothing
+ return true;
+ }
+
+ function uninstall($module_id)
+ {
+ global $db;
+
+ // nothing
+
+ return $db->sql_query($sql);
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/root/portal/modules/portal_user_menu.php b/root/portal/modules/portal_user_menu.php
new file mode 100644
index 00000000..cbd1d5c1
--- /dev/null
+++ b/root/portal/modules/portal_user_menu.php
@@ -0,0 +1,177 @@
+lang}/mods/portal/"
+ */
+ var $language = 'portal_user_menu_module';
+
+ function get_template_center($module_id)
+ {
+ global $config, $template;
+
+ $template->assign_vars(array(
+ 'EXAMPLE' => $config['portal_configname'],
+ ));
+
+ return 'modulename_center.html';
+ }
+
+ function get_template_side($module_id)
+ {
+ global $config, $template;
+
+ //
+ // + new posts since last visit & you post number
+ //
+ if ($user->data['is_registered'])
+ {
+ $ex_fid_ary = array_unique(array_merge(array_keys($auth->acl_getf('!f_read', true)), array_keys($auth->acl_getf('!f_search', true))));
+
+ if ($auth->acl_get('m_approve'))
+ {
+ $m_approve_fid_ary = array(-1);
+ $m_approve_fid_sql = '';
+ }
+ else if ($auth->acl_getf_global('m_approve'))
+ {
+ $m_approve_fid_ary = array_diff(array_keys($auth->acl_getf('!m_approve', true)), $ex_fid_ary);
+ $m_approve_fid_sql = ' AND (p.post_approved = 1' . ((sizeof($m_approve_fid_ary)) ? ' OR ' . $db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) : '') . ')';
+ }
+ else
+ {
+ $m_approve_fid_ary = array();
+ $m_approve_fid_sql = ' AND p.post_approved = 1';
+ }
+
+ $sql = 'SELECT COUNT(distinct t.topic_id) as total
+ FROM ' . TOPICS_TABLE . ' t
+ WHERE t.topic_last_post_time > ' . $user->data['user_lastvisit'] . '
+ AND t.topic_moved_id = 0
+ ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
+ $result = $db->sql_query($sql);
+ $new_posts_count = (int) $db->sql_fetchfield('total');
+ $db->sql_freeresult($result);
+
+ // unread posts
+ $sql_where = 'AND t.topic_moved_id = 0
+ ' . str_replace(array('p.', 'post_'), array('t.', 'topic_'), $m_approve_fid_sql) . '
+ ' . ((sizeof($ex_fid_ary)) ? 'AND ' . $db->sql_in_set('t.forum_id', $ex_fid_ary, true) : '');
+ $unread_list = array();
+ $unread_list = get_unread_topics($user->data['user_id'], $sql_where, 'ORDER BY t.topic_id DESC');
+ $unread_posts_count = sizeof($unread_list);
+ }
+ //
+ // - new posts since last visit & you post number
+ //
+
+
+ // Get user avatar and rank
+ $user_id = $user->data['user_id'];
+ $username = $user->data['username'];
+ $colour = $user->data['user_colour'];
+ $avatar_img = get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']);
+ $rank_title = $rank_img = '';
+ get_user_rank($user->data['user_rank'], $user->data['user_posts'], $rank_title, $rank_img, $rank_img_src);
+
+
+ // Assign specific vars
+ $template->assign_vars(array(
+ 'L_NEW_POSTS' => $user->lang['SEARCH_NEW'] . ' (' . $new_posts_count . ')',
+ 'L_SELF_POSTS' => $user->lang['SEARCH_SELF'] . ' (' . $user->data['user_posts'] . ')',
+ 'L_UNREAD_POSTS'=> $user->lang['SEARCH_UNREAD'] . ' (' . $unread_posts_count . ')',
+
+ 'B3P_AVATAR_IMG' => $avatar_img,
+ 'B3P_RANK_TITLE' => $rank_title,
+ 'B3P_RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
+
+ 'USERNAME_FULL' => get_username_string('full', $user_id, $username, $colour),
+ 'B3P_USERNAME' => get_username_string('username', $user_id, $username, $colour),
+ 'B3P_USER_COLOR' => get_username_string('colour', $user_id, $username, $colour),
+ 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $colour),
+
+ 'U_NEW_POSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=newposts'),
+ 'U_SELF_POSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch'),
+ 'U_UNREAD_POSTS' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unreadposts'),
+ 'U_UM_BOOKMARKS' => ($config['allow_bookmarks']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=bookmarks') : '',
+ 'U_UM_MAIN_SUBSCRIBED' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=main&mode=subscribed'),
+ 'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '',
+ ));
+
+ return 'user_menu_side.html';
+ }
+
+ function get_template_acp($module_id)
+ {
+ return array(
+ 'title' => 'ACP_CONFIG_MODULENAME',
+ 'vars' => array(
+ /*'legend1' => 'ACP_MODULENAME_CONFIGLEGEND',
+ 'portal_configname' => array('lang' => 'MODULENAME_CONFIGNAME', 'validate' => 'string', 'type' => 'text:10:200', 'explain' => false),
+ 'portal_configname2' => array('lang' => 'MODULENAME_CONFIGNAME2', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),*/
+ ),
+ );
+ }
+
+ /**
+ * API functions
+ */
+ function install($module_id)
+ {
+ // nothing
+ return true;
+ }
+
+ function uninstall($module_id)
+ {
+ global $db;
+
+ // nothing
+
+ return $db->sql_query($sql);
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/root/styles/prosilver/template/portal/block/birthday.html b/root/styles/prosilver/template/portal/block/birthday.html
deleted file mode 100644
index 74770e21..00000000
--- a/root/styles/prosilver/template/portal/block/birthday.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- {L_CONGRATULATIONS}:
{BIRTHDAY_LIST}
-
- {L_NO_BIRTHDAYS}
-
-

| {U_PREV_MONTH} | -{L_MINI_CAL_MONTH} | -{U_NEXT_MONTH} | -|||||
| {L_MINI_CAL_SUN} | - -{L_MINI_CAL_MON} | -{L_MINI_CAL_TUE} | -{L_MINI_CAL_WED} | -{L_MINI_CAL_THU} | -{L_MINI_CAL_FRI} | -{L_MINI_CAL_SAT} | - -{L_MINI_CAL_SUN} | - -
| {mini_cal_row.mini_cal_days.MINI_CAL_DAY} | - -|||||||