merge r3381 from branch 2.0 to trunk
feature 1020 added: ability to subscribe to Piwigo Announcement Newsletter from Piwigo itself. Admins can perform this action at the end of installation or on administration panel index. git-svn-id: http://piwigo.org/svn/trunk@3382 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
01dc8c2677
commit
654ce203d3
8 changed files with 63 additions and 3 deletions
|
|
@ -2114,4 +2114,13 @@ SELECT '.$conf['user_fields']['username'].'
|
|||
|
||||
return $username;
|
||||
}
|
||||
|
||||
function get_newsletter_subscribe_base_url($language) {
|
||||
$subscribe_domain = 'piwigo.org';
|
||||
if ('fr_FR' == $language) {
|
||||
$subscribe_domain = 'fr.piwigo.org';
|
||||
}
|
||||
|
||||
return 'http://'.$subscribe_domain.'/announcement/subscribe.php?email=';
|
||||
}
|
||||
?>
|
||||
|
|
@ -115,6 +115,15 @@ else if (isset($_GET['action']) and 'phpinfo' == $_GET['action'])
|
|||
|
||||
$template->set_filenames(array('intro' => 'intro.tpl'));
|
||||
|
||||
if ($conf['show_newsletter_subscription']) {
|
||||
$template->assign(
|
||||
array(
|
||||
'EMAIL' => $user['email'],
|
||||
'SUBSCRIBE_BASE_URL' => get_newsletter_subscribe_base_url($user['language']),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$php_current_timestamp = date("Y-m-d H:i:s");
|
||||
list($mysql_version, $db_current_timestamp) = mysql_fetch_row(pwg_query('SELECT VERSION(), CURRENT_TIMESTAMP;'));
|
||||
|
||||
|
|
|
|||
|
|
@ -147,9 +147,18 @@ TD {
|
|||
</form>
|
||||
{else}
|
||||
<p>
|
||||
<br>
|
||||
<input type="button" name="index" value="{'home'|@translate}" onClick="document.location = 'index.php';">
|
||||
<input type="button" name="identification" value="{'Identification'|@translate}" onClick="document.location = 'identification.php';">
|
||||
<br />
|
||||
<input type="button" name="identification" value="{'Identification'|@translate}" onClick="window.open('identification.php');"/>
|
||||
</p>
|
||||
|
||||
<div class="infos">
|
||||
<ul>
|
||||
<li>{'Subscribe to Piwigo Announcements Newsletter'|@translate}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<input type="button" name="subscribe" value="{'Subscribe %s'|@translate|@sprintf:$F_ADMIN_EMAIL}" onClick="window.open('{$SUBSCRIBE_BASE_URL}{$F_ADMIN_EMAIL}');"/>
|
||||
</p>
|
||||
{/if}
|
||||
</div> {* content *}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,16 @@
|
|||
{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
|
||||
{known_script id="jquery.dimensions" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.dimensions.packed.js"}
|
||||
{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"}
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery().ready(function(){ldelim}
|
||||
jQuery('.cluetip').cluetip({ldelim}
|
||||
width: 300,
|
||||
splitTitle: '|'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<h2>{'title_default'|@translate}</h2>
|
||||
<dl style="padding-top: 30px;">
|
||||
<dt>{'Piwigo version'|@translate}</dt>
|
||||
|
|
@ -6,6 +19,9 @@
|
|||
<li><a href="{$PHPWG_URL}" onclick="window.open(this.href, '');
|
||||
return false;">Piwigo</a> {$PWG_VERSION}</li>
|
||||
<li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
|
||||
{if isset($SUBSCRIBE_BASE_URL)}
|
||||
<li><a href="{$SUBSCRIBE_BASE_URL}{$EMAIL}" onclick="window.open(this.href); return false;" class="cluetip" title="{'Piwigo Announcements Newsletter'|@translate}|{'Subscribe to Piwigo Announcements Newsletter'|@translate|htmlspecialchars|nl2br}">{'Subscribe %s to Piwigo Announcements Newsletter'|@translate|@sprintf:$EMAIL}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
|
|
|||
|
|
@ -657,6 +657,9 @@ $conf['allow_web_services'] = true;
|
|||
// Maximum number of images to be returned foreach call to the web service
|
||||
$conf['ws_max_images_per_page'] = 500;
|
||||
|
||||
// Display a link to subscribe to Piwigo Announcements Newsletter
|
||||
$conf['show_newsletter_subscription'] = true;
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Filter |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
|
|
|||
|
|
@ -418,6 +418,11 @@ else
|
|||
{
|
||||
array_push($errors, $error_copy);
|
||||
}
|
||||
|
||||
$template->assign(
|
||||
'SUBSCRIBE_BASE_URL',
|
||||
get_newsletter_subscribe_base_url($language)
|
||||
);
|
||||
}
|
||||
if (count($errors) != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -648,4 +648,8 @@ $lang['Downloads'] = 'Downloads';
|
|||
$lang['Released on'] = 'Released on';
|
||||
$lang['Number of downloads'] = 'Number of downloads';
|
||||
// --------- Starting below: New or revised $lang ---- from Colibri (2.1)
|
||||
$lang['Piwigo Announcements Newsletter'] = 'Piwigo Announcements Newsletter';
|
||||
$lang['Subscribe to Piwigo Announcements Newsletter'] = '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.';
|
||||
$lang['Subscribe %s'] = 'Subscribe %s';
|
||||
$lang['Subscribe %s to Piwigo Announcements Newsletter'] = 'Subscribe %s to Piwigo Announcements Newsletter';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -647,4 +647,9 @@ $lang['Downloads'] = 'Téléchargements';
|
|||
$lang['Released on'] = 'Ajouté le';
|
||||
$lang['Number of downloads'] = 'Nombre de téléchargements';
|
||||
// --------- Starting below: New or revised $lang ---- from Colibri (2.1)
|
||||
$lang['Piwigo Announcements Newsletter'] = 'Newsletter Piwigo';
|
||||
$lang['Subscribe to Piwigo Announcements Newsletter'] = 'Restez en contact avec le projet Piwigo, abonnez-vous à la newsletter. Vous recevrez un email lorsqu\'une nouvelle version sera disponible (parfois un bug de sécurité est corrigé, il est important d\'être au courant et de mettre à jour) ou qu\'un événement majeur surviendra sur le projet. Seulement quelques messages par an.';
|
||||
$lang['Subscribe %s'] = 'Abonner %s';
|
||||
$lang['Subscribe %s to Piwigo Announcements Newsletter'] = 'Abonner %s à la newsletter Piwigo';
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue