Changeset 26144


Ignore:
Timestamp:
Dec 24, 2013, 1:25:03 AM (7 years ago)
Author:
mistic100
Message:

change layout of form (use colorbox for standalone) + cleaning of subscriptions page

Location:
extensions/Subscribe_to_comments
Files:
1 deleted
7 edited
2 moved

Legend:

Unmodified
Added
Removed
  • extensions/Subscribe_to_comments/include/events.inc.php

    r26139 r26144  
    7878        }
    7979      }
    80     }
    81     else
    82     {
    83       $template->assign('STC_MODE', $_POST['stc_mode']);
     80
     81      unset($_POST['stc_mode']);
    8482    }
    8583  }
     
    160158        break;
    161159    }
     160    unset($_POST['stc_mode']);
    162161  }
    163162  else if (isset($_GET['stc_unsubscribe']))
     
    167166      $page['infos'][] = l10n('Successfully unsubscribed your email address from receiving notifications.');
    168167    }
     168  }
     169
     170  $tpl_vars = array(
     171    'ASK_MAIL' => is_a_guest() or empty($user['email']),
     172    'ON_PICTURE' => true,
     173    'ALLOW_ALBUM_IMAGES' => !empty($page['category']['id']),
     174    'ALLOW_GLOBAL' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'] || is_admin(),
     175    );
     176
     177  if (!empty($_POST['stc_mode']))
     178  {
     179    $tpl_vars['MODE'] = $_POST['stc_mode'];
    169180  }
    170181
     
    220231    if ($subscribed)
    221232    {
    222       $template->assign(array(
    223         'SUBSCRIBED' => $subscribed,
    224         'UNSUB_LINK' => add_url_params($picture['current']['url'], array('stc_unsubscribe'=>$stc_id)),
    225         ));
    226     }
    227   }
    228   else
    229   {
    230     $template->assign('STC_ASK_MAIL', true);
     233      $tpl_vars['SUBSCRIBED'] = $subscribed;
     234      $tpl_vars['U_UNSUB'] = add_url_params($picture['current']['url'], array('stc_unsubscribe'=>$stc_id));
     235    }
    231236  }
    232237
    233238  $template->assign(array(
    234     'STC_ON_PICTURE' => true,
    235     'STC_ALLOW_ALBUM_IMAGES' => !empty($page['category']['id']),
    236     'STC_ALLOW_GLOBAL' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'] || is_admin(),
    237239    'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH,
     240    'STC' => $tpl_vars,
    238241    ));
    239242
     
    249252  global $page, $template, $user, $conf;
    250253
    251   if (
    252       !defined('COA_ID') or script_basename() != 'index' or
    253       @$page['section'] != 'categories' or !isset($page['category'])
    254     )
    255   {
    256     return;
    257   }
    258 
    259         // standalone subscription
     254  // standalone subscription
    260255  if (isset($_POST['stc_submit']))
    261256  {
     
    269264        break;
    270265    }
     266    unset($_POST['stc_mode']);
    271267  }
    272268  else if (isset($_GET['stc_unsubscribe']))
     
    278274  }
    279275
     276  $tpl_vars = array(
     277    'ASK_MAIL' => is_a_guest() or empty($user['email']),
     278    'ON_ALBUM' => true,
     279    'ALLOW_GLOBAL' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'] || is_admin(),
     280    );
     281
     282  if (!empty($_POST['stc_mode']))
     283  {
     284    $tpl_vars['MODE'] = $_POST['stc_mode'];
     285  }
     286
    280287  // if registered user we check if already subscribed
    281   if ( !is_a_guest() and !empty($user['email']) )
    282   {
    283     $element_url = make_index_url(array(
    284       'section' => 'categories',
    285       'category' => $page['category'],
    286       ));
    287 
     288  if (!is_a_guest() and !empty($user['email']))
     289  {
    288290    $subscribed = false;
    289291
     
    322324    if ($subscribed)
    323325    {
    324       $template->assign(array(
    325         'SUBSCRIBED' => $subscribed,
    326         'UNSUB_LINK' => add_url_params($element_url, array('stc_unsubscribe'=>$stc_id)),
     326      $element_url = make_index_url(array(
     327        'section' => 'categories',
     328        'category' => $page['category'],
    327329        ));
    328     }
    329   }
    330   else
    331   {
    332     $template->assign('STC_ASK_MAIL', true);
     330
     331      $tpl_vars['SUBSCRIBED'] = $subscribed;
     332      $tpl_vars['U_UNSUB'] = add_url_params($element_url, array('stc_unsubscribe'=>$stc_id));
     333    }
    333334  }
    334335
    335336  $template->assign(array(
    336     'STC_ON_ALBUM' => true,
    337     'STC_ALLOW_GLOBAL' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'] || is_admin(),
     337    'STC' => $tpl_vars,
    338338    'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH,
    339339    ));
     
    346346 * main prefilter
    347347 */
    348 function stc_main_prefilter($content, &$smarty)
     348function stc_main_prefilter($content)
    349349{
    350350  ## subscribe at any moment ##
    351   $search = '{if isset($comments)}';
    352   $replace = file_get_contents(SUBSCRIBE_TO_PATH.'template/form_standalone.tpl');
    353   $content = str_replace($search, $replace.$search, $content);
     351  $search = '{if isset($comment_add)}';
     352  $add = file_get_contents(SUBSCRIBE_TO_PATH.'template/form_outside.tpl');
     353  $content = str_replace($search, $search.$add, $content);
    354354
    355355  ## subscribe while add a comment ##
    356356  $search = '{$comment_add.CONTENT}</textarea></p>';
    357   $replace = file_get_contents(SUBSCRIBE_TO_PATH.'template/form_comment.tpl');
    358   $content = str_replace($search, $search.$replace, $content);
     357  $add = file_get_contents(SUBSCRIBE_TO_PATH.'template/form_inside.tpl');
     358  $content = str_replace($search, $search.$add, $content);
    359359
    360360  return $content;
  • extensions/Subscribe_to_comments/include/functions.inc.php

    r26141 r26144  
    9393  }
    9494
    95   $comm['author'] = trigger_event('render_comment_author', $comm['author']);
    96   $comm['content'] = trigger_event('render_comment_content', $comm['content']);
     95  $comm['author'] = trigger_change('render_comment_author', $comm['author']);
     96  $comm['content'] = trigger_change('render_comment_content', $comm['content']);
    9797
    9898  include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     
    452452    $element['name'] = get_name_from_file($element['file']);
    453453  }
    454   $element['name'] = trigger_event('render_element_name', $element['name']);
     454  $element['name'] = trigger_change('render_element_name', $element['name']);
    455455
    456456  $element['url'] = make_picture_url(array(
     
    504504    ));
    505505
    506   $element['name'] = trigger_event('render_category_name', $element['name']);
     506  $element['name'] = trigger_change('render_category_name', $element['name']);
    507507
    508508  if ($with_thumb)
     
    523523
    524524  return $element;
    525 }
    526 
    527 /**
    528  * get list of admins email
    529  * @return: string
    530  */
    531 function get_admins_email()
    532 {
    533   global $conf, $user;
    534 
    535   $admins = array();
    536 
    537   $query = '
    538 SELECT
    539     u.'.$conf['user_fields']['username'].' AS username,
    540     u.'.$conf['user_fields']['email'].' AS email
    541   FROM '.USERS_TABLE.' AS u
    542     JOIN '.USER_INFOS_TABLE.' AS i
    543       ON i.user_id =  u.'.$conf['user_fields']['id'].'
    544   WHERE i.status IN ("webmaster", "admin")
    545     AND '.$conf['user_fields']['email'].' IS NOT NULL
    546     AND i.user_id != '.$user['id'].'
    547   ORDER BY username
    548 ;';
    549 
    550   $datas = pwg_query($query);
    551   if (!empty($datas))
    552   {
    553     while ($admin = pwg_db_fetch_assoc($datas))
    554     {
    555       array_push($admins, format_email($admin['username'], $admin['email']));
    556     }
    557   }
    558 
    559   return implode(',', $admins);
    560525}
    561526
  • extensions/Subscribe_to_comments/include/subscriptions_page.inc.php

    r26141 r26144  
    1818  }
    1919}
    20 
    2120
    2221
     
    7372  }
    7473
    75   $template->assign('MANAGE_LINK', make_stc_url('manage', $_GET['email']));
     74  $self_url = make_stc_url('manage', $_GET['email']);
     75  $template->assign('U_MANAGE_SUBSCRIPTIONS', $self_url);
    7676}
    7777
     
    122122      }
    123123
    124       $template->assign(array(
     124      $template->assign('STC', array(
    125125        'type' => $type,
    126126        'element' => $element,
     
    176176      }
    177177
    178       $template->assign(array(
     178      $template->assign('STC', array(
    179179        'type' => $type,
    180180        'element' => $element,
     
    202202      {
    203203        $subscription['registration_date'] = format_date($subscription['registration_date'], true);
     204        $subscription['U_UNSUB'] = add_url_params($self_url, array('unsubscribe'=>$subscription['id']));
     205        if ($subscription['validated']=='false')
     206        {
     207          $subscription['U_VALIDATE'] = add_url_params($self_url, array('validate'=>$subscription['id']));
     208        }
    204209
    205210        switch ($subscription['type'])
  • extensions/Subscribe_to_comments/language/en_UK/plugin.lang.php

    r26141 r26144  
    3232$lang['Stop receiving notifications'] = 'Stop receiving notifications';
    3333$lang['New subscription on %s'] = 'New subscription on %s';
    34 $lang['Subscribe to comments on %s'] = 'Subscribe to comments on %s';
    3534$lang['You requested to subscribe by email to comments on %s.'] = 'You requested to subscribe by email to comments on %s..';
    3635$lang['To activate, click the confirm button. If you believe this is an error, please just ignore this message.'] = 'To activate, click the confirm button. If you believe this is an error, please just ignore this message.';
     
    5453$lang['Apply action'] = 'Apply action';
    5554$lang['Choose an action'] = 'Choose an action';
     55$lang['Subscribe without commenting'] = 'Subscribe without commenting';
    5656
    5757?>
  • extensions/Subscribe_to_comments/language/fr_FR/plugin.lang.php

    r26142 r26144  
    4242$lang['New comment on %s'] = 'Nouveau commentaire sur %s';
    4343$lang['Stop receiving notifications'] = 'Arrêter de recevoir les notifications';
    44 $lang['Subscribe to comments on %s'] = 'Inscriptions aux commentaires de %s';
    4544$lang['Subscriptions of %s'] = 'Inscriptions de %s';
    4645$lang['You are currently subscribed to comments on %s.'] = 'Vous êtes inscrits aux commentaires sur %s.';
     
    5049$lang['All album photos'] = 'Toutes les images d\'un album';
    5150$lang['&#9733; : registered users'] = '&#9733; : utilisateurs enregistrées';
    52 
     51$lang['Subscribe without commenting'] = 'S\'inscrire sans commenter';
    5352$lang['No result'] = 'Aucun résultat';
    5453$lang['<b>%s</b> wrote on <i>%s</i>'] = '<b>%s</b> a écrit le <i>%s</i>';
    5554$lang['Apply action'] = 'Appliquer l\'action';
    5655$lang['Choose an action'] = 'Choisir une action';
     56
    5757?>
  • extensions/Subscribe_to_comments/main.inc.php

    r26139 r26144  
    5050    // subscribe
    5151    add_event_handler('loc_end_picture', 'stc_on_picture');
    52     add_event_handler('loc_begin_coa', 'stc_on_album');
     52    add_event_handler('loc_end_coa', 'stc_on_album');
    5353
    5454    // management
  • extensions/Subscribe_to_comments/template/form_inside.tpl

    r26140 r26144  
    1 {if !$SUBSCRIBED}
     1{if isset($STC.SUBSCRIBED)}
     2{strip}
     3  {if $STC.SUBSCRIBED=='all-images'}
     4    {assign var=str value='all pictures of the gallery'|translate}
     5  {else if $STC.SUBSCRIBED=='album-images'}
     6    {assign var=str value='all pictures of this album'|translate}
     7  {else if $STC.SUBSCRIBED=='image'}
     8    {assign var=str value='this picture'|translate}
     9  {else if $STC.SUBSCRIBED=='all-albums'}
     10    {assign var=str value='all albums of the gallery'|translate}
     11  {else if $STC.SUBSCRIBED=='album'}
     12    {assign var=str value='this album'|translate}
     13  {/if}
     14{/strip}
     15<p>
     16  {'You are currently subscribed to comments on %s.'|translate:$str}
     17  <a href="{$STC.U_UNSUB}">{'Unsubscribe'|translate}</a>
     18</p>
    219
     20{else}
    321<p>
    422  {'Notify me of followup comments'|translate} :<br>
    5   <label><input type="radio" name="stc_mode" value="-1" {if !$STC_MODE}checked{/if}> {'No'|translate}</label>
    6   {if $STC_ON_PICTURE}
    7     {if $STC_ALLOW_GLOBAL}
    8       <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE=="image"}checked{/if}> {'this picture'|translate}</label>
    9       {if $STC_ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images" {if $STC_MODE=="album-images"}checked{/if}> {'all pictures of this album'|translate}</label>{/if}
    10       <label><input type="radio" name="stc_mode" value="all-images" {if $STC_MODE=="all-images"}checked{/if}> {'all pictures of the gallery'|translate}</label>
     23  <label><input type="radio" name="stc_mode" value="-1" {if !$STC.MODE}checked{/if}> {'No'|translate}</label>
     24  {if $STC.ON_PICTURE}
     25    {if $STC.ALLOW_GLOBAL}
     26      <label><input type="radio" name="stc_mode" value="image" {if $STC.MODE=="image"}checked{/if}> {'this picture'|translate}</label>
     27      {if $STC.ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images" {if $STC.MODE=="album-images"}checked{/if}> {'all pictures of this album'|translate}</label>{/if}
     28      <label><input type="radio" name="stc_mode" value="all-images" {if $STC.MODE=="all-images"}checked{/if}> {'all pictures of the gallery'|translate}</label>
    1129    {else}
    12       <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE=="image"}checked{/if}> {'Yes'|translate}</label>
     30      <label><input type="radio" name="stc_mode" value="image" {if $STC.MODE=="image"}checked{/if}> {'Yes'|translate}</label>
    1331    {/if}
    14   {elseif $STC_ON_ALBUM}
    15     {if $STC_ALLOW_GLOBAL}
    16       <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE=="album"}checked{/if}> {'this album'|translate}</label>
    17       <label><input type="radio" name="stc_mode" value="all-albums" {if $STC_MODE=="all-albums"}checked{/if}> {'all albums of the gallery'|translate}</label>
     32  {else if $STC.ON_ALBUM}
     33    {if $STC.ALLOW_GLOBAL}
     34      <label><input type="radio" name="stc_mode" value="album" {if $STC.MODE=="album"}checked{/if}> {'this album'|translate}</label>
     35      <label><input type="radio" name="stc_mode" value="all-albums" {if $STC.MODE=="all-albums"}checked{/if}> {'all albums of the gallery'|translate}</label>
    1836    {else}
    19       <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE=="album"}checked{/if}> {'Yes'|translate}</label>
     37      <label><input type="radio" name="stc_mode" value="album" {if $STC.MODE=="album"}checked{/if}> {'Yes'|translate}</label>
    2038    {/if}
    2139  {/if}
    2240</p>
    23 
    24 {if $STC_ASK_MAIL}
    25 {footer_script require='jquery'}
    26 (function($){
    27         var $stc_email_input = $("#addComment input[name='email']");
    28   var stc_bordercolor = $stc_email_input.css('border-color');
    29 
    30   $("#addComment input[name='stc_mode']").change(function() {
    31     if ($(this).val() != "-1") {
    32       if ($stc_email_input.val()=="") {
    33         $stc_email_input.css("border-color", "red");
    34       }
    35     }
    36     else {
    37       $stc_email_input.css("border-color", stc_bordercolor);
    38     }
    39   });
    40   $stc_email_input.change(function() {
    41     $(this).css('border-color', stc_bordercolor);
    42   });
    43 }(jQuery));
    44 {/footer_script}
    45 {/if}
     41<p>
     42  <a href="#stc_standalone" id="open_stc_standalone" title="{'Subscribe to mail notifications'|translate}">{'Subscribe without commenting'|translate}</a>
     43</p>
    4644
    4745{/if}
  • extensions/Subscribe_to_comments/template/form_outside.tpl

    r26140 r26144  
    1 {combine_css path=$SUBSCRIBE_TO_PATH|cat:'template/style_form.css'}
     1{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
     2{combine_css id='colorbox' path='themes/default/js/plugins/colorbox/style2/colorbox.css'}
    23
    3 {if $STC_ALLOW_GLOBAL}
    4 {footer_script require='jquery'}
    5   jQuery("#stc_submit").hide();
    6   jQuery("#stc_standalone input[name='stc_mode']").change(function() {
    7     jQuery("#stc_submit").show();
     4{footer_script require='jquery,jquery.colorbox'}
     5(function($){
     6  $('#open_stc_standalone').colorbox({
     7    inline: true
    88  });
    9 {/footer_script}
     9
     10  var bg_color = 'white';
     11  $.each(['#the_page #content', 'body'], function(i, selector) {
     12    var color = $(selector).css('background-color');
     13    if (color && color!='transparent') {
     14      bg_color = color;
     15      return false;
     16    }
     17  });
     18  $('#stc_standalone').css('background-color', bg_color);
     19
     20{if $STC.ALLOW_GLOBAL}
     21  $("#stc_submit").hide();
     22  $("#stc_standalone input[name='stc_mode']").change(function() {
     23    $("#stc_submit").show();
     24    $.colorbox.resize({ speed:0 });
     25  });
    1026{/if}
    1127
    12 {if isset($comment_add)}
    13 <div id="pictureCommentList">
    14 <form method="post" action="{$comment_add.F_ACTION}" id="stc_standalone">
    15   <fieldset>{strip}
    16   {if $SUBSCRIBED}
    17     {if $SUBSCRIBED=='all-images'}
    18       {assign var=str value='all pictures of the gallery'|translate}
    19     {elseif $SUBSCRIBED=='album-images'}
    20       {assign var=str value='all pictures of this album'|translate}
    21     {elseif $SUBSCRIBED=='image'}
    22       {assign var=str value='this picture'|translate}
    23     {elseif $SUBSCRIBED=='all-albums'}
    24       {assign var=str value='all albums of the gallery'|translate}
    25     {elseif $SUBSCRIBED=='album'}
    26       {assign var=str value='this album'|translate}
     28{if !isset($STC_SUBSCRIBED) and $STC.ASK_MAIL}
     29        var $stc_email_input = $("#addComment input[name='email']");
     30  var stc_bordercolor = $stc_email_input.css('border-color');
     31
     32  $("#addComment input[name='stc_mode']").change(function() {
     33    if ($(this).val() != "-1") {
     34      if ($stc_email_input.val()=="") {
     35        $stc_email_input.css("border-color", "red");
     36      }
     37    }
     38    else {
     39      $stc_email_input.css("border-color", stc_bordercolor);
     40    }
     41  });
     42  $stc_email_input.change(function() {
     43    $(this).css('border-color', stc_bordercolor);
     44  });
     45{/if}
     46}(jQuery));
     47{/footer_script}
     48
     49<div style="display:none">
     50  <form method="post" action="{$comment_add.F_ACTION}" id="stc_standalone" style="padding:10px;min-width:350px;">
     51  {if $STC.ON_PICTURE}
     52    {if $STC.ALLOW_GLOBAL}
     53      <label><input type="radio" name="stc_mode" value="image"> {'this picture'|translate}</label>
     54      {if $STC.ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images"> {'all pictures of this album'|translate}</label>{/if}
     55      <label><input type="radio" name="stc_mode" value="all-images"> {'all pictures of the gallery'|translate}</label>
     56    {else}
     57      <input type="hidden" name="stc_mode" value="image">
    2758    {/if}
    28 
    29     {'You are currently subscribed to comments on %s.'|translate|sprintf:$str}
    30     <a href="{$UNSUB_LINK}">{'Unsubscribe'|translate}</a>
    31   {else}
    32     <legend>{'Subscribe to mail notifications'|translate}</legend>
    33     {if $STC_ON_PICTURE}
    34       {if $STC_ALLOW_GLOBAL}
    35         <label><input type="radio" name="stc_mode" value="image"> {'this picture'|translate}</label>
    36         {if $STC_ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images"> {'all pictures of this album'|translate}</label>{/if}
    37         <label><input type="radio" name="stc_mode" value="all-images"> {'all pictures of the gallery'|translate}</label>
    38       {else}
    39         <input type="hidden" name="stc_mode" value="image">
    40       {/if}
    41     {elseif $STC_ON_ALBUM}
    42       {if $STC_ALLOW_GLOBAL}
    43         <label><input type="radio" name="stc_mode" value="album"> {'this album'|translate}</label>
    44         <label><input type="radio" name="stc_mode" value="all-albums"> {'all albums of the gallery'|translate}</label>
    45       {else}
    46         <input type="hidden" name="stc_mode" value="album">
    47       {/if}
     59  {else if $STC.ON_ALBUM}
     60    {if $STC.ALLOW_GLOBAL}
     61      <label><input type="radio" name="stc_mode" value="album"> {'this album'|translate}</label>
     62      <label><input type="radio" name="stc_mode" value="all-albums"> {'all albums of the gallery'|translate}</label>
     63    {else}
     64      <input type="hidden" name="stc_mode" value="album">
    4865    {/if}
    49     {if $STC_ALLOW_GLOBAL and $STC_ASK_MAIL}<br>{/if}
     66  {/if}
     67    {if $STC.ALLOW_GLOBAL and $STC.ASK_MAIL}<br>{/if}
    5068    <span id="stc_submit">
    51     {if $STC_ASK_MAIL}
    52         <label>{'Email'|translate} <input type="text" name="stc_mail" size="30"></label>
     69    {if $STC.ASK_MAIL}
     70      <label>{'Email'|translate} <input type="text" name="stc_mail" size="30"></label>
    5371    {/if}
    5472      <label><input type="submit" name="stc_submit" value="{'Subscribe'|translate}"></label>
    5573    </span>
    56   {/if}
    57   {/strip}</fieldset>
    58 </form>
     74  </form>
    5975</div>
    60 {/if}
  • extensions/Subscribe_to_comments/template/subscriptions_page.tpl

    r26140 r26144  
    44{if $IN_VALIDATE or $IN_UNSUBSCRIBE}
    55<p>
    6   {if !empty($element)}<a href="{$element.url}" title="{$element.name}">{'Return to item page'|@translate}</a><br>{/if}
    7   <a href="{$MANAGE_LINK}">{'Manage my subscriptions'|@translate}</a>
     6  {if !empty($STC.element)}<a href="{$STC.element.url}" title="{$STC.element.name}">{'Return to item page'|translate}</a><br>{/if}
     7  <a href="{$U_MANAGE_SUBSCRIPTIONS}">{'Manage my subscriptions'|translate}</a>
    88</p>
    99
    1010{else}
    11 <form action="{$MANAGE_LINK}" method="post">
     11<form action="{$U_MANAGE_SUBSCRIPTIONS}" method="post">
    1212  {if !empty($global_subscriptions)}
    1313  <fieldset>
    14     <legend>{'Global subscriptions'|@translate}</legend>
     14    <legend>{'Global subscriptions'|translate}</legend>
    1515    <table class="subscriptions_list">
    1616      {foreach from=$global_subscriptions item=sub name=subs_loop}
     
    1818        <td>
    1919          {if $sub.type == 'all-images'}
    20             {assign var=str value='all pictures of the gallery'|@translate}
     20            {assign var=str value='all pictures of the gallery'|translate}
    2121            <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png">
    2222          {else $sub.type == 'all-albums'}
    23             {assign var=str value='all albums of the gallery'|@translate}
     23            {assign var=str value='all albums of the gallery'|translate}
    2424            <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png">
    2525          {/if}
    26           {'You are currently subscribed to comments on %s.'|@translate|sprintf:$str}
     26          {'You are currently subscribed to comments on %s.'|translate:$str}
    2727        </td>
    2828        <td style="white-space:nowrap;">
    2929          <div class="actions">
    30             <a href="{$MANAGE_LINK}&amp;unsubscribe={$sub.id}" class="unsub">{'Unsubscribe'|@translate}</a>
    31             {if $sub.validated == 'false'}<br> <a href="{$MANAGE_LINK}&amp;validate={$sub.id}">{'Validate'|@translate}</a>{/if}
     30            <a href="{$sub.U_UNSUB}" class="unsub">{'Unsubscribe'|translate}</a>
     31            {if $sub.U_VALIDATE}<br> <a href="{$sub.U_VALIDATE}">{'Validate'|translate}</a>{/if}
    3232          </div>
    3333        </td>
     
    4343  {if !empty($subscriptions)}
    4444  <fieldset>
    45     <legend>{'Manage my subscriptions'|@translate}</legend>
     45    <legend>{'Manage my subscriptions'|translate}</legend>
    4646    <table class="subscriptions_list">
    4747      <tr class="header">
    4848        <th class="chkb"><input type="checkbox" id="check_all"></th>
    49         <th colspan="2" class="info">{'Subject'|@translate}</th>
    50         <th class="date">{'Followed on'|@translate}</th>
     49        <th colspan="2" class="info">{'Subject'|translate}</th>
     50        <th class="date">{'Followed on'|translate}</th>
    5151      </tr>
    5252
     
    6060
    6161          <div class="actions">
    62             <a href="{$MANAGE_LINK}&amp;unsubscribe={$sub.id}" class="unsub">{'Unsubscribe'|@translate}</a>
    63             {if $sub.validated == 'false'}| <a href="{$MANAGE_LINK}&amp;validate={$sub.id}">{'Validate'|@translate}</a>{/if}
     62            <a href="{$sub.U_UNSUB}" class="unsub">{'Unsubscribe'|translate}</a>
     63            {if $sub.U_VALIDATE}<br> <a href="{$sub.U_VALIDATE}">{'Validate'|translate}</a>{/if}
    6464          </div>
    6565        </td>
     
    7272      <tr class="footer {if $smarty.foreach.subs_loop.index is odd}row1{else}row2{/if}"><td colspan="4">
    7373        <select name="action">
    74           <option value="-1">{'Choose an action'|@translate}</option>
    75           <option value="unsubscribe">{'Unsubscribe'|@translate}</option>
    76           <option value="validate">{'Validate'|@translate}</option>
     74          <option value="-1">{'Choose an action'|translate}</option>
     75          <option value="unsubscribe">{'Unsubscribe'|translate}</option>
     76          <option value="validate">{'Validate'|translate}</option>
    7777        </select>
    78         <input type="submit" name="apply_bulk" value="{'Apply action'|@translate}">
     78        <input type="submit" name="apply_bulk" value="{'Apply action'|translate}">
    7979      </td></tr>
    8080    </table>
    8181
    8282    <p>
    83       <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png"> {'comments on a picture'|@translate}.
    84       <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album-images.png"> {'comments on all pictures of an album'|@translate}.
    85       {if $COA_ACTIVATED}<img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png"> {'comments on an album'|@translate}.{/if}
     83      <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png"> {'comments on a picture'|translate}.
     84      <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album-images.png"> {'comments on all pictures of an album'|translate}.
     85      {if $COA_ACTIVATED}<img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png"> {'comments on an album'|translate}.{/if}
    8686    </p>
    8787  </fieldset>
     
    9090  {if !empty($global_subscriptions) or !empty($subscriptions)}
    9191    <p>
    92       <label><input type="checkbox" name="unsubscribe_all_check" value="1"> {'Unsubscribe from all email notifications'|@translate}</label>
    93       <input type="submit" name="unsubscribe_all" value="{'Submit'|@translate}">
     92      <label><input type="checkbox" name="unsubscribe_all_check" value="1"> {'Unsubscribe from all email notifications'|translate}</label>
     93      <input type="submit" name="unsubscribe_all" value="{'Submit'|translate}">
    9494    </p>
    9595  {/if}
Note: See TracChangeset for help on using the changeset viewer.