Skip to content
Permalink
Browse files

fixes #93 automatically hide the newsletter link when clicked

  • Loading branch information...
plegall committed Jun 28, 2019
1 parent 3999bff commit 0ef219347120f8ad87bfc98bcb00f83e03e4e80a
Showing with 24 additions and 1 deletion.
  1. +6 −0 admin/intro.php
  2. +14 −1 admin/themes/default/template/intro.tpl
  3. +2 −0 install.php
  4. +1 −0 language/en_UK/admin.lang.php
  5. +1 −0 language/fr_FR/admin.lang.php
@@ -25,6 +25,12 @@
// | 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=';
@@ -32,6 +32,19 @@ jQuery().ready(function(){
jQuery(".warnings ul").append('<li>'+ext_need_update_msg+'</li>');
}
});

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)}
<br><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" class="externalLink cluetip icon-mail-alt" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</a>
<br><span class="newsletter-subscription"><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" id="newsletterSubscribe" class="externalLink cluetip icon-mail-alt" title="{'Piwigo Announcements Newsletter'|@translate}|{'Keep in touch with Piwigo project, subscribe to Piwigo Announcement Newsletter. You will receive emails when a new release is available (sometimes including a security bug fix, it\'s important to know and upgrade) and when major events happen to the project. Only a few emails a year.'|@translate|@htmlspecialchars|@nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate:$EMAIL}</a> <a href="#" class="newsletter-hide">{'... or hide this link'|translate}</a></span>
{/if}
</p>
@@ -428,6 +428,8 @@
array(),
array('origin' => 'installation')
);
conf_update_param('show_newsletter_subscription', 'false');
}
}
}
@@ -85,6 +85,7 @@
$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['<em>Piwigo for iOS</em> 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.'] = '<em>Piwigo for iOS</em> 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.";
@@ -748,6 +748,7 @@
$lang['You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'] = 'Vous avez spécifié <i>$conf[\'order_by\']</i> dans votre fichier de configuration, ce paramètre est obsolète, veuillez le supprimer ou le renommer en <i>$conf[\'order_by_custom\']</i> !';
$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 <a href="%s">Browser uploader</a> instead.'] = 'Vous utilisez le formulaire Flash. Des problèmes ? Essayez le <a href="%s">formulaire HTML</a> à la place.';

0 comments on commit 0ef2193

Please sign in to comment.
You can’t perform that action at this time.