Changeset 389 for trunk/expressoMail1_2/preferences.php
- Timestamp:
- 08/14/08 11:15:07 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/preferences.php
r385 r389 9 9 ); 10 10 11 11 12 include('../header.inc.php'); 12 include('inc/class.imap_functions.inc.php'); 13 include('inc/class.imap_functions.inc.php'); 14 include_once("inc/fckeditor.php"); 13 15 14 16 if (!$_POST['try_saved']) … … 69 71 else 70 72 $GLOBALS['phpgw']->template->set_var('text_signature',''); 71 73 74 if($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['type_signature']){ 75 $GLOBALS['phpgw']->template->set_var('type_signature_option_'.$GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['type_signature'].'_selected','selected'); 76 $GLOBALS['phpgw']->template->set_var('type_signature_td_'.($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['type_signature'] == 'html' ? 'text' : 'html'),'display:none'); 77 } 78 else{ 79 $GLOBALS['phpgw']->template->set_var('type_signature_option_text_selected','selected'); 80 $GLOBALS['phpgw']->template->set_var('type_signature_td_html','display:none'); 81 } 82 83 // BEGIN FCKEDITOR 84 $oFCKeditor = new FCKeditor('html_signature') ; 85 $oFCKeditor->BasePath = 'js/fckeditor/'; 86 $oFCKeditor->ToolbarSet = 'ExpressoLivre'; 87 if(is_array($GLOBALS['phpgw_info']['user']['preferences']['expressoMail'])) { 88 $oFCKeditor->Value = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['signature']; 89 } 90 // First Time: The user has no preferences. If the template file exists, then it loads a default signature. 91 // See signature_example.tpl 92 elseif(file_exists($GLOBALS['phpgw']->template->root.'/signature.tpl')){ 93 $filein = fopen($GLOBALS['phpgw']->template->root.'/signature.tpl',"r"); 94 while (!feof ($filein)) 95 $oFCKeditor->Value .= fgets($filein, 1024); 96 } 97 $oFCKeditor->Value = str_replace("{full_name}",$phpgw_info['user']['fullname'],$oFCKeditor->Value); 98 $oFCKeditor->Value = str_replace("{first_name}",$phpgw_info['user']['firstname'],$oFCKeditor->Value); 99 100 $GLOBALS['phpgw']->template->set_var('rtf_signature',$oFCKeditor->Create()); 101 $GLOBALS['phpgw']->template->set_var('text_signature',strip_tags($oFCKeditor->Value)); 102 // END FCKEDITOR 72 103 if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['hide_folders']) 73 104 $GLOBALS['phpgw']->template->set_var('checked_menu','checked'); … … 138 169 else 139 170 $GLOBALS['phpgw']->preferences->add('expressoMail','signature',$_POST['signature']); 171 172 if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['type_signature']) 173 $GLOBALS['phpgw']->preferences->change('expressoMail','type_signature',$_POST['type_signature']); 174 else 175 $GLOBALS['phpgw']->preferences->add('expressoMail','type_signature',$_POST['type_signature']); 140 176 141 177 if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['hide_folders']) … … 196 232 $GLOBALS['phpgw']->template->set_var('medium',lang('Medium')); 197 233 $GLOBALS['phpgw']->template->set_var('normal',lang('Normal')); 234 $GLOBALS['phpgw']->template->set_var('simple_text',lang('Simple Text')); 235 $GLOBALS['phpgw']->template->set_var('html_text',lang('Rich Text')); 236 $GLOBALS['phpgw']->template->set_var('lang_config_signature',lang('Signature Configuration')); 237 $GLOBALS['phpgw']->template->set_var('lang_type_signature',lang('Signature type')); 198 238 $GLOBALS['phpgw']->template->set_var('big',lang('Big')); 199 239 $GLOBALS['phpgw']->template->set_var('lang_use_signature',lang('Insert signature automatically in new messages?')); 200 $GLOBALS['phpgw']->template->set_var('lang_signature',lang('Signature'));201 240 202 241 $boemailadmin = CreateObject('emailadmin.bo');
Note: See TracChangeset
for help on using the changeset viewer.