From d05e2dd043a6fe17517bb980062079b61dccc643 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 22 Aug 2022 21:31:04 +0200 Subject: [PATCH] [ticket/17010] Add first web push settings to ACP PHPBB3-17010 --- phpBB/includes/acp/acp_board.php | 2 +- phpBB/language/en/acp/board.php | 8 ++++++++ phpBB/language/en/acp/common.php | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index d6ce8f23c4..2530c3e254 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -491,7 +491,7 @@ class acp_board 'vars' => [ 'legend1' => 'GENERAL_SETTINGS', 'webpush_vapid_public' => ['lang' => 'WEBPUSH_VAPID_PUBLIC', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true], - 'webpush_vapid_private' => ['lang' => 'WEBPUSH_VAPID_PUBLIC', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true], + 'webpush_vapid_private' => ['lang' => 'WEBPUSH_VAPID_PRIVATE', 'validate' => 'string', 'type' => 'password:25:255', 'explain' => true], 'legend3' => 'ACP_SUBMIT_CHANGES', ], diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index ec2d0236ec..37303d481a 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -599,6 +599,14 @@ $lang = array_merge($lang, array( 'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send email via a named server instead of the local mail function.', )); +$lang = array_merge($lang, [ + 'ACP_WEBPUSH_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Webpush for board notifications. Webpush is a simple protocol for the delivery of real-time events to user agents, more commonly known as push messages. It is supported by most modern browsers on desktop and mobile devices.', + 'WEBPUSH_VAPID_PUBLIC' => 'VAPID public key', + 'WEBPUSH_VAPID_PUBLIC_EXPLAIN' => 'The VAPID public key will be shared to authenticate push messages sent by your site.
Warning: Changing the VAPID public key will automatically invalidate all webpush subscriptions.', + 'WEBPUSH_VAPID_PRIVATE' => 'VAPID private key', + 'WEBPUSH_VAPID_PRIVATE_EXPLAIN' => 'The VAPID private key will be used to create authenticated push messages sent by your site. The VAPID private key must be a valid public-private key pair with the VAPID public key.
Warning: Changing the VAPID private key will automatically invalidate all webpush subscriptions.', +]); + // Jabber settings $lang = array_merge($lang, array( 'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index aeab0af262..84c047af54 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -219,6 +219,7 @@ $lang = array_merge($lang, array( 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS' => 'View global moderation permissions', 'ACP_VIEW_USER_PERMISSIONS' => 'View user-based permissions', + 'ACP_WEBPUSH_SETTINGS' => 'Webpush settings', 'ACP_WORDS' => 'Word censoring', 'ACTION' => 'Action',