diff --git a/install.xml b/install.xml index 77f45000..ce93b817 100644 --- a/install.xml +++ b/install.xml @@ -553,19 +553,11 @@ define('PORTAL_LINKS_TABLE', $table_prefix . 'portal_links');]]> - add_lang(array('mods/lang_portal', 'mods/additional_blocks')); - if (!function_exists('obtain_portal_config')) - { - include($phpbb_root_path . 'portal/includes/functions.' . $phpEx); - } - if(sql_table_exists(PORTAL_CONFIG_TABLE) == true) - { - $portal_config = obtain_portal_config(); - }]]> + add_lang('mods/portal');]]> append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),]]> - (isset($portal_config['portal_enable']) && $portal_config['portal_enable'] == true) ? append_sid("{$phpbb_root_path}portal.$phpEx") : '',]]> + (isset($config['board3_enable']) && $config['board3_enable'] == true) ? append_sid("{$phpbb_root_path}portal.$phpEx") : '',]]> diff --git a/root/adm/mods/board3_portal_check_version.php b/root/adm/mods/board3_portal_check_version.php index a1b4f39d..e11f6f60 100644 --- a/root/adm/mods/board3_portal_check_version.php +++ b/root/adm/mods/board3_portal_check_version.php @@ -21,18 +21,13 @@ class board3_portal_check_version { function version() { - global $portal_config, $phpbb_root_path, $phpEx; - if (!function_exists('obtain_portal_config')) - { - include($phpbb_root_path . 'portal/includes/functions.' . $phpEx); - } - $portal_config = obtain_portal_config(); + global $config, $phpbb_root_path, $phpEx; return array( 'author' => 'Saint_hh', 'title' => 'Board3 Portal', - 'tag' => 'board3_portal_v2', - 'version' => $portal_config['portal_version'], + 'tag' => 'board3_portal_v2_dev', + 'version' => $config['board3_portal_version'], 'file' => array('board3.de', 'updatecheck', 'board3_portal.xml'), ); } diff --git a/root/adm/style/acp_portal_config.html b/root/adm/style/acp_portal_config.html index 52f4a8b0..48cd15a0 100644 --- a/root/adm/style/acp_portal_config.html +++ b/root/adm/style/acp_portal_config.html @@ -43,11 +43,11 @@
{L_MODULE_OPTIONS}
-
+

{L_MODULE_NAME_EXP}
-
+

{L_MODULE_IMAGE_EXP}
{L_MODULE_IMAGE}
diff --git a/root/adm/style/acp_portal_modules.html b/root/adm/style/acp_portal_modules.html index 977d85a9..4c347c8f 100644 --- a/root/adm/style/acp_portal_modules.html +++ b/root/adm/style/acp_portal_modules.html @@ -4,13 +4,13 @@

{L_ACP_PORTAL_MODULES}

-

{L_ACP_PORTAL_MODULES_EXPLAIN}

+

{L_ACP_PORTAL_MODULES_EXP}

{L_GENERAL_OPTIONS}
-

{L_CHOOSE_MODULE_EXPLAIN}
+

{L_CHOOSE_MODULE_EXP}
@@ -25,7 +25,7 @@

{L_ACP_PORTAL_MODULES}

-

{L_ACP_PORTAL_MODULES_EXPLAIN}

+

{L_ACP_PORTAL_MODULES_EXP}

diff --git a/root/includes/acp/acp_portal.php b/root/includes/acp/acp_portal.php index c7735176..000dd3f1 100644 --- a/root/includes/acp/acp_portal.php +++ b/root/includes/acp/acp_portal.php @@ -28,18 +28,11 @@ class acp_portal { include($phpbb_root_path . $portal_root_path . 'includes/functions_modules.' . $phpEx); } - /* - if (!function_exists('obtain_portal_config')) - { - include($phpbb_root_path . $portal_root_path . 'includes/functions.' . $phpEx); - } - $portal_config = obtain_portal_config(); - + if (!function_exists('mod_version_check')) { include($phpbb_root_path . $portal_root_path . 'includes/functions_version_check.' . $phpEx); } - mod_version_check();*/ $user->add_lang('mods/portal'); $submit = (isset($_POST['submit'])) ? true : false; @@ -60,15 +53,15 @@ class acp_portal 'title' => 'ACP_PORTAL_GENERAL_TITLE', 'vars' => array( 'legend1' => 'ACP_PORTAL_GENERAL_INFO', - 'portal_enable' => array('lang' => 'PORTAL_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'portal_left_column' => array('lang' => 'PORTAL_LEFT_COLUMN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'portal_right_column' => array('lang' => 'PORTAL_RIGHT_COLUMN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'portal_version_check' => array('lang' => 'PORTAL_VERSION_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'portal_forum_index' => array('lang' => 'PORTAL_FORUM_INDEX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + '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), + 'board3_version_check' => array('lang' => 'PORTAL_VERSION_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), + 'board3_forum_index' => array('lang' => 'PORTAL_FORUM_INDEX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'legend2' => 'ACP_PORTAL_COLUMN_WIDTH_SETTINGS', - 'portal_left_column_width' => array('lang' => 'PORTAL_LEFT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), - 'portal_right_column_width' => array('lang' => 'PORTAL_RIGHT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), + 'board3_left_column_width' => array('lang' => 'PORTAL_LEFT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), + 'board3_right_column_width' => array('lang' => 'PORTAL_RIGHT_COLUMN_WIDTH', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true), ) ); @@ -109,6 +102,11 @@ class acp_portal $template->assign_var('SHOW_MODULE_OPTIONS', true); } } + else + { + // only show the mod version check if we are on the General Settings page + mod_version_check(); + } $this->new_config = $config; $cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config; @@ -165,7 +163,7 @@ class acp_portal $template->assign_vars(array( 'L_TITLE' => $user->lang[$display_vars['title']], - 'L_TITLE_EXPLAIN' => (isset($user->lang[$display_vars['title'] . '_EXPLAIN'])) ? $user->lang[$display_vars['title'] . '_EXPLAIN'] : '', + 'L_TITLE_EXPLAIN' => (isset($user->lang[$display_vars['title'] . '_EXP'])) ? $user->lang[$display_vars['title'] . '_EXP'] : '', 'S_ERROR' => (sizeof($error)) ? true : false, 'ERROR_MSG' => implode('
', $error), @@ -309,7 +307,7 @@ class acp_portal AND module_order > ' . $module_data['module_order']; $db->sql_query($sql); - trigger_error('SUCCESS'); + trigger_error($user->lang['SUCCESS_DELETE'] . adm_back_link($this->u_action)); } } @@ -356,7 +354,7 @@ class acp_portal $c_class->install($db->sql_nextid()); - trigger_error('SUCCESS'); + trigger_error($user->lang['SUCCESS_ADD'] . adm_back_link($this->u_action)); } $template->assign_var('S_EDIT', true); diff --git a/root/install/index.php b/root/install/index.php new file mode 100644 index 00000000..244e5aed --- /dev/null +++ b/root/install/index.php @@ -0,0 +1,117 @@ +phpBB.com/mods/umil', E_USER_ERROR); +} + +// The name of the mod to be displayed during installation. +$mod_name = 'Board3 Portal'; + +global $user; + +/* +* The name of the config variable which will hold the currently installed version +* UMIL will handle checking, setting, and updating the version itself. +*/ +$version_config_name = 'board3_portal_version'; + + +// The language file which will be included when installing +$language_file = 'mods/info_acp_portal'; + + +/* +* Optionally we may specify our own logo image to show in the upper corner instead of the default logo. +* $phpbb_root_path will get prepended to the path specified +* Image height should be 50px to prevent cut-off or stretching. +*/ +//$logo_img = 'styles/prosilver/imageset/site_logo.gif'; + +/* +* The array of versions and actions within each. +* You do not need to order it a specific way (it will be sorted automatically), however, you must enter every version, even if no actions are done for it. +* +* You must use correct version numbering. Unless you know exactly what you can use, only use X.X.X (replacing X with an integer). +* The version numbering must otherwise be compatible with the version_compare function - http://php.net/manual/en/function.version-compare.php +*/ +$versions = array( + '2.0.0-dev1' => array( + + 'permission_add' => array( + array('a_portal'), + ), + + 'permission_set' => array( + array('ADMINISTRATORS', 'a_portal', 'group'), + ), + + 'table_add' => array( + array(phpbb_portal_modules, array( + 'COLUMNS' => array( + 'module_id' => array('UINT:3', NULL, 'auto_increment'), + 'module_classname' => array('VCHAR:64', ''), + 'module_column' => array('TINT:3', 0), + 'module_order' => array('TINT:3', 0), + 'module_name' => array('VCHAR', ''), + 'module_image_src' => array('VCHAR', ''), + 'module_group_ids' => array('VCHAR', ''), + ), + + 'PRIMARY_KEY' => 'module_id', + )), + + ), + + 'config_add' => array( + array('board3_enable', '1', 0), + array('board3_left_column', '1', 0), + array('board3_right_column', '1', 0), + array('board3_version_check', '1', 0), + array('board3_forum_index', '1', 0), + array('board3_left_column_width', '180', 0), + array('board3_right_column_width', '180', 0), + ), + + 'module_add' => array( + array('acp', 'ACP_CAT_DOT_MODS', 'ACP_PORTAL'), + + array('acp', 'ACP_PORTAL', array( + 'module_basename' => 'portal', + 'module_langname' => 'ACP_PORTAL_MODULES', + 'module_mode' => 'modules', + 'module_auth' => 'acl_a_portal', + ), + ), + + array('acp', 'ACP_PORTAL', array( + + 'module_basename' => 'portal', + 'module_langname' => 'ACP_PORTAL_GENERAL_INFO', + 'module_mode' => 'config', + 'module_auth' => 'acl_a_portal', + ), + ), + ), + + ), +); + +// Include the UMIL Auto file, it handles the rest +include($phpbb_root_path . 'umil/umil_auto.' . $phpEx); \ No newline at end of file diff --git a/root/install/umil.php b/root/install/umil.php deleted file mode 100644 index c5923430..00000000 --- a/root/install/umil.php +++ /dev/null @@ -1,66 +0,0 @@ -session_begin(); -$auth->acl($user->data); -$user->setup(); - -if (!file_exists($phpbb_root_path . 'umil/umil_auto.' . $phpEx)) -{ - trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: phpBB.com/mods/umil', E_USER_ERROR); -} - -$mod_name = 'PORTAL_MOD'; - -$version_config_name = 'portal_board3_version'; -$language_file = 'mods/info_acp_portal'; - -$versions = array( - // Version 1.1.0 => 1.2.x-dev - '1.1.1' => array( - 'permission_add' => array( - array('a_portal'), - ), - ), - '1.1.4' => array( - 'table_add' => array( - array(PORTAL_MODULES_TABLE, array( - 'COLUMNS' => array( - 'module_id' => array('UINT', NULL, 'auto_increment'), - 'module_classname' => array('VCHAR:64', ''), - 'module_column' => array('TINT:3', 0), - 'module_order' => array('TINT:3', 0), - 'module_name' => array('VCHAR', ''), - 'module_image_src' => array('VCHAR', ''), - 'module_group_ids' => array('VCHAR', ''), - ), - 'PRIMARY_KEY' => 'module_id', - )), - ), - 'config_add' => array(array( - array('board3_enable', true), - //array('test_mod_bool', true), - //array('test_mod_bool', true), - )), - ), -); - -// Include the UMIL Auto file and everything else will be handled automatically. -include($phpbb_root_path . 'umil/umil_auto.' . $phpEx); -?> \ No newline at end of file diff --git a/root/language/en/mods/info_acp_portal.php b/root/language/en/mods/info_acp_portal.php index 0d419f91..3790764a 100644 --- a/root/language/en/mods/info_acp_portal.php +++ b/root/language/en/mods/info_acp_portal.php @@ -47,7 +47,7 @@ $lang = array_merge($lang, array( 'ACP_PORTAL' => 'Portal', 'ACP_PORTAL_GENERAL_INFO' => 'Allgemeine Einstellungen', 'ACP_PORTAL_GENERAL_TITLE' => 'Portal Administration', - 'ACP_PORTAL_GENERAL_TITLE_EXPLAIN' => 'Hier kannst du allgemeine Einstellungen vornehmen.', + '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.', 'BLOCK_ADDED' => 'The block was successfully added.', 'BLOCK_FILENAME' => 'Block template file', @@ -86,7 +86,7 @@ $lang = array_merge($lang, array( // Portal Modules 'ACP_PORTAL_MODULES' => 'Portal Modules', - 'ACP_PORTAL_MODULES_EXPLAIN' => 'You can manage your portal modules here', + 'ACP_PORTAL_MODULES_EXP' => 'You can manage your portal modules here', 'MODULE_POS_TOP' => 'Top', 'MODULE_POS_LEFT' => 'Left column', @@ -95,8 +95,15 @@ $lang = array_merge($lang, array( 'MODULE_POS_BOTTOM' => 'Bottom', 'ADD_MODULE' => 'Add module', 'CHOOSE_MODULE' => 'Choose module', - 'CHOOSE_MODULE_EXPLAIN' => 'Choose a module from the drop-down list', - 'SUCCESS' => 'The module was added successfully', + 'CHOOSE_MODULE_EXP' => 'Choose a module from the drop-down list', + 'SUCCESS_ADD' => 'The module was added successfully.', + 'SUCCESS_DELETE' => 'The module was removed successfully.', + + 'MODULE_OPTIONS' => 'Module options', + 'MODULE_NAME' => 'Module name', + 'MODULE_NAME_EXP' => 'Enter the name of the Module that should be displayed in the Module configuration.', + 'MODULE_IMAGE' => 'Module image', + 'MODULE_IMAGE_EXP' => 'Enter the filename of the module image. Images need to be in styles/*yourstyle*/theme/images/portal/', // Manage links 'ACP_EXPRESS_LINKS_EXPLAIN' => 'Using this form you can add, edit, view and delete navigation links on the index page. You can also create special navigation links as categories which aren’t clickable links.', @@ -123,51 +130,10 @@ $lang = array_merge($lang, array( // 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', -)); - -// BLOCK TITLES -// Set additional block titles here... -// @todo: I think we need to remove this as it has become obsolete -// Example: -// 'BLOCK_TOP_POSTERS' => 'Top posters', /* Main block title */ -// 'BLOCK_TOP_POSTERS_SUB' => 'Posted', /* Legend, block sub-title */ -// -$lang = array_merge($lang, array( - 'BLOCK_BIRTHDAY' => 'Geburtstage', - 'BLOCK_EXPRESS_LINKS' => 'Navigation', - 'BLOCK_SEARCH' => 'Suche', - 'BLOCK_CLOCK' => 'Uhr', - 'BLOCK_USER_MENU' => 'Benutzer-Menü', - 'BLOCK_MAIN_MENU' => '', - 'BLOCK_CHANGE_STYLE' => 'Mein Board-Style', - 'BLOCK_ONLINE' => 'Wer ist Online?', - 'BLOCK_DONATION' => 'Paypal-Spenden', - 'BLOCK_LINKS' => 'Links', - 'BLOCK_LATEST_BOTS' => 'Bots', - 'BLOCK_LATEST_MEMBERS' => 'Neueste Mitglieder', - 'BLOCK_MINI_CALENDAR' => 'Kalender', - 'BLOCK_ONLINE_FRIENDS' => 'Freunde', - 'BLOCK_STATISTICS' => 'Statistik', - 'BLOCK_TOP_POSTER' => 'Top Poster', - 'BLOCK_CUSTOM' => 'Custom', - 'BLOCK_BOTS' => 'Letzten Bots', -)); - -// CUSTOM PAGE TITLES -// Set custom page titles here... -// -// @todo: I think we need to remove this as it has become obsolete -// Example: -// 'PAGE_ABOUT' => 'About us', /* Main page title */ -// 'PAGE_ABOUT_EXPLAIN' => 'Contact information here.', /* Explanation, page sub-title */ -// -$lang = array_merge($lang, array( -)); - -/** -* A copy of Handyman` s MOD version check, to view it on the gallery overview -*/ -$lang = array_merge($lang, array( + + /** + * A copy of Handyman` s MOD version check, to view it on the portal overview + */ 'ANNOUNCEMENT_TOPIC' => 'Release Ankündigung', 'CURRENT_VERSION' => 'Derzeitige Version', 'DOWNLOAD_LATEST' => 'Neueste Version herunterladen', @@ -178,5 +144,4 @@ $lang = array_merge($lang, array( 'UP_TO_DATE' => '%s ist aktuell', 'VERSION_CHECK' => 'MOD Version Check', )); - ?> \ 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 index 20ad67ca..6d5c501f 100644 --- a/root/language/en/mods/portal/portal_leaders_module.php +++ b/root/language/en/mods/portal/portal_leaders_module.php @@ -34,6 +34,7 @@ $lang = array_merge($lang, array( 'NO_ADMINISTRATORS_P' => 'No Administrators', 'NO_MODERATORS_P' => 'No Moderators', 'NO_GROUPS_P' => 'No Groups', + 'ACP_PORTAL_LEADERS' => 'The Team', )); ?> \ No newline at end of file diff --git a/root/language/en/mods/portal/portal_topposters_module.php b/root/language/en/mods/portal/portal_topposters_module.php index df4de70b..648a007a 100644 --- a/root/language/en/mods/portal/portal_topposters_module.php +++ b/root/language/en/mods/portal/portal_topposters_module.php @@ -34,6 +34,7 @@ $lang = array_merge($lang, array( 'TOPPOSTERS' => 'Top Posters', 'TOPPOSTERS_CONFIG' => 'Top Poster settings', 'NUM_TOPPOSTERS' => 'Number of Top Posters', + 'NUM_TOPPOSTERS_EXP' => 'Enter how many users should be displayed in the top posters block.', )); ?> \ No newline at end of file diff --git a/root/portal.php b/root/portal.php index 0b3fe7c3..bfe3af52 100644 --- a/root/portal.php +++ b/root/portal.php @@ -27,7 +27,7 @@ $user->session_begin(); $auth->acl($user->data); $user->setup('mods/portal'); -if (!$config['portal_enable']) +if (!$config['board3_enable']) { redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx)); } diff --git a/root/portal/modules/portal_leaders.php b/root/portal/modules/portal_leaders.php index 10f3ab38..d5685c4d 100644 --- a/root/portal/modules/portal_leaders.php +++ b/root/portal/modules/portal_leaders.php @@ -189,7 +189,7 @@ class portal_leaders_module function get_template_acp($module_id) { return array( - 'title' => 'ACP_CONFIG_MODULENAME', + 'title' => 'ACP_PORTAL_LEADERS', 'vars' => array( /*'legend1' => 'ACP_MODULENAME_CONFIGLEGEND', 'portal_configname' => array('lang' => 'MODULENAME_CONFIGNAME', 'validate' => 'string', 'type' => 'text:10:200', 'explain' => false), diff --git a/root/styles/prosilver/template/portal/modules/jumpbox.html b/root/styles/prosilver/template/portal/modules/jumpbox.html new file mode 100644 index 00000000..480e30f8 --- /dev/null +++ b/root/styles/prosilver/template/portal/modules/jumpbox.html @@ -0,0 +1,21 @@ + + + + + +
+ +
+ + + + +
+ +
+ \ No newline at end of file diff --git a/root/styles/prosilver/template/portal/portal_body.html b/root/styles/prosilver/template/portal/portal_body.html index cfbab71c..613275f2 100644 --- a/root/styles/prosilver/template/portal/portal_body.html +++ b/root/styles/prosilver/template/portal/portal_body.html @@ -42,7 +42,7 @@
- + diff --git a/root/styles/prosilver/theme/images/portal/portal_team.png b/root/styles/prosilver/theme/images/portal/portal_team.png new file mode 100644 index 00000000..d0e68864 Binary files /dev/null and b/root/styles/prosilver/theme/images/portal/portal_team.png differ diff --git a/root/styles/prosilver/theme/images/portal/portal_user.png b/root/styles/prosilver/theme/images/portal/portal_user.png new file mode 100644 index 00000000..4aeaa1d3 Binary files /dev/null and b/root/styles/prosilver/theme/images/portal/portal_user.png differ