Ignore:
Timestamp:
Mar 16, 2013, 8:32:05 PM (11 years ago)
Author:
mistic100
Message:

code clean, add admin list of all subscribers

File:
1 edited

Legend:

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

    r21441 r21608  
    11<?php
    2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     2if (!defined('SUBSCRIBE_TO_PATH')) die('Hacking attempt!');
    33
    44include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     
    9090  $subject = '['.strip_tags($conf['gallery_title']).'] Re:'.$element['name'];
    9191   
    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'));
    9393
    9494  foreach ($subscriptions as $row)
     
    225225    set_make_full_url();
    226226   
    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'));
    228228   
    229229    $subject = '['.strip_tags($conf['gallery_title']).'] '.l10n('Confirm your subscribtion to comments');
     
    375375  load_language('plugin.lang', SUBSCRIBE_TO_PATH);
    376376 
    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'));
    378378   
    379379  $subject = '['.strip_tags($conf['gallery_title']).'] '.sprintf(l10n('%s has subscribed to comments on %s.'), is_a_guest()?$email:$user['username'], null);
     
    515515  // template
    516516  $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'),
    519519    ));
    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'));
    521521   
    522522  $template->assign(array(
     
    570570    $element['name'] = get_name_from_file($element['file']);
    571571  }
    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    ));
    575577 
    576578  if ($with_thumb)
     
    616618    'category'=>$element,
    617619    ));
     620   
     621  $element['name'] = trigger_event('render_category_name', $element['name']);
    618622 
    619623  if ($with_thumb)
Note: See TracChangeset for help on using the changeset viewer.