diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-18 23:43:38 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-18 23:43:38 +0000 |
commit | cab98df7768729895771aa072ccc35bc8774e6cb (patch) | |
tree | 4b1e366b8254330cb3264d7d553d89ae3896c230 /admin | |
parent | 6ae74fe965c16e1e1dae654eb3e3d43e32224bce (diff) |
- smarty for more mail templates/css
git-svn-id: http://piwigo.org/svn/trunk@2285 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_notification_by_mail.inc.php | 7 | ||||
-rw-r--r-- | admin/notification_by_mail.php | 39 |
2 files changed, 13 insertions, 33 deletions
diff --git a/admin/include/functions_notification_by_mail.inc.php b/admin/include/functions_notification_by_mail.inc.php index 7328df82e..b1f918afb 100644 --- a/admin/include/functions_notification_by_mail.inc.php +++ b/admin/include/functions_notification_by_mail.inc.php @@ -337,7 +337,7 @@ function assign_vars_nbm_mail_content($nbm_user) set_make_full_url(); - $env_nbm['mail_template']->assign_vars + $env_nbm['mail_template']->assign ( array ( @@ -418,10 +418,7 @@ function do_subscribe_unsubscribe_notification_by_mail($is_admin_request, $is_su $section_action_by = ($is_subscribe ? 'subscribe_by_' : 'unsubscribe_by_'); $section_action_by .= ($is_admin_request ? 'admin' : 'himself'); - $env_nbm['mail_template']->assign_block_vars - ( - $section_action_by, array('DUMMY' => 'dummy') - ); + $env_nbm['mail_template']->assign( $section_action_by, true ); if (pwg_mail ( diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php index 897bef97a..9dae9b692 100644 --- a/admin/notification_by_mail.php +++ b/admin/notification_by_mail.php @@ -321,43 +321,33 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l // Assign current var for nbm mail assign_vars_nbm_mail_content($nbm_user); - $end_punct = ($conf['nbm_send_detailed_content'] ? ':' : '.'); - if (!is_null($nbm_user['last_send'])) { - $env_nbm['mail_template']->assign_block_vars + $env_nbm['mail_template']->assign ( 'content_new_elements_between', array ( 'DATE_BETWEEN_1' => $nbm_user['last_send'], 'DATE_BETWEEN_2' => $dbnow, - 'END_PUNCT' => $end_punct ) ); } else { - $env_nbm['mail_template']->assign_block_vars + $env_nbm['mail_template']->assign ( 'content_new_elements_single', array ( 'DATE_SINGLE' => $dbnow, - 'END_PUNCT' => $end_punct ) ); } if ($conf['nbm_send_detailed_content']) { - foreach ($news as $data) - { - $env_nbm['mail_template']->assign_block_vars - ( - 'global_new_line.new_line', array('DATA' => $data) - ); - } + $env_nbm['mail_template']->assign('global_new_lines', $news); } $nbm_user_customize_mail_content = @@ -365,11 +355,9 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l $customize_mail_content, $nbm_user); if (!empty($nbm_user_customize_mail_content)) { - $env_nbm['mail_template']->assign_block_vars + $env_nbm['mail_template']->assign ( - 'custom', - array('CUSTOMIZE_MAIL_CONTENT' => - $nbm_user_customize_mail_content) + 'custom_mail_content', $nbm_user_customize_mail_content ); } @@ -379,9 +367,9 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l $conf['recent_post_dates']['NBM']); foreach ($recent_post_dates as $date_detail) { - $env_nbm['mail_template']->assign_block_vars + $env_nbm['mail_template']->append ( - 'recent_post.recent_post_block', + 'recent_posts', array ( 'TITLE' => get_title_recent_post_date($date_detail), @@ -391,21 +379,16 @@ function do_action_send_mail_notification($action = 'list_to_send', $check_key_l } } - $env_nbm['mail_template']->assign_block_vars + $env_nbm['mail_template']->assign ( - 'goto', array ( - 'GALLERY_TITLE' => $conf['gallery_title'], - 'GALLERY_URL' => $conf['gallery_url'] + 'GOTO_GALLERY_TITLE' => $conf['gallery_title'], + 'GOTO_GALLERY_URL' => $conf['gallery_url'], + 'SEND_AS_NAME' => $env_nbm['send_as_name'], ) ); - $env_nbm['mail_template']->assign_block_vars - ( - 'byebye', array('SEND_AS_NAME' => $env_nbm['send_as_name']) - ); - if (pwg_mail ( format_email($nbm_user['username'], $nbm_user['mail_address']), |