Changeset 3382


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

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.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r3282 r3382  
    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?>
  • trunk/admin/intro.php

    r3282 r3382  
    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");
  • trunk/admin/template/goto/install.tpl

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

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

    r3282 r3382  
    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// +-----------------------------------------------------------------------+
  • trunk/install.php

    r3282 r3382  
    419419    array_push($errors, $error_copy);
    420420  }
     421
     422  $template->assign(
     423    'SUBSCRIBE_BASE_URL',
     424    get_newsletter_subscribe_base_url($language)
     425    );
    421426}
    422427if (count($errors) != 0)
  • trunk/language/en_UK/admin.lang.php

    r3282 r3382  
    649649$lang['Number of downloads'] = 'Number of downloads';
    650650// --------- Starting below: New or revised $lang ---- from Colibri (2.1)
     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';
    651655?>
  • trunk/language/fr_FR/admin.lang.php

    r3282 r3382  
    648648$lang['Number of downloads'] = 'Nombre de téléchargements';
    649649// --------- Starting below: New or revised $lang ---- from Colibri (2.1)
     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
    650655?>
Note: See TracChangeset for help on using the changeset viewer.