Changeset 1792
- Timestamp:
- Feb 8, 2007, 11:04:36 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r1790 r1792 526 526 $first = true; 527 527 528 $query = 'SHOW VARIABLES where variable_name = \'max_allowed_packet\';';528 /*$query = 'SHOW VARIABLES where variable_name = \'max_allowed_packet\';'; 529 529 list(, $packet_size) = mysql_fetch_row(pwg_query($query)); 530 $packet_size = $packet_size - 2000; // The last list of values MUST not exceed 2000 character 531 530 $packet_size = $packet_size - 2000; // The last list of values MUST not exceed 2000 character*/ 531 /* DON T WORK WITH MySQL 4.1.9 */ 532 $packet_size = 1000000; 533 $query = ''; 534 532 535 foreach ($datas as $insert) 533 536 { -
trunk/admin/include/functions_notification_by_mail.inc.php
r1784 r1792 266 266 $user = array_merge($user, getuserdata($user['id'], true)); 267 267 268 list($user['template'], $user['theme']) = explode('/', $user['template']); 269 268 270 if ($env_nbm['last_language'] != $user['language']) 269 271 { -
trunk/include/functions_mail.inc.php
r1784 r1792 104 104 function get_mail_template($email_format) 105 105 { 106 global $conf; 107 108 // for mail, default template are used 109 list($tmpl, $thm) = explode('/', $conf['default_template']); 110 $mail_template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm); 111 $mail_template->set_rootdir(PHPWG_ROOT_PATH.'template/'.$tmpl.'/mail/'.$email_format); 106 global $user; 107 108 $mail_template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']); 109 $mail_template->set_rootdir(PHPWG_ROOT_PATH.'template/'.$user['template'].'/mail/'.$email_format); 112 110 113 111 return $mail_template; … … 129 127 function pwg_mail($to, $from = '', $subject = 'PhpWebGallery', $infos = '', $format_infos = 'text/plain', $email_format = null) 130 128 { 131 global $conf, $conf_mail, $lang_info, $page ;129 global $conf, $conf_mail, $lang_info, $page, $user; 132 130 133 131 $cvt7b_subject = str_translate_to_ascii7bits($subject); … … 178 176 $content = ''; 179 177 180 if (!isset($conf_mail[$email_format][$lang_info['charset']] ))178 if (!isset($conf_mail[$email_format][$lang_info['charset']][$user['template']][$user['theme']])) 181 179 { 182 180 if (!isset($mail_template)) … … 191 189 array( 192 190 //Header 193 'BODY_ID' =>194 isset($page['body_id']) ?195 $page['body_id'] : '',196 197 191 'CONTENT_ENCODING' => $lang_info['charset'], 198 192 'LANG' => $lang_info['code'], … … 214 208 215 209 // what are displayed on the header of each mail ? 216 $conf_mail[$email_format][$lang_info['charset']]['header'] = 217 $mail_template->parse('mail_header', true); 210 $conf_mail[$email_format] 211 [$lang_info['charset']] 212 [$user['template']][$user['theme']]['header'] = 213 $mail_template->parse('mail_header', true); 218 214 219 215 // what are displayed on the footer of each mail ? 220 $conf_mail[$email_format][$lang_info['charset']]['footer'] = 221 $mail_template->parse('mail_footer', true); 222 } 223 224 $content.= $conf_mail[$email_format][$lang_info['charset']]['header']; 216 $conf_mail[$email_format] 217 [$lang_info['charset']] 218 [$user['template']][$user['theme']]['footer'] = 219 $mail_template->parse('mail_footer', true); 220 } 221 222 $content.= $conf_mail[$email_format] 223 [$lang_info['charset']] 224 [$user['template']][$user['theme']]['header']; 225 225 226 226 if (($format_infos == 'text/plain') and ($email_format == 'text/html')) … … 233 233 } 234 234 235 $content.= $conf_mail[$email_format][$lang_info['charset']]['footer']; 235 $content.= $conf_mail[$email_format] 236 [$lang_info['charset']] 237 [$user['template']][$user['theme']]['footer']; 236 238 237 239 // Undo Compute root_path in order have complete path … … 258 260 fclose($file); 259 261 return true; 260 } 261 */ 262 }*/ 262 263 263 264 if ($conf_mail['mail_options']) -
trunk/include/section_init.inc.php
r1789 r1792 270 270 { 271 271 $page['section'] = 'categories'; 272 if (script_basename() == 'picture') 273 {//access a picture only by id, file or id-file without given section 274 $page['flat_cat'] = true; 275 } 276 elseif (!empty($conf['random_index_redirect']) and empty($tokens[$next_token]) ) 277 { 278 $random_index_redirect = array(); 279 foreach ($conf['random_index_redirect'] as $random_url => $random_url_condition) 280 { 281 if (empty($random_url_condition) or eval($random_url_condition)) 272 273 switch (script_basename()) 274 { 275 case 'picture': 276 { 277 //access a picture only by id, file or id-file without given section 278 $page['flat_cat'] = true; 279 break; 280 } 281 case 'index': 282 { 283 // No section defined, go to selected url 284 if (!empty($conf['random_index_redirect']) and empty($tokens[$next_token]) ) 282 285 { 283 $random_index_redirect[] = $random_url; 286 $random_index_redirect = array(); 287 foreach ($conf['random_index_redirect'] as $random_url => $random_url_condition) 288 { 289 if (empty($random_url_condition) or eval($random_url_condition)) 290 { 291 $random_index_redirect[] = $random_url; 292 } 293 } 294 if (!empty($random_index_redirect)) 295 { 296 redirect($random_index_redirect[mt_rand(0, count($random_index_redirect)-1)]); 297 } 284 298 } 285 } 286 if (!empty($random_index_redirect)) 287 { 288 redirect($random_index_redirect[mt_rand(0, count($random_index_redirect)-1)]); 299 break; 289 300 } 290 301 } -
trunk/template/yoga/mail/text/html/admin/notification_by_mail.tpl
r1785 r1792 1 1 <div id="nbm_mail_content"> 2 <h2>{lang:Notification}</h2> 2 3 <p>{lang:nbm_content_hello_1}{USERNAME}{lang:nbm_content_hello_2}</p> 3 4 … … 43 44 </p> 44 45 <!-- BEGIN recent_post --> 45 <p> 46 </div> 47 </div> 48 <div id="content"> 49 <div id="nbm_mail_recent_post"> 46 50 <!-- BEGIN recent_post_block --> 47 51 <h2>{recent_post.recent_post_block.TITLE}</h2> 48 52 {recent_post.recent_post_block.HTML_DATA} 49 53 <!-- END recent_post_block --> 50 </p>51 54 <!-- END recent_post --> 52 55 </div> -
trunk/template/yoga/mail/text/html/footer.tpl
r1784 r1792 1 </div> <!-- content --> 1 2 <div id="copyright"> 2 3 <HR> -
trunk/template/yoga/mail/text/html/header.tpl
r1784 r1792 6 6 </head> 7 7 8 <body id="{BODY_ID}"> 9 <div id="the_mail"> 8 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/layout.css"> 9 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/mail/text/html/default-layout.css"> 10 <!-- the next css is used to fix khtml (Konqueror/Safari) issue 11 the "text/nonsense" prevents gecko based browsers to load it --> 12 <link rel="stylesheet" type="text/nonsense" href="{pwg_root}template/{themeconf:template}/fix-khtml.css"> 13 <!--[if lt IE 7]> 14 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/fix-ie5-ie6.css"> 15 <![endif]--> 16 <!--[if gt IE 6]> 17 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/fix-ie7.css"> 18 <![endif]--> 19 <link rel="stylesheet" type="text/css" media="print" href="{pwg_root}template/{themeconf:template}/print.css"> 20 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/default-colors.css"> 21 <link rel="stylesheet" type="text/css" href="{pwg_root}template/{themeconf:template}/theme/{themeconf:theme}/theme.css"> 10 22 23 <body id="theMailPage"> 24 <div id="the_page"> 25 <div id="content"> 26
Note: See TracChangeset
for help on using the changeset viewer.