Changeset 25358


Ignore:
Timestamp:
11/06/13 17:21:31 (6 years ago)
Author:
mistic100
Message:

feature feature 2995: New email template
improve mail cache system
fix font-size in Thunderbird

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_mail.inc.php

    r25357 r25358  
    308308 * current user (if admin) is excluded 
    309309 * @see pwg_mail() 
     310 * @since 2.6 
    310311 * 
    311312 * @param array $args - as in pwg_mail() 
     
    583584    // key compose of indexes witch allow to cache mail data 
    584585    $cache_key = $content_type.'-'.$lang_info['code']; 
    585     $cache_key.= '-'.crc32(@$args['mail_title'] . @$args['mail_subtitle']); // TODO: find a way to not cache by mail_title 
    586586 
    587587    if (!isset($conf_mail[$cache_key])) 
     
    606606          'CONTENT_ENCODING' => get_pwg_charset(), 
    607607          'CONTACT_MAIL' => $conf_mail['email_webmaster'], 
    608           'MAIL_TITLE' => $args['mail_title'], 
    609           'MAIL_SUBTITLE' => $args['mail_subtitle'], 
    610608          ) 
    611609        ); 
     
    625623        } 
    626624      } 
    627  
    628       $conf_mail[$cache_key]['header'] = $template->parse('mail_header', true); 
    629       $conf_mail[$cache_key]['footer'] = $template->parse('mail_footer', true); 
    630     } 
     625    } 
     626     
     627    $template = &$conf_mail[$cache_key]['theme']; 
     628    $template->assign( 
     629      array( 
     630        'MAIL_TITLE' => $args['mail_title'], 
     631        'MAIL_SUBTITLE' => $args['mail_subtitle'], 
     632        ) 
     633      ); 
    631634 
    632635    // Header 
    633     $contents[$content_type] = $conf_mail[$cache_key]['header']; 
     636    $contents[$content_type] = $template->parse('mail_header', true); 
    634637 
    635638    // Content 
     
    663666    if (isset($tpl['filename'])) 
    664667    { 
    665       $template = &$conf_mail[$cache_key]['theme']; 
    666668      if (isset($tpl['dirname'])) 
    667669      { 
     
    689691 
    690692    // Footer 
    691     $contents[$content_type].= $conf_mail[$cache_key]['footer']; 
     693    $contents[$content_type].= $template->parse('mail_footer', true); 
    692694  } 
    693695 
     
    796798 
    797799  $e = new Emogrifier($content); 
    798   $e->preserveStyleTag = true; 
     800  // $e->preserveStyleTag = true; 
    799801  return $e->emogrify(); 
    800802} 
  • trunk/themes/default/template/mail/text/html/global-mail-css.tpl

    r25344 r25358  
    2626#content { 
    2727  padding:0 20px 20px 20px; 
     28  font-family:"Verdana", "Helvetica", "Optima", sans-serif; 
     29  font-size:13px; 
    2830} 
    2931#footer { 
  • trunk/themes/default/template/mail/text/html/notification_admin.tpl

    r25357 r25358  
    22 
    33{if isset($TECHNICAL)} 
    4 <p style="margin-top:10px;font-size:10px;"> 
     4<p style="padding-top:10px;font-size:11px;"> 
    55{$TECHNICAL|nl2br} 
    66</p> 
Note: See TracChangeset for help on using the changeset viewer.