From: Nils A. <nad...@ph...> - 2009-08-13 15:00:22
|
Author: naderman Date: Thu Aug 13 15:51:47 2009 New Revision: 9969 Log: - links to send statistics after install and update - link back to ACP main from send statistics - improved language / better explanation (incl. Bug #48555) Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_send_statistics.html branches/phpBB-3_0_0/phpBB/includes/acp/acp_send_statistics.php branches/phpBB-3_0_0/phpBB/includes/questionnaire/questionnaire.php branches/phpBB-3_0_0/phpBB/install/database_update.php branches/phpBB-3_0_0/phpBB/install/install_install.php branches/phpBB-3_0_0/phpBB/language/en/acp/common.php branches/phpBB-3_0_0/phpBB/language/en/install.php Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_send_statistics.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/acp_send_statistics.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/acp_send_statistics.html Thu Aug 13 15:51:47 2009 *************** *** 23,32 **** //]]> </script> ! <iframe onload="iframe_updated();" name="questionaire_result" style="display: none;"></iframe> <form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form"> <p id="show-button"><input type="button" class="button2" onclick="dE('configlist', 1); dE('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p> <div id="configlist"> --- 23,36 ---- //]]> </script> ! <iframe onload="iframe_updated();" name="questionaire_result" style="display:none;"></iframe> <form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form"> + <p><a href="{U_ACP_MAIN}">{L_DONT_SEND_STATISTICS}</a></p> + + <p>{L_EXPLAIN_SHOW_STATISTICS}</p> + <p id="show-button"><input type="button" class="button2" onclick="dE('configlist', 1); dE('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p> <div id="configlist"> *************** *** 53,60 **** </p> </form> ! <div id="questionnaire-thanks"> ! <p><strong>{L_THANKS_SEND_STATISTICS}</strong></p> </div> <script type="text/javascript"> --- 57,64 ---- </p> </form> ! <div id="questionnaire-thanks" class="successbox"> ! <p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">« {L_GO_ACP_MAIN}</a></p> </div> <script type="text/javascript"> Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_send_statistics.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/acp/acp_send_statistics.php (original) --- branches/phpBB-3_0_0/phpBB/includes/acp/acp_send_statistics.php Thu Aug 13 15:51:47 2009 *************** *** 27,33 **** function main($id, $mode) { ! global $config, $template; $collect_url = "http://www.phpbb.com/stats/receive_stats.php"; --- 27,33 ---- function main($id, $mode) { ! global $config, $template, $phpbb_admin_path, $phpEx; $collect_url = "http://www.phpbb.com/stats/receive_stats.php"; *************** *** 55,60 **** --- 55,61 ---- $template->assign_vars(array( 'U_COLLECT_STATS' => $collect_url, 'RAW_DATA' => $collector->get_data_for_form(), + 'U_ACP_MAIN' => append_sid("{$phpbb_admin_path}index.$phpEx"), )); $raw = $collector->get_data_raw(); Modified: branches/phpBB-3_0_0/phpBB/includes/questionnaire/questionnaire.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/questionnaire/questionnaire.php (original) --- branches/phpBB-3_0_0/phpBB/includes/questionnaire/questionnaire.php Thu Aug 13 15:51:47 2009 *************** *** 440,446 **** { if (isset($this->config[$name])) { ! $result['config.' . $name] = $this->config[$name]; } } --- 440,446 ---- { if (isset($this->config[$name])) { ! $result['config_' . $name] = $this->config[$name]; } } Modified: branches/phpBB-3_0_0/phpBB/install/database_update.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/database_update.php (original) --- branches/phpBB-3_0_0/phpBB/install/database_update.php Thu Aug 13 15:51:47 2009 *************** *** 1284,1289 **** --- 1284,1332 ---- } $db->sql_freeresult($result); + // Also install the "Send statistics" module + $sql = 'SELECT module_id + FROM ' . MODULES_TABLE . " + WHERE module_class = 'acp' + AND module_langname = 'ACP_SERVER_CONFIGURATION' + AND module_mode = '' + AND module_basename = ''"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $category_id = (int) $row['module_id']; + + // Check if we actually need to add the feed module or if it is already added. ;) + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_class = 'acp' + AND module_langname = 'ACP_SEND_STATISTICS' + AND module_mode = 'questionnaire' + AND module_auth = 'acl_a_server' + AND parent_id = {$category_id}"; + $result2 = $db->sql_query($sql); + $row2 = $db->sql_fetchrow($result2); + $db->sql_freeresult($result2); + + if (!$row2) + { + $module_data = array( + 'module_basename' => 'send_statistics', + 'module_enabled' => 1, + 'module_display' => 1, + 'parent_id' => $category_id, + 'module_class' => 'acp', + 'module_langname' => 'ACP_SEND_STATISTICS', + 'module_mode' => 'send_statistics', + 'module_auth' => 'acl_a_server', + ); + + $_module->update_module_data($module_data, true); + } + } + $db->sql_freeresult($result); + $_module->remove_cache_file(); // Add newly_registered group... but check if it already exists (we always supported running the updater on any schema) Modified: branches/phpBB-3_0_0/phpBB/install/install_install.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/install_install.php (original) --- branches/phpBB-3_0_0/phpBB/install/install_install.php Thu Aug 13 15:51:47 2009 *************** *** 1958,1964 **** 'TITLE' => $lang['INSTALL_CONGRATS'], 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], ! 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx), )); } --- 1958,1964 ---- 'TITLE' => $lang['INSTALL_CONGRATS'], 'BODY' => sprintf($lang['INSTALL_CONGRATS_EXPLAIN'], $config['version'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=convert&language=' . $data['language']), '../docs/README.html'), 'L_SUBMIT' => $lang['INSTALL_LOGIN'], ! 'U_ACTION' => append_sid($phpbb_root_path . 'adm/index.' . $phpEx, 'i=send_statistics&mode=questionnaire'), )); } Modified: branches/phpBB-3_0_0/phpBB/language/en/acp/common.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/language/en/acp/common.php (original) --- branches/phpBB-3_0_0/phpBB/language/en/acp/common.php Thu Aug 13 15:51:47 2009 *************** *** 157,162 **** --- 157,163 ---- 'ACP_SEARCH_SETTINGS' => 'Search settings', 'ACP_SECURITY_SETTINGS' => 'Security settings', + 'ACP_SEND_STATISTICS' => 'Send statistical information', 'ACP_SERVER_CONFIGURATION' => 'Server configuration', 'ACP_SERVER_SETTINGS' => 'Server settings', 'ACP_SIGNATURE_SETTINGS' => 'Signature settings', *************** *** 414,420 **** // Send statistics page $lang = array_merge($lang, array( ! 'EXPLAIN_SEND_STATISTICS' => 'Please send some statistical information about your server and forum configuration to phpBB. All information that could identify you has been removed - the data is entirely anonymous. We will base decisions about future phpBB versions on this information. Below you can display all variables that will be transmitted.', 'HIDE_STATISTICS' => 'Hide details', 'SEND_STATISTICS' => 'Send statistical information', 'SHOW_STATISTICS' => 'Show details', --- 415,424 ---- // Send statistics page $lang = array_merge($lang, array( ! 'EXPLAIN_SEND_STATISTICS' => 'Please send information about your server and board configurations to phpBB for statistical analysis. All information that could identify you or your website has been removed - the data is entirely <strong>anonymous</strong>. We base decisions about future phpBB versions on this information. The statistics are made available publically. We also share this data with the PHP project, the programming language phpBB is made with.', ! 'EXPLAIN_SHOW_STATISTICS' => 'Using the button below you can preview all variables that will be transmitted.', ! 'DONT_SEND_STATISTICS' => 'Return to the ACP if you do not wish to send statistical information to phpBB.', ! 'GO_ACP_MAIN' => 'Go to the ACP start page', 'HIDE_STATISTICS' => 'Hide details', 'SEND_STATISTICS' => 'Send statistical information', 'SHOW_STATISTICS' => 'Show details', Modified: branches/phpBB-3_0_0/phpBB/language/en/install.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/language/en/install.php (original) --- branches/phpBB-3_0_0/phpBB/language/en/install.php Thu Aug 13 15:51:47 2009 *************** *** 189,195 **** <h2>Convert an existing board to phpBB3</h2> <p>The phpBB Unified Convertor Framework supports the conversion of phpBB 2.0.x and other board systems to phpBB3. If you have an existing board that you wish to convert, please <a href="%2$s">proceed to the convertor</a>.</p> <h2>Go live with your phpBB3!</h2> ! <p>Clicking the button below will take you to your Administration Control Panel (ACP). Take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a>, <a href="%3$s">README</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">Support Forums</a>.</p><p><strong>Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.</strong>', 'INSTALL_INTRO' => 'Welcome to Installation', 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB3 onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p> --- 189,195 ---- <h2>Convert an existing board to phpBB3</h2> <p>The phpBB Unified Convertor Framework supports the conversion of phpBB 2.0.x and other board systems to phpBB3. If you have an existing board that you wish to convert, please <a href="%2$s">proceed to the convertor</a>.</p> <h2>Go live with your phpBB3!</h2> ! <p>Clicking the button below will take you to a form for submitting statistical data to phpBB in your Administration Control Panel (ACP). We would appreciate it if you could help us by sending that information. Afterwards you should take some time to examine the options available to you. Remember that help is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a>, <a href="%3$s">README</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">Support Forums</a>.</p><p><strong>Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.</strong>', 'INSTALL_INTRO' => 'Welcome to Installation', 'INSTALL_INTRO_BODY' => 'With this option, it is possible to install phpBB3 onto your server.</p><p>In order to proceed, you will need your database settings. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p> *************** *** 365,371 **** // Updater $lang = array_merge($lang, array( ! 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory!', 'ARCHIVE_FILE' => 'Source file within archive', 'BACK' => 'Back', --- 365,371 ---- // Updater $lang = array_merge($lang, array( ! 'ALL_FILES_UP_TO_DATE' => 'All files are up to date with the latest phpBB version. You should now <a href="../ucp.php?mode=login&redirect=adm/index.php%3Fi=send_statistics%26mode=questionnaire">login to your board</a> and check if everything is working fine. Do not forget to delete, rename or move your install directory! Please send us updated information about your server and board configurations from the <a href="../ucp.php?mode=login&redirect=adm/index.php%3Fi=send_statistics%26mode=questionnaire">Send statistics</a> module in your ACP.', 'ARCHIVE_FILE' => 'Source file within archive', 'BACK' => 'Back', |