Changeset 21340
- Timestamp:
- Mar 7, 2013, 10:06:42 PM (11 years ago)
- Location:
- extensions/Subscribe_to_comments
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Subscribe_to_comments/include/functions.inc.php
r17921 r21340 157 157 158 158 // check email 159 if ( !empty($email) and ! is_valid_email($email) )159 if ( !empty($email) and !email_check_format($email) ) 160 160 { 161 161 array_push($page['errors'], l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)')); … … 172 172 } 173 173 174 // search if already registered (can use ODKU because we want to get the id of inserted OR updated row)174 // search if already registered (can't use ODKU because we want to get the id of inserted OR updated row) 175 175 $query = ' 176 176 SELECT id … … 213 213 214 214 // notify admins 215 if ( pwg_db_changes( null) != 0 and $conf['Subscribe_to_Comments']['notify_admin_on_subscribe'] )215 if ( pwg_db_changes() != 0 and $conf['Subscribe_to_Comments']['notify_admin_on_subscribe'] ) 216 216 { 217 217 stc_mail_notification_admins($email, $type, $element_id, $inserted_id); … … 219 219 220 220 // send validation mail 221 if ( is_a_guest() and pwg_db_changes( null) != 0 )221 if ( is_a_guest() and pwg_db_changes() != 0 ) 222 222 { 223 223 set_make_full_url(); … … 267 267 } 268 268 // just display confirmation message 269 else if (pwg_db_changes( null) != 0)269 else if (pwg_db_changes() != 0) 270 270 { 271 271 array_push($page['infos'], l10n('You have been added to the list of subscribers.')); … … 285 285 function un_subscribe_to_comments($email, $id) 286 286 { 287 if (empty($id)) 288 { 289 trigger_error('un_subscribe_to_comment: missing id', E_USER_WARNING); 287 if ( !empty($email) and !email_check_format($email) ) 288 { 289 trigger_error('un_subscribe_to_comment: bad email', E_USER_WARNING); 290 return false; 291 } 292 293 if (!preg_match('#^[0-9]+$#', $id)) 294 { 295 trigger_error('un_subscribe_to_comment: bad id', E_USER_WARNING); 290 296 return false; 291 297 } … … 308 314 WHERE 309 315 email = "'.pwg_db_real_escape_string($email).'" 310 AND id = "'.pwg_db_real_escape_string($id).'"316 AND id = '.$id.' 311 317 ;'; 312 318 pwg_query($query); 313 314 if (pwg_db_changes(null) != 0) return true; 315 return false; 319 320 return (pwg_db_changes() != 0); 316 321 } 317 322 … … 325 330 function validate_subscriptions($email, $id) 326 331 { 327 if ( empty($email))328 { 329 trigger_error('validate_subscriptions: missingemail', E_USER_WARNING);330 return false; 331 } 332 333 if ( empty($id))334 { 335 trigger_error('validate_subscriptions: missingid', E_USER_WARNING);332 if (!email_check_format($email)) 333 { 334 trigger_error('validate_subscriptions: bad email', E_USER_WARNING); 335 return false; 336 } 337 338 if (!preg_match('#^[0-9]+$#', $id)) 339 { 340 trigger_error('validate_subscriptions: bad id', E_USER_WARNING); 336 341 return false; 337 342 } … … 342 347 WHERE 343 348 email = "'.pwg_db_real_escape_string($email).'" 344 AND id = '. pwg_db_real_escape_string($id).'349 AND id = '.$id.' 345 350 ;'; 346 351 pwg_query($query); 347 348 if (pwg_db_changes(null) != 0) return true; 349 return false; 352 353 return (pwg_db_changes() != 0); 350 354 } 351 355 … … 371 375 $template->set_filename('stc_mail', dirname(__FILE__).'/../template/mail/admin.tpl'); 372 376 373 $subject = '['.strip_tags($conf['gallery_title']).'] '.sprintf(l10n('%s has subscribed to comments on '), is_a_guest()?$email:$user['username']);377 $subject = '['.strip_tags($conf['gallery_title']).'] '.sprintf(l10n('%s has subscribed to comments on %s.'), is_a_guest()?$email:$user['username'], null); 374 378 375 379 switch ($type) … … 401 405 $template->assign('STC', array( 402 406 'ELEMENT' => $element['on'], 403 'USER' => sprintf(l10n('%s has subscribed to comments on'), is_a_guest() ? '<b>'.$email.'</b>' : '<b>'.$user['username'].'</b> ('.$email.')'),407 'USER' => is_a_guest() ? '<b>'.$email.'</b>' : '<b>'.$user['username'].'</b> ('.$email.')', 404 408 'GALLERY_TITLE' => $conf['gallery_title'], 405 409 'TECHNICAL' => implode('<br>', $technical_infos), … … 504 508 $headers.= 'MIME-Version: 1.0'."\n"; 505 509 $headers.= 'X-Mailer: Piwigo Mailer'."\n"; 506 // $headers.= 'Content-Transfer-Encoding: Quoted-Printable'."\n";507 510 $headers.= 'Content-Transfer-Encoding: 8bit'."\n"; 508 511 $headers.= 'Content-Type: text/html; charset="'.get_pwg_charset().'";'."\n"; … … 523 526 $content = $template->parse('stc_mail_header', true) . $content . $template->parse('stc_mail_footer', true); 524 527 525 // $content = quoted_printable_encode($content); 526 $content = wordwrap($content, 70, "\n", true); 528 $content = wordwrap($content, 70, "\n", false); 527 529 528 530 unset_make_full_url(); … … 687 689 688 690 /** 689 * check if mail adress is valid690 * @param: string email691 * @return: bool692 */693 if (!function_exists('is_valid_email'))694 {695 function is_valid_email($mail_address)696 {697 if (version_compare(PHP_VERSION, '5.2.0') >= 0)698 {699 return filter_var($mail_address, FILTER_VALIDATE_EMAIL)!==false;700 }701 else702 {703 $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase704 $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name705 $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';706 707 if (!preg_match($regex, $mail_address)) return false;708 return true;709 }710 }711 }712 713 714 /**715 691 * crypt a string using mcrypt extension or 716 692 * http://stackoverflow.com/questions/800922/how-to-encrypt-string-without-mcrypt-library-in-php/802957#802957 -
extensions/Subscribe_to_comments/include/subscribe_to_comments.inc.php
r17350 r21340 7 7 function stc_detect_section() 8 8 { 9 global $tokens, $page ;9 global $tokens, $page, $conf; 10 10 11 11 if ($tokens[0] == 'subscriptions') 12 12 { 13 add_event_handler('loc_begin_page_header', 'stc_page_header'); 14 13 15 $page['section'] = 'subscriptions'; 14 16 $page['title'] = l10n('Comments notifications'); 15 } 17 $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].l10n('Comments notifications'); 18 } 19 } 20 21 function stc_page_header() 22 { 23 global $page; 24 $page['body_id'] = 'theSubscriptionsPage'; 16 25 } 17 26 … … 49 58 { 50 59 case 'all-images': 51 subscribe_to_comments(@$_POST[' stc_mail'], 'all-images');60 subscribe_to_comments(@$_POST['email'], 'all-images'); 52 61 break; 53 62 case 'album-images': 54 63 if (empty($page['category']['id'])) break; 55 subscribe_to_comments(@$_POST[' stc_mail'], 'album-images', $page['category']['id']);64 subscribe_to_comments(@$_POST['email'], 'album-images', $page['category']['id']); 56 65 break; 57 66 case 'image': 58 subscribe_to_comments(@$_POST[' stc_mail'], 'image', $comm['image_id']);67 subscribe_to_comments(@$_POST['email'], 'image', $comm['image_id']); 59 68 break; 60 69 } … … 65 74 { 66 75 case 'all-albums': 67 subscribe_to_comments(@$_POST[' stc_mail'], 'all-albums');76 subscribe_to_comments(@$_POST['email'], 'all-albums'); 68 77 break; 69 78 case 'album': 70 subscribe_to_comments(@$_POST[' stc_mail'], 'album', $comm['category_id']);79 subscribe_to_comments(@$_POST['email'], 'album', $comm['category_id']); 71 80 break; 72 81 } … … 76 85 { 77 86 $template->assign('STC_MODE', $_POST['stc_mode']); 78 $template->assign('STC_MAIL', @$_POST['stc_mail']);79 87 } 80 88 } … … 239 247 } 240 248 241 $template->assign('STC_ON_PICTURE', true); 242 if ( !empty($page['category']['id']) ) $template->assign('STC_ALLOW_ALBUM_IMAGES', true); 243 if ( $conf['Subscribe_to_Comments']['allow_global_subscriptions'] or is_admin() ) $template->assign('STC_ALLOW_GLOBAL', true); 249 $template->assign(array( 250 'STC_ON_PICTURE' => true, 251 'STC_ALLOW_ALBUM_IMAGES' => !empty($page['category']['id']), 252 'STC_ALLOW_GLOBAL' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'] || is_admin(), 253 'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH, 254 )); 244 255 245 256 $template->set_prefilter('picture', 'stc_main_prefilter'); … … 263 274 } 264 275 276 // standalone subscription 265 277 if (isset($_POST['stc_submit'])) 266 278 { … … 346 358 } 347 359 348 $template->assign('STC_ON_ALBUM', true); 349 if ( $conf['Subscribe_to_Comments']['allow_global_subscriptions'] or is_admin() ) $template->assign('STC_ALLOW_GLOBAL', true); 360 $template->assign(array( 361 'STC_ON_ALBUM' => true, 362 'STC_ALLOW_GLOBAL' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'] || is_admin(), 363 'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH, 364 )); 350 365 351 366 $template->set_prefilter('comments_on_albums', 'stc_main_prefilter'); -
extensions/Subscribe_to_comments/include/subscribtions_page.inc.php
r17494 r21340 5 5 6 6 // check input parameters 7 $_GET['verif_key'] = $_GET['action'].$_GET['email'].(isset($_GET['id'])?$_GET['id']:null); 8 9 if ( 10 empty($_GET['action']) or empty($_GET['email']) or empty($_GET['key']) 11 or decrypt_value($_GET['key'], $conf['secret_key']) !== $_GET['verif_key'] 12 ) 7 if ( empty($_GET['action']) or empty($_GET['email']) or empty($_GET['key']) ) 13 8 { 14 9 $_GET['action'] = null; 15 10 } 16 11 else 12 { 13 $_GET['verif_key'] = $_GET['action'].$_GET['email'].(isset($_GET['id'])?$_GET['id']:null); 14 15 if ( decrypt_value($_GET['key'], $conf['secret_key']) !== $_GET['verif_key'] ) 16 { 17 $_GET['action'] = null; 18 } 19 } 20 21 22 23 if ( !empty($_GET['action']) ) 17 24 { 18 25 // unsubscribe all … … 27 34 28 35 // bulk action 29 if (isset($_POST['apply_bulk']))36 else if (isset($_POST['apply_bulk'])) 30 37 { 31 38 foreach ($_POST['selected'] as $id) … … 44 51 45 52 // unsubscribe from manage page 46 if (isset($_GET['unsubscribe']))53 else if (isset($_GET['unsubscribe'])) 47 54 { 48 55 if (un_subscribe_to_comments($_GET['email'], $_GET['unsubscribe'])) … … 52 59 else 53 60 { 54 array_push($page['errors'], l10n('Not found.'));61 array_push($page['errors'], l10n('Not found.')); 55 62 } 56 63 } 57 64 58 65 // validate from manage page 59 if (isset($_GET['validate']))66 else if (isset($_GET['validate'])) 60 67 { 61 68 if (validate_subscriptions($_GET['email'], $_GET['validate'])) … … 78 85 case 'validate': 79 86 { 80 $query = ' 81 SELECT 82 type, 83 element_id 87 // don't need to sanitize inputs, already checked with the unique key 88 $query = ' 89 SELECT type, element_id 84 90 FROM '.SUBSCRIBE_TO_TABLE.' 85 91 WHERE … … 238 244 239 245 $template->assign(array( 240 'TITLE' => l10n('Subscriptions of').' <i>'.$_GET['email'].'</i>',241 246 'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH, 242 247 'SUBSCRIBE_TO_ABS_PATH' => realpath(SUBSCRIBE_TO_PATH).'/', 243 248 )); 249 250 if (!empty($_GET['email'])) 251 { 252 $template->assign('TITLE', '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator']. 253 sprintf(l10n('Subscriptions of %s'), '<i>'.$_GET['email'].'</i>')); 254 } 244 255 245 256 $template->set_filenames(array('index'=> dirname(__FILE__).'/../template/subscribtions_page.tpl')); -
extensions/Subscribe_to_comments/language/en_UK/plugin.lang.php
r15648 r21340 2 2 3 3 $lang['Comments notifications'] = 'Comments notifications'; 4 5 /* messages */6 4 $lang['Invalid email adress, your are not subscribed to comments.'] = 'Invalid email adress, your are not subscribed to comments.'; 7 5 $lang['Confirm your subscribtion to comments'] = 'Confirm your subscribtion to comments'; … … 13 11 $lang['Please check your email inbox to confirm your subscription.'] = 'Please check your email inbox to confirm your subscription.'; 14 12 $lang['You have been added to the list of subscribers.'] = 'You have been added to the list of subscribers.'; 15 16 /* sprintf */17 13 $lang['the picture <a href="%s">%s</a>'] = 'the picture <a href="%s">%s</a>'; 18 14 $lang['all pictures of the album <a href="%s">%s</a>'] = 'all pictures of the album <a href="%s">%s</a>'; 19 15 $lang['the album <a href="%s">%s</a>'] = 'the album <a href="%s">%s</a>'; 20 $lang['%s has subscribed to comments on'] = '%s has subscribed to comments on'; 21 22 /* config */ 16 $lang['%s has subscribed to comments on %s.'] = '%s has subscribed to comments on %s.'; 23 17 $lang['Notify administrators when a user take a new subscription'] = 'Notify administrators when a user take a new subscription'; 24 18 $lang['Allow users to subscribe to global notifications'] = 'Allow users to subscribe to global notifications'; 25 26 /* comment form */27 19 $lang['Subscribe to mail notifications'] = 'Subscribe to mail notifications'; 28 20 $lang['Notify me of followup comments'] = 'Notify me of followup comments'; 29 $lang['You are currently subscribed to comments on '] = 'You are currently subscribed to comments on';21 $lang['You are currently subscribed to comments on %s.'] = 'You are currently subscribed to comments on %s.'; 30 22 $lang['this picture'] = 'this picture'; 31 23 $lang['all pictures of this album'] = 'all pictures of this album'; … … 33 25 $lang['this album'] = 'this album'; 34 26 $lang['all albums of the gallery'] = 'all albums of the gallery'; 35 36 /* buttons */37 27 $lang['Manage my subscriptions'] = 'Manage my subscriptions'; 38 28 $lang['Subscribe'] = 'Subscribe'; … … 40 30 $lang['Validate'] = 'Validate'; 41 31 $lang['Confirm subscription'] = 'Confirm subscription'; 42 43 /* email */ 44 $lang['New subscription on'] = 'New subscription on'; 45 $lang['Subscribe to comments on'] = 'Subscribe to comments on'; 46 $lang['You requested to subscribe by email to comments on'] = 'You requested to subscribe by email to comments on'; 32 $lang['Stop receiving notifications'] = 'Stop receiving notifications'; 33 $lang['New subscription on %s'] = 'New subscription on %s'; 34 $lang['Subscribe to comments on %s'] = 'Subscribe to comments on %s'; 35 $lang['You requested to subscribe by email to comments on %s'] = 'You requested to subscribe by email to comments on %s'; 47 36 $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.'; 48 37 $lang['Want to edit your notifications options?'] = 'Want to edit your notifications options?'; 49 $lang['New comment on'] = 'New comment on'; 50 51 /* manage page */ 52 $lang['Subscriptions of'] = 'Subscriptions of'; 38 $lang['New comment on %s'] = 'New comment on %s'; 39 $lang['Subscriptions of %s'] = 'Subscriptions of %s'; 53 40 $lang['Return to item page'] = 'Return to item page'; 41 $lang['Global subscriptions'] = 'Global subscriptions'; 54 42 $lang['Subject'] = 'Subject'; 55 43 $lang['Followed on'] = 'Followed on'; -
extensions/Subscribe_to_comments/main.inc.php
r17923 r21340 13 13 global $prefixeTable; 14 14 15 define('SUBSCRIBE_TO_PATH' , PHPWG_PLUGINS_PATH . 'Subscribe_to_Comments/');16 define('SUBSCRIBE_TO_TABLE', $prefixeTable . 'subscribe_to_comments');17 define('SUBSCRIBE_TO_VERSION', ' 2.0.3');15 define('SUBSCRIBE_TO_PATH' , PHPWG_PLUGINS_PATH . 'Subscribe_to_Comments/'); 16 define('SUBSCRIBE_TO_TABLE', $prefixeTable . 'subscribe_to_comments'); 17 define('SUBSCRIBE_TO_VERSION', 'auto'); 18 18 19 19 … … 30 30 // apply upgrade if needed 31 31 if ( 32 SUBSCRIBE_TO_VERSION == 'auto' or 32 33 $pwg_loaded_plugins['Subscribe_to_Comments']['version'] == 'auto' or 33 34 version_compare($pwg_loaded_plugins['Subscribe_to_Comments']['version'], SUBSCRIBE_TO_VERSION, '<') … … 37 38 stc_install(); 38 39 39 if ( $pwg_loaded_plugins['Subscribe_to_Comments']['version'] != 'auto')40 if ( $pwg_loaded_plugins['Subscribe_to_Comments']['version'] != 'auto' and SUBSCRIBE_TO_VERSION != 'auto' ) 40 41 { 41 42 $query = ' -
extensions/Subscribe_to_comments/template/form_comment.tpl
r15677 r21340 1 1 {if !$SUBSCRIBED_ALL_IMAGES && !$SUBSCRIBED_ALL_ALBUMS && !$SUBSCRIBED_ALBUM && !$SUBSCRIBED_ALBUM_IMAGES && !$SUBSCRIBED_IMAGE} 2 2 3 <p> 3 4 {'Notify me of followup comments'|@translate} :<br> … … 5 6 {if $STC_ON_PICTURE} 6 7 {if $STC_ALLOW_GLOBAL} 7 <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE =="image"}checked="checked"{/if}> {'this picture'|@translate}</label>8 {if $STC_ALLOW_ALBUM_IMAGES}<label><input type="radio" name="stc_mode" value="album-images" {if $STC_MODE =="album-images"}checked="checked"{/if}> {'all pictures of this album'|@translate}</label>{/if}9 <label><input type="radio" name="stc_mode" value="all-images" {if $STC_MODE =="all-images"}checked="checked"{/if}> {'all pictures of the gallery'|@translate}</label>8 <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE=="image"}checked="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="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="checked"{/if}> {'all pictures of the gallery'|@translate}</label> 10 11 {else} 11 <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE =="image"}checked="checked"{/if}> {'Yes'|@translate}</label>12 <label><input type="radio" name="stc_mode" value="image" {if $STC_MODE=="image"}checked="checked"{/if}> {'Yes'|@translate}</label> 12 13 {/if} 13 14 {elseif $STC_ON_ALBUM} 14 15 {if $STC_ALLOW_GLOBAL} 15 <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE =="album"}checked="checked"{/if}> {'this album'|@translate}</label>16 <label><input type="radio" name="stc_mode" value="all-albums" {if $STC_MODE =="all-albums"}checked="checked"{/if}> {'all albums of the gallery'|@translate}</label>16 <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE=="album"}checked="checked"{/if}> {'this album'|@translate}</label> 17 <label><input type="radio" name="stc_mode" value="all-albums" {if $STC_MODE=="all-albums"}checked="checked"{/if}> {'all albums of the gallery'|@translate}</label> 17 18 {else} 18 <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE =="album"}checked="checked"{/if}> {'Yes'|@translate}</label>19 <label><input type="radio" name="stc_mode" value="album" {if $STC_MODE=="album"}checked="checked"{/if}> {'Yes'|@translate}</label> 19 20 {/if} 20 21 {/if} … … 22 23 23 24 {if $STC_ASK_MAIL} 24 <p><label id="stc_mail" {if !$STC_MODE}style="display:none;"{/if}>{'Email address'|@translate} : <input type="text" name="stc_mail" value="{$STC_MAIL}"></label></p> 25 {footer_script require="jquery"}{literal} 26 jQuery(document).ready(function() { 27 $("#addComment input[name='stc_mode']").change(function() { 28 if ($(this).val() != "-1") 29 $("#stc_mail").css("display", ""); 30 else 31 $("#stc_mail").css("display", "none"); 32 }); 25 {footer_script require="jquery"}{literal} 26 var $stc_email_input = $("#addComment input[name='email']"); 27 var stc_bordercolor = $stc_email_input.css('border-color'); 28 29 $("#addComment input[name='stc_mode']").change(function() { 30 if ($(this).val() != "-1") { 31 if ($stc_email_input.val()=="") { 32 $stc_email_input.css("border-color", "red"); 33 } 34 } 35 else { 36 $stc_email_input.css("border-color", stc_bordercolor); 37 } 33 38 }); 34 {/literal}{/footer_script} 39 $stc_email_input.change(function() { 40 $(this).css('border-color', stc_bordercolor); 41 }); 42 {/literal}{/footer_script} 35 43 {/if} 44 36 45 {/if} -
extensions/Subscribe_to_comments/template/form_standalone.tpl
r15648 r21340 1 {combine_css path=$SUBSCRIBE_TO_PATH|@cat:'template/style_form.css'} 2 3 {if $STC_ALLOW_GLOBAL} 4 {footer_script require="jquery"}{literal} 5 jQuery("#stc_submit").hide(); 6 jQuery("#stc_standalone input[name='stc_mode']").change(function() { 7 jQuery("#stc_submit").show(); 8 }); 9 {/literal}{/footer_script} 10 {/if} 11 1 12 {if isset($comment_add)} 2 13 <div id="pictureCommentList"> 3 14 <form method="post" action="{$comment_add.F_ACTION}" id="stc_standalone"> 4 <fieldset> 15 <fieldset>{strip} 5 16 {if $SUBSCRIBED_ALL_IMAGES} 6 {'You are currently subscribed to comments on '|@translate} {'all pictures of the gallery'|@translate}.17 {'You are currently subscribed to comments on %s.'|@translate|sprintf:'all pictures of the gallery'|@translate} 7 18 <a href="{$MANAGE_LINK}">{'Manage my subscriptions'|@translate}</a> 8 19 9 20 {elseif $SUBSCRIBED_ALBUM_IMAGES} 10 {'You are currently subscribed to comments on '|@translate} {'all pictures of this album'|@translate}.21 {'You are currently subscribed to comments on %s.'|@translate|sprintf:'all pictures of this album'|@translate} 11 22 <a href="{$UNSUB_LINK}">{'Unsubscribe'|@translate}</a> 12 23 13 24 {elseif $SUBSCRIBED_IMAGE} 14 {'You are currently subscribed to comments on '|@translate} {'this picture'|@translate}.25 {'You are currently subscribed to comments on %s.'|@translate|sprintf:'this picture'|@translate} 15 26 <a href="{$UNSUB_LINK}">{'Unsubscribe'|@translate}</a> 16 27 17 28 {elseif $SUBSCRIBED_ALL_ALBUMS} 18 {'You are currently subscribed to comments on '|@translate} {'all albums of the gallery'|@translate}.29 {'You are currently subscribed to comments on %s.'|@translate|sprintf:'all albums of the gallery'|@translate} 19 30 <a href="{$MANAGE_LINK}">{'Manage my subscriptions'|@translate}</a> 20 31 21 32 {elseif $SUBSCRIBED_ALBUM} 22 {'You are currently subscribed to comments on '|@translate} {'this album'|@translate}.33 {'You are currently subscribed to comments on %s.'|@translate|sprintf:'this album'|@translate} 23 34 <a href="{$UNSUB_LINK}">{'Unsubscribe'|@translate}</a> 24 35 … … 42 53 {/if} 43 54 {if $STC_ALLOW_GLOBAL and $STC_ASK_MAIL}<br>{/if} 55 <span id="stc_submit"> 44 56 {if $STC_ASK_MAIL} 45 <label>{'Email address'|@translate} <input type="text" name="stc_mail" size="30"></label>57 <label>{'Email'|@translate} <input type="text" name="stc_mail" size="30"></label> 46 58 {/if} 47 <label><input type="submit" name="stc_submit" value="{'Subscribe'|@translate}"></label> 59 <label><input type="submit" name="stc_submit" value="{'Subscribe'|@translate}"></label> 60 </span> 48 61 {/if} 49 </fieldset>62 {/strip}</fieldset> 50 63 </form> 51 64 </div> -
extensions/Subscribe_to_comments/template/mail/admin.tpl
r15641 r21340 1 1 <div id="the_header"> 2 {'New subscription on '|@translate} <b>{$STC.GALLERY_TITLE}</b>2 {'New subscription on %s'|@translate|sprintf:$STC.GALLERY_TITLE}</b> 3 3 </div> 4 4 … … 7 7 <p> 8 8 {'Hi administrators,'|@translate}<br> 9 { $STC.USER} {$STC.ELEMENT}.9 {'%s has subscribed to comments on %s.'|@translate|sprintf:$STC.USER:$STC.ELEMENT} 10 10 </p> 11 11 -
extensions/Subscribe_to_comments/template/mail/confirm.tpl
r15648 r21340 1 1 <div id="the_header"> 2 {'Subscribe to comments on '|@translate} <b>{$STC.GALLERY_TITLE}</b>2 {'Subscribe to comments on %s'|@translate|sprintf:$STC.GALLERY_TITLE}</b> 3 3 </div> 4 4 5 5 <div id="the_content"> 6 6 7 <p>{'You requested to subscribe by email to comments on '|@translate} {$STC.element.on}.</p>7 <p>{'You requested to subscribe by email to comments on %s'|@translate|sprintf:$STC.element.on}.</p> 8 8 9 9 {if not empty($STC.element.thumbnail)} -
extensions/Subscribe_to_comments/template/mail/notification.tpl
r15648 r21340 1 1 <div id="the_header"> 2 {'New comment on '|@translate} <b>{$STC.GALLERY_TITLE}</b>2 {'New comment on %s'|@translate|sprintf:$STC.GALLERY_TITLE}</b> 3 3 </div> 4 4 -
extensions/Subscribe_to_comments/template/style.css
r15641 r21340 25 25 } 26 26 .subscriptions_list tr .actions { 27 display:none;27 visibility:hidden; 28 28 } 29 29 .subscriptions_list tr:hover .actions { 30 display:block;30 visibility:visible; 31 31 } 32 32 .subscriptions_list td.date { … … 68 68 69 69 70 71 70 .stc p { 72 71 text-align:center; -
extensions/Subscribe_to_comments/template/subscribtions_page.tpl
r17494 r21340 31 31 <td> 32 32 {if $sub.type == 'all-images'} 33 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png"> {'You are currently subscribed to comments on all pictures of the gallery.'|@translate}33 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png"> {'You are currently subscribed to comments on %s.'|@translate|sprintf:'all pictures of the gallery'|@translate} 34 34 {else $sub.type == 'all-albums'} 35 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png"> {'You are currently subscribed to comments on all albums of the gallery.'|@translate}35 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album.png"> {'You are currently subscribed to comments on %s.'|@translate|sprintf:'all albums of the gallery'|@translate} 36 36 {/if} 37 37 </td> 38 38 <td style="white-space:nowrap;"> 39 <a href="{$MANAGE_LINK}&unsubscribe={$sub.id}">{'Unsubscribe'|@translate}</a> 40 {if $sub.validated == 'false'}<br> <a href="{$MANAGE_LINK}&validate={$sub.id}">{'Validate'|@translate}</a>{/if} 39 <div class="actions"> 40 <a href="{$MANAGE_LINK}&unsubscribe={$sub.id}">{'Unsubscribe'|@translate}</a> 41 {if $sub.validated == 'false'}<br> <a href="{$MANAGE_LINK}&validate={$sub.id}">{'Validate'|@translate}</a>{/if} 42 </div> 41 43 </td> 42 44 <td style="white-space:nowrap;"> … … 61 63 {foreach from=$subscriptions item=sub name=subs_loop} 62 64 <tr class="{if $smarty.foreach.subs_loop.index is odd}row1{else}row2{/if} {if $sub.validated == 'false'}not-validated{/if}"> 63 <td class="chkb"><input type="checkbox" name="selected[]" value="{$sub.id}" ></td>64 <td class="thumb">< img src="{$sub.infos.thumbnail}" alt="{$sub.infos.name}" class="thumbnail"></td>65 <td class="chkb"><input type="checkbox" name="selected[]" value="{$sub.id}" id="sub-{$sub.id}"></td> 66 <td class="thumb"><label for="sub-{$sub.id}"><img src="{$sub.infos.thumbnail}" alt="{$sub.infos.name}" class="thumbnail"></label></td> 65 67 <td class="info"> 66 68 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/{$sub.type}.png"> 67 < a href="{$sub.infos.url}">{$sub.infos.name}</a>69 <b><a href="{$sub.infos.url}">{$sub.infos.name}</a></b> 68 70 69 71 <div class="actions"> … … 89 91 90 92 <p> 91 <b>Legend :</b>92 93 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/image.png"> {'comments on a picture'|@translate}. 93 94 <img src="{$ROOT_URL}{$SUBSCRIBE_TO_PATH}template/album-images.png"> {'comments on all pictures of an album'|@translate}. … … 101 102 <label><input type="checkbox" name="unsubscribe_all_check" value="1"> {'Unsubscribe from all email notifications'|@translate}</label> 102 103 <input type="submit" name="unsubscribe_all" value="{'Submit'|@translate}"> 104 </p> 103 105 {/if} 104 106 </form>
Note: See TracChangeset
for help on using the changeset viewer.