Changeset 21608 for extensions/Subscribe_to_comments
- Timestamp:
- Mar 16, 2013, 8:32:05 PM (12 years ago)
- Location:
- extensions/Subscribe_to_comments
- Files:
-
- 5 added
- 7 edited
- 3 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/Subscribe_to_comments/admin.php
r15641 r21608 1 1 <?php 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');2 if (!defined('SUBSCRIBE_TO_PATH')) die('Hacking attempt!'); 3 3 4 // +-----------------------------------------------------------------------+ 5 // Save configuration | 6 // +-----------------------------------------------------------------------+ 7 if (isset($_POST['config_submit'])) 8 { 9 $conf['Subscribe_to_Comments'] = array( 10 'notify_admin_on_subscribe' => isset($_POST['notify_admin_on_subscribe']), 11 'allow_global_subscriptions' => isset($_POST['allow_global_subscriptions']), 12 ); 13 14 conf_update_param('Subscribe_to_Comments', serialize($conf['Subscribe_to_Comments'])); 15 array_push($page['infos'], l10n('Information data registered in database')); 16 } 4 global $template, $page, $conf; 17 5 18 6 19 // +-----------------------------------------------------------------------+ 20 // Template | 21 // +-----------------------------------------------------------------------+ 7 // tabsheet 8 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 9 $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : 'subscriptions'; 10 11 $tabsheet = new tabsheet(); 12 $tabsheet->add('subscriptions', l10n('Manage'), SUBSCRIBE_TO_ADMIN . '-subscriptions'); 13 $tabsheet->add('config', l10n('Configuration'), SUBSCRIBE_TO_ADMIN . '-config'); 14 $tabsheet->select($page['tab']); 15 $tabsheet->assign(); 16 17 18 // include page 19 include(SUBSCRIBE_TO_PATH . 'admin/' . $page['tab'] . '.php'); 20 21 // template 22 22 $template->assign(array( 23 23 'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH, 24 'notify_admin_on_subscribe' => $conf['Subscribe_to_Comments']['notify_admin_on_subscribe'], 25 'allow_global_subscriptions' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'], 24 'SUBSCRIBE_TO_ADMIN' => SUBSCRIBE_TO_ADMIN, 26 25 )); 27 28 $template->set_filename('plugin_admin_content', dirname(__FILE__).'/template/admin.tpl'); 29 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 26 27 $template->assign_var_from_handle('ADMIN_CONTENT', 'stc_admin'); 30 28 31 29 ?> -
extensions/Subscribe_to_comments/admin/config.php
r21421 r21608 1 1 <?php 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');2 if (!defined('SUBSCRIBE_TO_PATH')) die('Hacking attempt!'); 3 3 4 4 // +-----------------------------------------------------------------------+ … … 20 20 // Template | 21 21 // +-----------------------------------------------------------------------+ 22 $template->assign(array( 23 'SUBSCRIBE_TO_PATH' => SUBSCRIBE_TO_PATH, 24 'notify_admin_on_subscribe' => $conf['Subscribe_to_Comments']['notify_admin_on_subscribe'], 25 'allow_global_subscriptions' => $conf['Subscribe_to_Comments']['allow_global_subscriptions'], 26 )); 22 $template->assign($conf['Subscribe_to_Comments']); 27 23 28 $template->set_filename('plugin_admin_content', dirname(__FILE__).'/template/admin.tpl'); 29 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 24 $template->set_filename('stc_admin', realpath(SUBSCRIBE_TO_PATH . 'admin/template/config.tpl')); 30 25 31 26 ?> -
extensions/Subscribe_to_comments/include/functions.inc.php
r21441 r21608 1 1 <?php 2 if (!defined(' PHPWG_ROOT_PATH')) die('Hacking attempt!');2 if (!defined('SUBSCRIBE_TO_PATH')) die('Hacking attempt!'); 3 3 4 4 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); … … 90 90 $subject = '['.strip_tags($conf['gallery_title']).'] Re:'.$element['name']; 91 91 92 $template->set_filename('stc_mail', dirname(__FILE__).'/../template/mail/notification.tpl');92 $template->set_filename('stc_mail', realpath(SUBSCRIBE_TO_PATH . 'template/mail/notification.tpl')); 93 93 94 94 foreach ($subscriptions as $row) … … 225 225 set_make_full_url(); 226 226 227 $template->set_filename('stc_mail', dirname(__FILE__).'/../template/mail/confirm.tpl');227 $template->set_filename('stc_mail', realpath(SUBSCRIBE_TO_PATH . 'template/mail/confirm.tpl')); 228 228 229 229 $subject = '['.strip_tags($conf['gallery_title']).'] '.l10n('Confirm your subscribtion to comments'); … … 375 375 load_language('plugin.lang', SUBSCRIBE_TO_PATH); 376 376 377 $template->set_filename('stc_mail', dirname(__FILE__).'/../template/mail/admin.tpl');377 $template->set_filename('stc_mail', realpath(SUBSCRIBE_TO_PATH . 'template/mail/admin.tpl')); 378 378 379 379 $subject = '['.strip_tags($conf['gallery_title']).'] '.sprintf(l10n('%s has subscribed to comments on %s.'), is_a_guest()?$email:$user['username'], null); … … 515 515 // template 516 516 $template->set_filenames(array( 517 'stc_mail_header' => dirname(__FILE__).'/../template/mail/header.tpl',518 'stc_mail_footer' => dirname(__FILE__).'/../template/mail/footer.tpl',517 'stc_mail_header' => realpath(SUBSCRIBE_TO_PATH . 'template/mail/header.tpl'), 518 'stc_mail_footer' => realpath(SUBSCRIBE_TO_PATH . 'template/mail/footer.tpl'), 519 519 )); 520 $stc_mail_css = file_get_contents( dirname(__FILE__).'/../template/mail/style.css');520 $stc_mail_css = file_get_contents(realpath(SUBSCRIBE_TO_PATH . 'template/mail/style.css')); 521 521 522 522 $template->assign(array( … … 570 570 $element['name'] = get_name_from_file($element['file']); 571 571 } 572 573 $url_params = array('image_id' => $element['id']); 574 $element['url'] = make_picture_url($url_params); 572 $element['name'] = trigger_event('render_element_name', $element['name']); 573 574 $element['url'] = make_picture_url(array( 575 'image_id'=>$element['id'] 576 )); 575 577 576 578 if ($with_thumb) … … 616 618 'category'=>$element, 617 619 )); 620 621 $element['name'] = trigger_event('render_category_name', $element['name']); 618 622 619 623 if ($with_thumb) -
extensions/Subscribe_to_comments/include/subscribe_to_comments.inc.php
r21441 r21608 1 1 <?php 2 if (!defined(' PHPWG_ROOT_PATH')) die('Hacking attempt!');2 if (!defined('SUBSCRIBE_TO_PATH')) die('Hacking attempt!'); 3 3 4 4 /** -
extensions/Subscribe_to_comments/include/subscribtions_page.inc.php
r21441 r21608 1 1 <?php 2 if (!defined(' PHPWG_ROOT_PATH')) die('Hacking attempt!');2 if (!defined('SUBSCRIBE_TO_PATH')) die('Hacking attempt!'); 3 3 4 4 global $template, $conf, $page, $user; … … 251 251 } 252 252 253 $template->set_filename s(array('index'=> dirname(__FILE__).'/../template/subscribtions_page.tpl'));253 $template->set_filename('index', realpath(SUBSCRIBE_TO_PATH . 'template/subscribtions_page.tpl')); 254 254 255 255 ?> -
extensions/Subscribe_to_comments/language/en_UK/plugin.lang.php
r21340 r21608 46 46 $lang['comments on all pictures of an album'] = 'comments on all pictures of an album'; 47 47 $lang['comments on an album'] = 'comments on an album'; 48 $lang['First subscription'] = 'First subscription'; 49 $lang['Last subscription'] = 'Last subscription'; 50 $lang['All album photos'] = 'All album photos'; 51 $lang['★ : registered users'] = '★ : registered users'; 52 $lang['No result'] = 'No result'; 48 53 49 54 ?> -
extensions/Subscribe_to_comments/language/fr_FR/plugin.lang.php
r21341 r21608 13 13 $lang['Return to item page'] = 'Retourner à la page de l\'élément'; 14 14 $lang['New comment on'] = 'Nouveau commentaire sur'; 15 16 15 $lang['%s has subscribed to comments on'] = '%s s\'est inscrit aux commentaires de'; 17 16 $lang['Allow users to subscribe to global notifications'] = 'Autoriser les utilisateurs à s\'inscrire de façon globale'; … … 54 53 $lang['You are currently subscribed to comments on %s.'] = 'Vous êtes inscrits aux commentaires sur %s.'; 55 54 $lang['You requested to subscribe by email to comments on %s'] = 'Vous avez demandez à vous inscrire aux commentaires sur %s.'; 55 $lang['First subscription'] = 'Premier abonnement'; 56 $lang['Last subscription'] = 'Dernier abonnement'; 57 $lang['All album photos'] = 'Toutes les images d\'un album'; 58 $lang['★ : registered users'] = '★ : utilisateurs enregistrées'; 59 56 60 ?> -
extensions/Subscribe_to_comments/main.inc.php
r21441 r21608 9 9 */ 10 10 11 /*12 * potential problem : if the permissions of a user change, he receives notifications13 * about photos and albums he can't see anymore14 */15 16 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 17 12 … … 21 16 define('SUBSCRIBE_TO_PATH' , PHPWG_PLUGINS_PATH . SUBSCRIBE_TO_ID . '/'); 22 17 define('SUBSCRIBE_TO_TABLE', $prefixeTable . 'subscribe_to_comments'); 18 define('SUBSCRIBE_TO_ADMIN', get_root_url() . 'admin.php?page=plugin-' . SUBSCRIBE_TO_ID); 23 19 define('SUBSCRIBE_TO_VERSION', 'auto'); 24 20 … … 98 94 array_push($menu, array( 99 95 'NAME' => 'Subscribe to Comments', 100 'URL' => get_root_url().'admin.php?page=plugin-' . SUBSCRIBE_TO_ID,96 'URL' => SUBSCRIBE_TO_ADMIN, 101 97 )); 102 98 return $menu;
Note: See TracChangeset
for help on using the changeset viewer.