From c1035c98e455548fe14fbf5443bb98137d4e3d5d Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 31 Jan 2016 23:49:17 +0100 Subject: [ticket/14492] Rename files to help_phpbb and fix css tabbing PHPBB3-14492 --- phpBB/adm/style/acp_help_phpbb.html | 52 +++++++++++++ phpBB/adm/style/acp_send_statistics.html | 71 ----------------- phpBB/adm/style/admin.css | 61 ++++++++------- phpBB/includes/acp/acp_help_phpbb.php | 91 ++++++++++++++++++++++ phpBB/includes/acp/acp_send_statistics.php | 91 ---------------------- phpBB/includes/acp/info/acp_help_phpbb.php | 34 ++++++++ phpBB/includes/acp/info/acp_send_statistics.php | 34 -------- .../db/migration/data/v320/add_help_phpbb.php | 49 ++++++++++++ 8 files changed, 257 insertions(+), 226 deletions(-) create mode 100644 phpBB/adm/style/acp_help_phpbb.html delete mode 100644 phpBB/adm/style/acp_send_statistics.html create mode 100644 phpBB/includes/acp/acp_help_phpbb.php delete mode 100644 phpBB/includes/acp/acp_send_statistics.php create mode 100644 phpBB/includes/acp/info/acp_help_phpbb.php delete mode 100644 phpBB/includes/acp/info/acp_send_statistics.php create mode 100644 phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php diff --git a/phpBB/adm/style/acp_help_phpbb.html b/phpBB/adm/style/acp_help_phpbb.html new file mode 100644 index 0000000000..a984b25b25 --- /dev/null +++ b/phpBB/adm/style/acp_help_phpbb.html @@ -0,0 +1,52 @@ + + + + +

{L_SEND_STATISTICS}

+ +
+
+

Send statistics

+

{L_EXPLAIN_SEND_STATISTICS}

+
+ +
+
+ +
+ {providers.NAME} + +
+
{providers.values.KEY}
+
{providers.values.VALUE}
+
+ +
+ +
+
+
+
+
+ + +
+
{L_SEND_STATISTICS}
+
+
+
+

VigLink

+

{L_EXPLAIN_ENABLE_VIGLINK}

+
+
+ + +
+
Enable
+
+
+
+ + diff --git a/phpBB/adm/style/acp_send_statistics.html b/phpBB/adm/style/acp_send_statistics.html deleted file mode 100644 index b45886f943..0000000000 --- a/phpBB/adm/style/acp_send_statistics.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -

{L_SEND_STATISTICS}

- -
-
-

Send statistics

-

{L_EXPLAIN_SEND_STATISTICS}

-
- -
-
- -
- {providers.NAME} - -
-
{providers.values.KEY}
-
{providers.values.VALUE}
-
- -
- -
-
-
-
-
- - -
-
{L_YES}
-
-
-
-

VigLink

-

{L_EXPLAIN_ENABLE_VIGLINK}

-
-
- - -
-
Enable
-
-
-
-
- - -
- - diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index afa0bd5d31..d4df01dba7 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -2624,72 +2624,73 @@ fieldset.permissions .padding { } .send-stats-data-row { - background: #f9f9f9; - border-radius: 6px; - border: #DEDEDE 1px solid; - padding: 10px; - border-top-width: 0; - border-top-right-radius: 0; - border-top-left-radius: 0; + background: #f9f9f9; + border-radius: 6px; + border: #DEDEDE 1px solid; + padding: 10px; + border-top-width: 0; + border-top-right-radius: 0; + border-top-left-radius: 0; } .send-stats-data-hidden .configlist { - display: none; + display: none; } .send-stats-data-only-row { - border-radius: 6px !important; - border-bottom-width: 1px !important; + border-radius: 6px !important; + border-bottom-width: 1px !important; } .send-stats-data-hidden { - padding: 0; - border: none; + padding: 0; + border: none; } .send-stats-row > .send-stats-data-row:first-child { - background-color: #d9edf7; - border-bottom-width: 0; - border-top-right-radius: 6px; - border-top-left-radius: 6px; - border-top-width: 1px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + background-color: #d9edf7; + border-bottom-width: 0; + border-top-right-radius: 6px; + border-top-left-radius: 6px; + border-top-width: 1px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } .send-stats-settings dt, .send-stats-settings dd { - min-width: 25px; + min-width: 25px; } .send-stats-settings dd { - line-height: 1.5em; + line-height: 1.5em; } .send-stats-settings input { - display: none; + display: none; } .send-stats-settings input[type=checkbox] + label:before { - content: "\f096"; - font-family: FontAwesome; - font-size: 1.5em; + content: "\f096"; + font-family: FontAwesome; + font-size: 1.5em; } .send-stats-settings input[type=checkbox]:checked + label:before { - content: "\f14a"; - color: #3c763d; + content: "\f14a"; + color: #3c763d; } .send-stats-data-row a:hover span { - text-decoration: underline; + text-decoration: underline; } .send-stats-data-row a { - text-decoration: none; + text-decoration: none; + cursor: default; } .send-stats-data-row i { - padding-left: 6px; + padding-left: 6px; } .configlist { diff --git a/phpBB/includes/acp/acp_help_phpbb.php b/phpBB/includes/acp/acp_help_phpbb.php new file mode 100644 index 0000000000..cfe9619898 --- /dev/null +++ b/phpBB/includes/acp/acp_help_phpbb.php @@ -0,0 +1,91 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +class acp_help_phpbb +{ + var $u_action; + + function main($id, $mode) + { + global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx; + + if (!class_exists('phpbb_questionnaire_data_collector')) + { + include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx); + } + + $collect_url = "https://www.phpbb.com/stats/receive_stats.php"; + + $this->tpl_name = 'acp_help_phpbb'; + $this->page_title = 'ACP_SEND_STATISTICS'; + + // generate a unique id if necessary + if (!isset($config['questionnaire_unique_id'])) + { + $install_id = unique_id(); + $config->set('questionnaire_unique_id', $install_id); + } + else + { + $install_id = $config['questionnaire_unique_id']; + } + + $collector = new phpbb_questionnaire_data_collector($install_id); + + // Add data provider + $collector->add_data_provider(new phpbb_questionnaire_php_data_provider()); + $collector->add_data_provider(new phpbb_questionnaire_system_data_provider()); + $collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config)); + + $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(); + + foreach ($raw as $provider => $data) + { + if ($provider == 'install_id') + { + $data = array($provider => $data); + } + + $template->assign_block_vars('providers', array( + 'NAME' => htmlspecialchars($provider), + )); + + foreach ($data as $key => $value) + { + if (is_array($value)) + { + $value = utf8_wordwrap(serialize($value), 75, "\n", true); + } + + $template->assign_block_vars('providers.values', array( + 'KEY' => utf8_htmlspecialchars($key), + 'VALUE' => utf8_htmlspecialchars($value), + )); + } + } + } +} diff --git a/phpBB/includes/acp/acp_send_statistics.php b/phpBB/includes/acp/acp_send_statistics.php deleted file mode 100644 index 74da5996f1..0000000000 --- a/phpBB/includes/acp/acp_send_statistics.php +++ /dev/null @@ -1,91 +0,0 @@ - -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -class acp_send_statistics -{ - var $u_action; - - function main($id, $mode) - { - global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx; - - if (!class_exists('phpbb_questionnaire_data_collector')) - { - include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx); - } - - $collect_url = "https://www.phpbb.com/stats/receive_stats.php"; - - $this->tpl_name = 'acp_send_statistics'; - $this->page_title = 'ACP_SEND_STATISTICS'; - - // generate a unique id if necessary - if (!isset($config['questionnaire_unique_id'])) - { - $install_id = unique_id(); - $config->set('questionnaire_unique_id', $install_id); - } - else - { - $install_id = $config['questionnaire_unique_id']; - } - - $collector = new phpbb_questionnaire_data_collector($install_id); - - // Add data provider - $collector->add_data_provider(new phpbb_questionnaire_php_data_provider()); - $collector->add_data_provider(new phpbb_questionnaire_system_data_provider()); - $collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config)); - - $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(); - - foreach ($raw as $provider => $data) - { - if ($provider == 'install_id') - { - $data = array($provider => $data); - } - - $template->assign_block_vars('providers', array( - 'NAME' => htmlspecialchars($provider), - )); - - foreach ($data as $key => $value) - { - if (is_array($value)) - { - $value = utf8_wordwrap(serialize($value), 75, "\n", true); - } - - $template->assign_block_vars('providers.values', array( - 'KEY' => utf8_htmlspecialchars($key), - 'VALUE' => utf8_htmlspecialchars($value), - )); - } - } - } -} diff --git a/phpBB/includes/acp/info/acp_help_phpbb.php b/phpBB/includes/acp/info/acp_help_phpbb.php new file mode 100644 index 0000000000..17a07ec4f6 --- /dev/null +++ b/phpBB/includes/acp/info/acp_help_phpbb.php @@ -0,0 +1,34 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +class acp_help_phpbb_info +{ + function module() + { + return array( + 'filename' => 'acp_help_phpbb', + 'title' => 'ACP_SEND_STATISTICS', + 'modes' => array( + 'help_phpbb' => array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} diff --git a/phpBB/includes/acp/info/acp_send_statistics.php b/phpBB/includes/acp/info/acp_send_statistics.php deleted file mode 100644 index a0db1a48c4..0000000000 --- a/phpBB/includes/acp/info/acp_send_statistics.php +++ /dev/null @@ -1,34 +0,0 @@ - -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -class acp_send_statistics_info -{ - function module() - { - return array( - 'filename' => 'acp_send_statistics', - 'title' => 'ACP_SEND_STATISTICS', - 'modes' => array( - 'send_statistics' => array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')), - ), - ); - } - - function install() - { - } - - function uninstall() - { - } -} diff --git a/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php new file mode 100644 index 0000000000..4274f53520 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php @@ -0,0 +1,49 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v320; + +class add_help_phpbb extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v320\v320a2', + ); + } + + public function effectively_installed() + { + return isset($this->config['help_send_statistics']); + } + + public function update_data() + { + return array( + array('config.add', array('help_send_statistics', true)), + array('module.remove', array( + 'acp', + false, + 'ACP_SEND_STATISTICS', + )), + array('module.add', array( + 'acp', + 'ACP_SERVER_CONFIGURATION', + array( + 'module_basename' => 'acp_help_phpbb', + 'modes' => array('help_phpbb'), + ), + )), + ); + } +} -- cgit v1.2.1