- Timestamp:
- Mar 7, 2013, 10:06:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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');
Note: See TracChangeset
for help on using the changeset viewer.