diff --git a/event/listener.php b/event/listener.php
index f0329f9..da0259b 100644
--- a/event/listener.php
+++ b/event/listener.php
@@ -60,9 +60,10 @@ public function __construct(config $config, language $language, template $templa
public static function getSubscribedEvents()
{
return [
+ 'core.page_header' => 'load_google_analytics',
'core.acp_board_config_edit_add' => 'add_googleanalytics_configs',
- 'core.page_header' => 'load_google_analytics',
- 'core.validate_config_variable' => 'validate_googleanalytics_id',
+ 'core.validate_config_variable' => 'validate_googleanalytics_id',
+ 'core.page_footer_after' => 'append_agreement',
];
}
@@ -171,4 +172,24 @@ public function validate_googleanalytics_id($event)
// Update error event data
$event['error'] = $error;
}
+
+ /**
+ * Append additional agreement details to the privacy agreement.
+ *
+ * @return void
+ */
+ public function append_agreement()
+ {
+ if (!$this->config['googleanalytics_id']
+ || (strpos($this->user->page['page_name'], 'ucp') !== 0)
+ || !$this->template->retrieve_var('S_AGREEMENT')
+ || ($this->template->retrieve_var('AGREEMENT_TITLE') !== $this->language->lang('PRIVACY')))
+ {
+ return;
+ }
+
+ $this->language->add_lang('googleanalytics_ucp', 'phpbb/googleanalytics');
+
+ $this->template->append_var('AGREEMENT_TEXT', $this->language->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', $this->config['sitename']));
+ }
}
diff --git a/language/ar/googleanalytics_ucp.php b/language/ar/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/ar/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+
Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/cs/googleanalytics_ucp.php b/language/cs/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/cs/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/da/googleanalytics_ucp.php b/language/da/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/da/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/de/googleanalytics_ucp.php b/language/de/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/de/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/de_x_sie/googleanalytics_ucp.php b/language/de_x_sie/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/de_x_sie/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/el/googleanalytics_ucp.php b/language/el/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/el/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/en/googleanalytics_ucp.php b/language/en/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/en/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/es/googleanalytics_ucp.php b/language/es/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/es/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/es_x_tu/googleanalytics_ucp.php b/language/es_x_tu/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/es_x_tu/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/fr/googleanalytics_ucp.php b/language/fr/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/fr/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/hr/googleanalytics_ucp.php b/language/hr/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/hr/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/hr_x_vi/googleanalytics_ucp.php b/language/hr_x_vi/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/hr_x_vi/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/it/googleanalytics_ucp.php b/language/it/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/it/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/nl/googleanalytics_ucp.php b/language/nl/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/nl/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/pl/googleanalytics_ucp.php b/language/pl/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/pl/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/pt/googleanalytics_ucp.php b/language/pt/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/pt/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/pt_br/googleanalytics_ucp.php b/language/pt_br/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/pt_br/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/ro/googleanalytics_ucp.php b/language/ro/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/ro/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/ru/googleanalytics_ucp.php b/language/ru/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/ru/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/sk/googleanalytics_ucp.php b/language/sk/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/sk/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/sv/googleanalytics_ucp.php b/language/sv/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/sv/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/tr/googleanalytics_ucp.php b/language/tr/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/tr/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/language/zh_cmn_hant/googleanalytics_ucp.php b/language/zh_cmn_hant/googleanalytics_ucp.php
new file mode 100644
index 0000000..e93b046
--- /dev/null
+++ b/language/zh_cmn_hant/googleanalytics_ucp.php
@@ -0,0 +1,52 @@
+
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+*/
+
+/**
+* DO NOT CHANGE
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+if (empty($lang) || !is_array($lang))
+{
+ $lang = [];
+}
+
+// DEVELOPERS PLEASE NOTE
+//
+// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
+//
+// Placeholders can now contain order information, e.g. instead of
+// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
+// translators to re-order the output of data while ensuring it remains correct
+//
+// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
+// equally where a string contains only two placeholders which are used to wrap text
+// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
+//
+// Some characters you may want to copy&paste:
+// ’ » “ ” …
+//
+
+$lang = array_merge($lang, [
+ 'PHPBB_ANALYTICS_PRIVACY_POLICY' => '
+
+ Analytics
+ “%1$s” may use Google Analytics, a web analytics service provided by Google LLC (“Google”), to help us understand how visitors use the site. Google Analytics uses cookies and similar technologies to collect information about your interactions with the site, including the pages you visit, the time spent on each page, and general usage patterns.
+
+ The information generated by these cookies about your use of “%1$s” (including your IP address) is transmitted to and stored by Google on servers in the United States or other locations. Google uses this information to evaluate your use of the site, compile reports on website activity for us, and provide other services relating to website activity and internet usage.
+
+ Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. To learn more about how Google collects and processes data, please see Google’s Privacy Policy at: https://policies.google.com/privacy.
+
+ You can opt out of Google Analytics by installing the Google Analytics opt-out browser add-on, available at: https://tools.google.com/dlpage/gaoptout.
+ ',
+]);
diff --git a/tests/event/listener_test.php b/tests/event/listener_test.php
index 6400d83..a8b300d 100644
--- a/tests/event/listener_test.php
+++ b/tests/event/listener_test.php
@@ -10,8 +10,6 @@
namespace phpbb\googleanalytics\tests\event;
-require_once __DIR__ . '/../../../../../includes/functions_acp.php';
-
class listener_test extends \phpbb_test_case
{
/** @var \phpbb\googleanalytics\event\listener */
@@ -21,7 +19,7 @@ class listener_test extends \phpbb_test_case
protected $config;
/** @var \phpbb\language\language */
- protected $lang;
+ protected $language;
/** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\template\template */
protected $template;
@@ -29,6 +27,15 @@ class listener_test extends \phpbb_test_case
/** @var \phpbb\user */
protected $user;
+ public static function setUpBeforeClass(): void
+ {
+ $acp_functions = __DIR__ . '/../../../../../includes/functions_acp.php';
+ if (is_file($acp_functions))
+ {
+ require_once $acp_functions;
+ }
+ }
+
/**
* Setup test environment
*/
@@ -46,8 +53,8 @@ protected function setUp(): void
$this->template = $this->getMockBuilder('\phpbb\template\template')
->getMock();
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
- $this->lang = new \phpbb\language\language($lang_loader);
- $this->user = new \phpbb\user($this->lang, '\phpbb\datetime');
+ $this->language = new \phpbb\language\language($lang_loader);
+ $this->user = new \phpbb\user($this->language, '\phpbb\datetime');
$this->user->data['user_id'] = 2;
$this->user->data['is_registered'] = true;
}
@@ -59,7 +66,7 @@ protected function set_listener()
{
$this->listener = new \phpbb\googleanalytics\event\listener(
$this->config,
- $this->lang,
+ $this->language,
$this->template,
$this->user
);
@@ -80,9 +87,10 @@ public function test_construct()
public function test_getSubscribedEvents()
{
self::assertEquals([
- 'core.acp_board_config_edit_add',
'core.page_header',
+ 'core.acp_board_config_edit_add',
'core.validate_config_variable',
+ 'core.page_footer_after',
], array_keys(\phpbb\googleanalytics\event\listener::getSubscribedEvents()));
}
@@ -152,7 +160,7 @@ public function test_add_googleanalytics_configs($mode, $display_vars, $expected
$event_data = ['display_vars', 'mode'];
$event_data_after = $dispatcher->trigger_event('core.acp_board_config_edit_add', compact($event_data));
- extract($event_data_after, EXTR_OVERWRITE);
+ extract($event_data_after);
$keys = array_keys($display_vars['vars']);
@@ -243,8 +251,56 @@ public function test_validate_googleanalytics_id($cfg_array, $expected_error)
{
self::assertArrayHasKey($expected, $event_data_after);
}
- extract($event_data_after, EXTR_OVERWRITE);
+ extract($event_data_after);
self::assertEquals($expected_error, $error);
}
+
+ /**
+ * Data for test_append_agreement
+ *
+ * @return array
+ */
+ public function append_agreement_data()
+ {
+ return [
+ [false, 'PRIVACY', 0], // No agreement
+ [true, 'TERMS', 0], // Wrong title
+ [true, 'PRIVACY', 1], // Correct conditions
+ ];
+ }
+
+ /**
+ * Test the append_agreement method
+ *
+ * @dataProvider append_agreement_data
+ * @param mixed $s_agreement S_AGREEMENT template variable value
+ * @param mixed $agreement_title AGREEMENT_TITLE template variable value
+ * @param int $expected_append_calls Expected append_var calls
+ */
+ public function test_append_agreement($s_agreement, $agreement_title, $expected_append_calls)
+ {
+ $this->config['sitename'] = 'Test Forum';
+ $this->user->page['page_name'] = 'ucp.php';
+
+ $this->template->expects(self::atMost(2))
+ ->method('retrieve_var')
+ ->withConsecutive(['S_AGREEMENT'], ['AGREEMENT_TITLE'])
+ ->willReturnOnConsecutiveCalls($s_agreement, $this->language->lang($agreement_title));
+
+ if ($expected_append_calls > 0)
+ {
+ $this->template->expects(self::once())
+ ->method('append_var')
+ ->with('AGREEMENT_TEXT', $this->language->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', 'Test Forum'));
+ }
+ else
+ {
+ $this->template->expects(self::never())
+ ->method('append_var');
+ }
+
+ $this->set_listener();
+ $this->listener->append_agreement();
+ }
}
diff --git a/tests/functional/google_analytics_test.php b/tests/functional/google_analytics_test.php
index 27bcfb4..584a5b3 100644
--- a/tests/functional/google_analytics_test.php
+++ b/tests/functional/google_analytics_test.php
@@ -84,4 +84,15 @@ public function test_google_analytics_code()
$crawler = self::request('GET', 'index.php');
self::assertStringContainsString($this->sample_ga_code, $crawler->filter('head > script')->eq(1)->text());
}
+
+ /**
+ * Test Analytics agreement appears as expected
+ */
+ public function test_ucp_agreement()
+ {
+ $this->add_lang_ext('phpbb/googleanalytics', 'googleanalytics_ucp');
+
+ $crawler = self::request('GET', 'ucp.php?mode=privacy');
+ $this->assertStringContainsString($this->lang('PHPBB_ANALYTICS_PRIVACY_POLICY', 'yourdomain.com'), $crawler->filter('.agreement')->html());
+ }
}