diff --git a/languages/de/mods/lang_portal_acp.php b/languages/de/mods/lang_portal_acp.php index 19a44dca..af483512 100644 --- a/languages/de/mods/lang_portal_acp.php +++ b/languages/de/mods/lang_portal_acp.php @@ -70,6 +70,8 @@ $lang = array_merge($lang, array( 'PORTAL_MAIN_MENU_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.', 'PORTAL_USER_MENU' => 'Benutzermenü / Login Box', 'PORTAL_USER_MENU_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.', + 'PORTAL_FORUM_INDEX' => 'Foren Index (Foren Liste)', + 'PORTAL_FORUM_INDEX_EXPLAIN' => 'Diesen Block auf dem Portal anzeigen.', // random member 'PORTAL_RANDOM_MEMBER' => 'Zufälliges Profil', diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index 4e25df62..05838dbf 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -53,6 +53,7 @@ class acp_portal 'portal_birthdays' => array('lang' => 'PORTAL_BIRTHDAYS' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true), 'portal_birthdays_ahead' => array('lang' => 'PORTAL_BIRTHDAYS_AHEAD' , 'validate' => 'int' , 'type' => 'text:3:3' , 'explain' => true), 'portal_random_member' => array('lang' => 'PORTAL_RANDOM_MEMBER' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true), + 'portal_forum_index' => array('lang' => 'PORTAL_FORUM_INDEX' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true), 'portal_whois_online' => array('lang' => 'PORTAL_WHOIS_ONLINE' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true), 'portal_change_style' => array('lang' => 'PORTAL_CHANGE_STYLE' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true), 'portal_main_menu' => array('lang' => 'PORTAL_MAIN_MENU' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true), diff --git a/root/install_portal/schemas/_schema_data.sql b/root/install_portal/schemas/_schema_data.sql index b3adbf74..91409dff 100644 --- a/root/install_portal/schemas/_schema_data.sql +++ b/root/install_portal/schemas/_schema_data.sql @@ -80,6 +80,7 @@ INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_cust INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_bbcode', '0'); INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center_headline', 'Headline center box'); INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_headline', 'Headline small box'); +INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_forum_index', '0'); # POSTGRES COMMIT # diff --git a/root/install_portal/schemas/update_schema.php b/root/install_portal/schemas/update_schema.php index 8833b832..8b9ce474 100644 --- a/root/install_portal/schemas/update_schema.php +++ b/root/install_portal/schemas/update_schema.php @@ -22,6 +22,7 @@ $sql_update['0.2.3'] = array( "INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_bbcode', '0')", "INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_center_headline', 'Headline center box')", "INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_custom_small_headline', 'Headline small box')", + "INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('portal_forum_index', '0')", ); ?> \ No newline at end of file diff --git a/root/language/en/mods/lang_portal_acp.php b/root/language/en/mods/lang_portal_acp.php index 1f5514ab..9e972e07 100644 --- a/root/language/en/mods/lang_portal_acp.php +++ b/root/language/en/mods/lang_portal_acp.php @@ -75,6 +75,8 @@ $lang = array_merge($lang, array( 'PORTAL_MAIN_MENU_EXPLAIN' => 'Display this block on portal.', 'PORTAL_USER_MENU' => 'User menu / Login box', 'PORTAL_USER_MENU_EXPLAIN' => 'Display this block on portal.', + 'PORTAL_FORUM_INDEX' => 'Forum Index (Forum list)', + 'PORTAL_FORUM_INDEX_EXPLAIN' => 'Display this block on portal.', // random member 'PORTAL_RANDOM_MEMBER' => 'Random member block', diff --git a/root/portal.php b/root/portal.php index a6c333a2..4e7aa40c 100644 --- a/root/portal.php +++ b/root/portal.php @@ -58,6 +58,23 @@ if ( is_dir( $phpbb_root_path . 'install_portal/' ) === TRUE ) if ( $load_center === TRUE ) { + + if ($portal_config['portal_forum_index']) + { + display_forums(''); + + $template->assign_vars(array( + 'FORUM_IMG' => $user->img('forum_read', 'NO_NEW_POSTS'), + 'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'), + 'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'), + 'FORUM_NEW_LOCKED_IMG' => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'), + 'S_DISPLAY_PORTAL_FORUM_INDEX' => true, + + 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums') : '', + '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) : '') + ); + } + if ($portal_config['portal_recent']) { include($phpbb_root_path . 'portal/block/recent.'.$phpEx); diff --git a/root/styles/prosilver/template/portal/portal_body.html b/root/styles/prosilver/template/portal/portal_body.html index 3ac9f89b..03cbdee4 100644 --- a/root/styles/prosilver/template/portal/portal_body.html +++ b/root/styles/prosilver/template/portal/portal_body.html @@ -102,8 +102,22 @@ + + + + + - + +
+ + + diff --git a/templates/subsilver2/template/portal/portal_body.html b/templates/subsilver2/template/portal/portal_body.html index 4ddde988..f44cfe15 100644 --- a/templates/subsilver2/template/portal/portal_body.html +++ b/templates/subsilver2/template/portal/portal_body.html @@ -136,7 +136,25 @@ small, .small { - + + +
+ + + + + + + + + + + +
{FORUM_NEW_IMG}{L_NEW_POSTS}  {FORUM_IMG}{L_NO_NEW_POSTS}  {FORUM_LOCKED_IMG}{L_FORUM_LOCKED}
+
+ + +