From c6a35237a23d8d1e2ca7af72c5f31a42cad6df41 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 31 May 2018 07:56:05 +0200 Subject: [PATCH 1/4] [ticket/15676] Display privacy notice in footer & allow overriding U_PRIVACY PHPBB3-15676 --- phpBB/includes/functions.php | 26 +++++++++++++++++-- phpBB/language/en/common.php | 2 +- phpBB/language/en/help/faq.php | 4 +-- .../prosilver/template/overall_footer.html | 1 + phpBB/styles/prosilver/theme/common.css | 3 ++- 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4aae84705b..aeba5b74c0 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2463,7 +2463,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $s_hidden_fields = build_hidden_fields($s_hidden_fields); - $template->assign_vars(array( + $login_box_template_data = array( 'LOGIN_ERROR' => $err, 'LOGIN_EXPLAIN' => $l_explain, @@ -2480,7 +2480,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'USERNAME_CREDENTIAL' => 'username', 'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password', - )); + ); + + /** + * Event to add/modify login box template data + * + * @event core.login_box_modify_template_data + * @var int admin Flag whether user is admin + * @var string username User name + * @var int autologin Flag whether autologin is enabled + * @var string redirect Redirect URL + * @var array login_box_template_data Array with the login box template data + * @since 3.2.3-RC2 + */ + $vars = array( + 'admin', + 'username', + 'autologin', + 'redirect', + 'login_box_template_data', + ); + extract($phpbb_dispatcher->trigger_event('core.login_box_modify_template_data', compact($vars))); + + $template->assign_vars($login_box_template_data); page_header($user->lang['LOGIN']); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 5140919dad..b239546469 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -193,7 +193,7 @@ $lang = array_merge($lang, array( 'DAYS' => 'Days', 'DELETE' => 'Delete', 'DELETE_ALL' => 'Delete all', - 'DELETE_COOKIES' => 'Delete all board cookies', + 'DELETE_COOKIES' => 'Delete cookies', 'DELETE_MARKED' => 'Delete marked', 'DELETE_POST' => 'Delete post', 'DELIMITER' => 'Delimiter', diff --git a/phpBB/language/en/help/faq.php b/phpBB/language/en/help/faq.php index e59d950948..6b165da0f8 100644 --- a/phpBB/language/en/help/faq.php +++ b/phpBB/language/en/help/faq.php @@ -111,8 +111,8 @@ $lang = array_merge($lang, array( 'HELP_FAQ_LOGIN_CANNOT_REGISTER_QUESTION' => 'Why can’t I register?', 'HELP_FAQ_LOGIN_COPPA_ANSWER' => 'COPPA, or the Children’s Online Privacy Protection Act of 1998, is a law in the United States requiring websites which can potentially collect information from minors under the age of 13 to have written parental consent or some other method of legal guardian acknowledgment, allowing the collection of personally identifiable information from a minor under the age of 13. If you are unsure if this applies to you as someone trying to register or to the website you are trying to register on, contact legal counsel for assistance. Please note that phpBB Limited and the owners of this board cannot provide legal advice and is not a point of contact for legal concerns of any kind, except as outlined in question “Who do I contact about abusive and/or legal matters related to this board?”.', 'HELP_FAQ_LOGIN_COPPA_QUESTION' => 'What is COPPA?', - 'HELP_FAQ_LOGIN_DELETE_COOKIES_ANSWER' => '“Delete all board cookies” deletes the cookies created by phpBB which keep you authenticated and logged into the board. Cookies also provide functions such as read tracking if they have been enabled by a board administrator. If you are having login or logout problems, deleting board cookies may help.', - 'HELP_FAQ_LOGIN_DELETE_COOKIES_QUESTION' => 'What does the “Delete all board cookies” do?', + 'HELP_FAQ_LOGIN_DELETE_COOKIES_ANSWER' => '“Delete cookies” deletes the cookies created by phpBB which keep you authenticated and logged into the board. Cookies also provide functions such as read tracking if they have been enabled by a board administrator. If you are having login or logout problems, deleting board cookies may help.', + 'HELP_FAQ_LOGIN_DELETE_COOKIES_QUESTION' => 'What does the “Delete cookies” do?', 'HELP_FAQ_LOGIN_LOST_PASSWORD_ANSWER' => 'Don’t panic! While your password cannot be retrieved, it can easily be reset. Visit the login page and click I forgot my password. Follow the instructions and you should be able to log in again shortly.
However, if you are not able to reset your password, contact a board administrator.', 'HELP_FAQ_LOGIN_LOST_PASSWORD_QUESTION' => 'I’ve lost my password!', 'HELP_FAQ_LOGIN_REGISTER_ANSWER' => 'You may not have to, it is up to the administrator of the board as to whether you need to register in order to post messages. However; registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing of fellow users, usergroup subscription, etc. It only takes a few moments to register so it is recommended you do so.', diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index b01b0bb213..cb723a31f6 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -11,6 +11,7 @@ {CREDIT_LINE}
{TRANSLATION_INFO} +
{L_PRIVACY} | {L_TERMS_USE}
{DEBUG_OUTPUT}
{L_ACP} diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 348355e8c4..9a06e193ee 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -981,8 +981,9 @@ fieldset.fields1 dl.pmlist dd.recipients { /* Miscellaneous styles ---------------------------------------- */ .copyright { - padding: 5px; + line-height: 16px; text-align: center; + padding: 5px; } .small { From 25a46ef4b3a79ff87f3ac9bf6b52fa97363809b6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 31 May 2018 22:15:36 +0200 Subject: [PATCH 2/4] [ticket/15676] Simplify link text and use privacy link in cookie notice PHPBB3-15676 --- phpBB/includes/functions.php | 2 ++ phpBB/language/en/common.php | 2 ++ phpBB/styles/prosilver/template/overall_footer.html | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index aeba5b74c0..24642faade 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2471,6 +2471,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa 'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '', 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), + 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')), 'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false, 'S_HIDDEN_FIELDS' => $s_hidden_fields, @@ -4426,6 +4427,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'), 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'), + 'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')), 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', 'U_FEED' => $controller_helper->route('phpbb_feed_index'), diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index b239546469..213563aea0 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -608,6 +608,7 @@ $lang = array_merge($lang, array( 'PREVIOUS' => 'Previous', // Used in pagination 'PREVIOUS_STEP' => 'Previous', 'PRIVACY' => 'Privacy policy', + 'PRIVACY_LINK' => 'Privacy', 'PRIVATE_MESSAGE' => 'Private message', 'PRIVATE_MESSAGES' => 'Private messages', 'PRIVATE_MESSAGING' => 'Private messaging', @@ -732,6 +733,7 @@ $lang = array_merge($lang, array( 'SUBMIT' => 'Submit', 'TB' => 'TB', + 'TERMS_LINK' => 'Terms', 'TERMS_USE' => 'Terms of use', 'TEST_CONNECTION' => 'Test connection', 'THE_TEAM' => 'The team', diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index cb723a31f6..cc93615a15 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -11,7 +11,7 @@ {CREDIT_LINE}
{TRANSLATION_INFO} -
{L_PRIVACY} | {L_TERMS_USE} +
{L_PRIVACY_LINK} | {L_TERMS_LINK}
{DEBUG_OUTPUT}
{L_ACP} @@ -79,7 +79,7 @@ "message": "{LA_COOKIE_CONSENT_MSG}", "dismiss": "{LA_COOKIE_CONSENT_OK}", "link": "{LA_COOKIE_CONSENT_INFO}", - "href": "{LA_COOKIE_CONSENT_HREF}" + "href": "{UA_PRIVACY}" } }); }); From 7284bf588343bbb0969eade27821ffbf77d43ab3 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 31 May 2018 22:26:17 +0200 Subject: [PATCH 3/4] [ticket/15676] Use twig syntax PHPBB3-15676 --- phpBB/styles/prosilver/template/overall_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index cc93615a15..a8e3b72d97 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -11,7 +11,7 @@ {CREDIT_LINE}
{TRANSLATION_INFO} -
{L_PRIVACY_LINK} | {L_TERMS_LINK} +
{{ lang('PRIVACY_LINK') }} | {{ lang('TERMS_LINK') }}
{DEBUG_OUTPUT}
{L_ACP} From 2f3bd918acf0fcf5f695e92d720ff968df9178f6 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 20 Jun 2018 21:50:49 +0200 Subject: [PATCH 4/4] [ticket/15676] Use paragraphs and classes as suggested by hanakin PHPBB3-15676 --- .../prosilver/template/overall_footer.html | 32 ++++++++++++++++--- phpBB/styles/prosilver/theme/common.css | 10 ++++-- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index a8e3b72d97..2c2094cba8 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -8,12 +8,34 @@
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index 9a06e193ee..6223b22173 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -981,9 +981,15 @@ fieldset.fields1 dl.pmlist dd.recipients { /* Miscellaneous styles ---------------------------------------- */ .copyright { - line-height: 16px; + font-size: 10px; text-align: center; - padding: 5px; + padding: 10px; +} + +.footer-row { + font-size: 10px; + line-height: 1.8; + margin: 0; } .small {