diff --git a/admin/intro.php b/admin/intro.php
index 70c724331..ffbf3f44c 100644
--- a/admin/intro.php
+++ b/admin/intro.php
@@ -25,6 +25,12 @@ check_status(ACCESS_ADMINISTRATOR);
// | tabs |
// +-----------------------------------------------------------------------+
+if (isset($_GET['action']) and 'hide_newsletter_subscription' == $_GET['action'])
+{
+ conf_update_param('show_newsletter_subscription', 'false', true);
+ exit();
+}
+
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
$my_base_url = get_root_url().'admin.php?page=';
diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl
index aa152d651..abae8a33a 100644
--- a/admin/themes/default/template/intro.tpl
+++ b/admin/themes/default/template/intro.tpl
@@ -32,6 +32,19 @@ jQuery().ready(function(){
jQuery(".warnings ul").append('
'+ext_need_update_msg+'');
}
});
+
+ jQuery('.newsletter-subscription a').click(function() {
+ jQuery('.newsletter-subscription').hide();
+
+ jQuery.ajax({
+ type: 'GET',
+ url: 'admin.php?action=hide_newsletter_subscription'
+ });
+
+ if (jQuery(this).hasClass('newsletter-hide')) {
+ return false;
+ }
+ });
});
{/literal}
{/footer_script}
@@ -134,6 +147,6 @@ jQuery().ready(function(){
{if isset($SUBSCRIBE_BASE_URL)}
-
{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}
+
{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL} {'... or hide this link'|translate}
{/if}
diff --git a/install.php b/install.php
index b04700b48..bea9d726f 100644
--- a/install.php
+++ b/install.php
@@ -428,6 +428,8 @@ INSERT INTO '.$prefixeTable.'config (param,value,comment)
array(),
array('origin' => 'installation')
);
+
+ conf_update_param('show_newsletter_subscription', 'false');
}
}
}
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index a7e050d2f..75241df30 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -85,6 +85,7 @@ $lang['(this tag will be deleted)'] = '(this tag will be deleted)';
$lang['+ Add an upload box'] = '+ Add an upload box';
$lang[', click on'] = ", click on";
$lang['... or '] = '... or ';
+$lang['... or hide this link'] = '... or hide this link';
$lang['Piwigo for iOS application empowers you to connect to your Piwigo gallery from your iPhone, iPad or iPod Touch, create some albums and upload several photos at once.'] = 'Piwigo for iOS application empowers you to connect to your Piwigo gallery from your iPhone, iPad or iPod Touch, create some albums and upload several photos at once.';
$lang['A locked gallery is only visible to administrators'] = 'A locked gallery is only visible to administrators';
$lang['A new version of Piwigo is available.'] = "A new version of Piwigo is available.";
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 9b8928c9b..3c8d4b047 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -748,6 +748,7 @@ $lang['You can\'t define a default photo order because you have a custom setting
$lang['You have specified $conf[\'order_by\'] in your local configuration file, this parameter in deprecated, please remove it or rename it into $conf[\'order_by_custom\'] !'] = 'Vous avez spécifié $conf[\'order_by\'] dans votre fichier de configuration, ce paramètre est obsolète, veuillez le supprimer ou le renommer en $conf[\'order_by_custom\'] !';
$lang['Add a criteria'] = 'Ajouter un critère';
$lang['... or '] = '... ou bien ';
+$lang['... or hide this link'] = '... ou bien cacher ce lien';
$lang['Create'] = 'Créer';
$lang['Start Upload'] = 'Démarrer le transfert';
$lang['You are using the Flash uploader. Problems? Try the Browser uploader instead.'] = 'Vous utilisez le formulaire Flash. Des problèmes ? Essayez le formulaire HTML à la place.';