diff --git a/xExtension-ShareByEmail/Controllers/shareByEmailController.php b/xExtension-ShareByEmail/Controllers/shareByEmailController.php index 77d08fca..d721a737 100644 --- a/xExtension-ShareByEmail/Controllers/shareByEmailController.php +++ b/xExtension-ShareByEmail/Controllers/shareByEmailController.php @@ -57,6 +57,9 @@ public function shareAction(): void { Minz_View::appendStyle($this->extension->getFileUrl('shareByEmail.css')); } $this->view->to = ''; + if ($this->extension instanceof ShareByEmailExtension) { + $this->view->to = htmlspecialchars($this->extension->getDefaultRecipient(), ENT_COMPAT, 'UTF-8'); + } $this->view->subject = _t('shareByEmail.share.form.subject_default'); $this->view->content = _t( 'shareByEmail.share.form.content_default', diff --git a/xExtension-ShareByEmail/README.md b/xExtension-ShareByEmail/README.md index d1a0ffb2..6acac455 100644 --- a/xExtension-ShareByEmail/README.md +++ b/xExtension-ShareByEmail/README.md @@ -12,8 +12,11 @@ After the installation the `Email` sharing service will added to the list of ava You will have to configure the mailing system in FreshRSS. [See the documentation](https://freshrss.github.io/FreshRSS/en/admins/05_Configuring_email_validation.html#configure-the-smtp-server) +Optionally, you can set a default recipient in the extension configuration, which will prefill the “To” field of the sharing form. + ## Changelog +- 0.5.0 Optional default recipient to prefill the sharing form - 0.3.2 With the new feature, Turkish language deficiencies have been corrected. - 0.3.0 detail information about the mail system shown in the extension config - 0.2.3 Turkish language support added diff --git a/xExtension-ShareByEmail/configure.phtml b/xExtension-ShareByEmail/configure.phtml index ac30a38b..c8291b65 100644 --- a/xExtension-ShareByEmail/configure.phtml +++ b/xExtension-ShareByEmail/configure.phtml @@ -1,5 +1,6 @@
= _i('help') ?> = _t('shareByEmail.share.manage.help') ?>
mail()',
'smtp' => 'via SMTP (versendet von %s)',
diff --git a/xExtension-ShareByEmail/i18n/en/shareByEmail.php b/xExtension-ShareByEmail/i18n/en/shareByEmail.php
index 49c8784c..8ae22f38 100644
--- a/xExtension-ShareByEmail/i18n/en/shareByEmail.php
+++ b/xExtension-ShareByEmail/i18n/en/shareByEmail.php
@@ -19,6 +19,8 @@
'intro' => 'You are about to share this article by email: “%s”',
'title' => 'Share an article by email',
'manage' => [
+ 'default_recipient' => 'Default recipient',
+ 'default_recipient_help' => 'Prefills the “To” field when sharing an article. Leave empty to have no default recipient.',
'mailer' => 'Mailing system',
'mail' => 'PHP mail()',
'smtp' => 'SMTP (send from %s)',
diff --git a/xExtension-ShareByEmail/i18n/fr/shareByEmail.php b/xExtension-ShareByEmail/i18n/fr/shareByEmail.php
index 9343f357..4d3be13d 100644
--- a/xExtension-ShareByEmail/i18n/fr/shareByEmail.php
+++ b/xExtension-ShareByEmail/i18n/fr/shareByEmail.php
@@ -19,6 +19,8 @@
'intro' => 'Vous êtes sur le point de partager cet article par courriel : « %s »',
'title' => 'Partager un article par courriel',
'manage' => [
+ 'default_recipient' => 'Destinataire par défaut',
+ 'default_recipient_help' => 'Pré-remplit le champ « Pour » lors du partage d’un article. Laisser vide pour ne pas avoir de destinataire par défaut.',
'mailer' => 'Système de messagerie',
'mail' => 'PHP mail()',
'smtp' => 'SMTP (envoyer en tant que %s)',
diff --git a/xExtension-ShareByEmail/i18n/tr/shareByEmail.php b/xExtension-ShareByEmail/i18n/tr/shareByEmail.php
index b2cca3ff..fbcfccc4 100644
--- a/xExtension-ShareByEmail/i18n/tr/shareByEmail.php
+++ b/xExtension-ShareByEmail/i18n/tr/shareByEmail.php
@@ -19,6 +19,8 @@
'intro' => 'Bu makaleyi e-posta yoluyla paylaşmak üzeresiniz: “%s”',
'title' => 'Bir makaleyi e-posta ile paylaşın',
'manage' => [
+ 'default_recipient' => 'Varsayılan alıcı',
+ 'default_recipient_help' => 'Bir makale paylaşılırken “Kime” alanını önceden doldurur. Varsayılan alıcı istemiyorsanız boş bırakın.',
'mailer' => 'Mail sistemi',
'mail' => 'PHP mail()',
'smtp' => 'SMTP (%s kaynağından gönder)',
diff --git a/xExtension-ShareByEmail/metadata.json b/xExtension-ShareByEmail/metadata.json
index e8bba61e..3e1befc7 100644
--- a/xExtension-ShareByEmail/metadata.json
+++ b/xExtension-ShareByEmail/metadata.json
@@ -2,7 +2,7 @@
"name": "Share By Email",
"author": "Marien Fressinaud",
"description": "Improve the sharing by email system.",
- "version": "0.4.0",
+ "version": "0.5.0",
"entrypoint": "ShareByEmail",
"type": "user"
}