Changeset 3381


Ignore:
Timestamp:
May 31, 2009, 9:35:51 PM (11 years ago)
Author:
plg
Message:

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.

Location:
branches/2.0
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/include/functions.php

    r3196 r3381  
    21152115  return $username;
    21162116}
     2117
     2118function get_newsletter_subscribe_base_url($language) {
     2119  $subscribe_domain = 'piwigo.org';
     2120  if ('fr_FR' == $language) {
     2121    $subscribe_domain = 'fr.piwigo.org';
     2122  }
     2123 
     2124  return 'http://'.$subscribe_domain.'/announcement/subscribe.php?email=';
     2125}
    21172126?>
  • branches/2.0/admin/intro.php

    r3196 r3381  
    115115
    116116$template->set_filenames(array('intro' => 'intro.tpl'));
     117
     118if ($conf['show_newsletter_subscription']) {
     119  $template->assign(
     120    array(
     121      'EMAIL' => $user['email'],
     122      'SUBSCRIBE_BASE_URL' => get_newsletter_subscribe_base_url($user['language']),
     123      )
     124    );
     125}
    117126
    118127$php_current_timestamp = date("Y-m-d H:i:s");
  • branches/2.0/admin/template/goto/install.tpl

    r3075 r3381  
    150150<p>
    151151  <br />
    152   <input type="button" name="index" value="{'home'|@translate}" onClick="document.location = 'index.php';"/>
    153   <input type="button" name="identification" value="{'Identification'|@translate}" onClick="document.location = 'identification.php';"/>
     152  <input type="button" name="identification" value="{'Identification'|@translate}" onClick="window.open('identification.php');"/>
     153</p>
     154
     155<div class="infos">
     156  <ul>
     157    <li>{'Subscribe to Piwigo Announcements Newsletter'|@translate}</li>
     158  </ul>
     159</div>
     160
     161<p>
     162  <input type="button" name="subscribe" value="{'Subscribe %s'|@translate|@sprintf:$F_ADMIN_EMAIL}" onClick="window.open('{$SUBSCRIBE_BASE_URL}{$F_ADMIN_EMAIL}');"/>
    154163</p>
    155164{/if}
  • branches/2.0/admin/template/goto/intro.tpl

    r3196 r3381  
    11{* $Id$ *}
     2{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
     3{known_script id="jquery.dimensions" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.dimensions.packed.js"}
     4{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"}
     5
     6<script type="text/javascript">
     7jQuery().ready(function(){ldelim}
     8  jQuery('.cluetip').cluetip({ldelim}
     9    width: 300,
     10    splitTitle: '|'
     11  });
     12});
     13</script>
     14
    215<h2>{'title_default'|@translate}</h2>
    316<dl style="padding-top: 30px;">
     
    821          return false;">Piwigo</a> {$PWG_VERSION}</li>
    922      <li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
     23{if isset($SUBSCRIBE_BASE_URL)}
     24      <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>
     25{/if}
    1026    </ul>
    1127  </dd>
  • branches/2.0/include/config_default.inc.php

    r3270 r3381  
    657657// Maximum number of images to be returned foreach call to the web service
    658658$conf['ws_max_images_per_page'] = 500;
     659
     660// Display a link to subscribe to Piwigo Announcements Newsletter
     661$conf['show_newsletter_subscription'] = true;
    659662
    660663// +-----------------------------------------------------------------------+
  • branches/2.0/install.php

    r3210 r3381  
    422422    array_push($errors, $error_copy);
    423423  }
     424
     425  $template->assign(
     426    'SUBSCRIBE_BASE_URL',
     427    get_newsletter_subscribe_base_url($language)
     428    );
    424429}
    425430if (count($errors) != 0)
  • branches/2.0/language/en_UK/admin.lang.php

    r3144 r3381  
    648648$lang['Released on'] = 'Released on';
    649649$lang['Number of downloads'] = 'Number of downloads';
     650// --------- Starting below: New or revised $lang ---- from Colibri
     651$lang['Piwigo Announcements Newsletter'] = 'Piwigo Announcements Newsletter';
     652$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.';
     653$lang['Subscribe %s'] = 'Subscribe %s';
     654$lang['Subscribe %s to Piwigo Announcements Newsletter'] = 'Subscribe %s to Piwigo Announcements Newsletter';
    650655?>
  • branches/2.0/language/fr_FR/admin.lang.php

    r3144 r3381  
    647647$lang['Released on'] = 'Ajouté le';
    648648$lang['Number of downloads'] = 'Nombre de téléchargements';
     649// --------- Starting below: New or revised $lang ---- from Colibri
     650$lang['Piwigo Announcements Newsletter'] = 'Newsletter Piwigo';
     651$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.';
     652$lang['Subscribe %s'] = 'Abonner %s';
     653$lang['Subscribe %s to Piwigo Announcements Newsletter'] = 'Abonner %s à la newsletter Piwigo';
     654
    649655?>
Note: See TracChangeset for help on using the changeset viewer.