Changeset 5670 for extensions
- Timestamp:
- Apr 5, 2010, 3:49:03 PM (14 years ago)
- Location:
- extensions/Mail_supervisor
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/admin/mail_black_liste.tpl
r4939 r5670 1 1 {* $Id: mail_black_liste.tpl 3723 2009-08-07 04:53:38Z rvelices $ *} 2 {known_script id="jquery" src=$ ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}3 {known_script id="jquery.cluetip" src=$ ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"}2 {known_script id="jquery" src=$path_js|@cat:"jquery.packed.js"} 3 {known_script id="jquery.cluetip" src=$path_js|@cat:"plugins/jquery.cluetip.packed.js"} 4 4 5 5 <script type="text/javascript"> 6 jQuery().ready(function(){ldelim} 7 jQuery('.cluetip').cluetip({ldelim} 8 width: 300, 6 jQuery().ready(function() 7 {ldelim} 8 jQuery('.cluetip').cluetip( 9 {ldelim} 10 width: 550, 9 11 splitTitle: '|' 10 });11 });12 {rdelim}); 13 {rdelim}); 12 14 </script> 13 15 -
extensions/Mail_supervisor/admin/mail_superv_admin.php
r4938 r5670 60 60 $page['tab'] = $_GET['tab']; 61 61 62 $icon_path = 'template/yoga/icon/help.png'; 63 64 $tabhelp= ' <img src="'.PHPWG_ROOT_PATH. $icon_path .'" class="button" alt="(?)"> '; 62 if (file_exists ( 'admin/themes/clear/icon/help.png')) 63 { 64 //version 2.1 65 66 $icon_path = 'themes/default/icon/help.png'; 67 $path_js= 'themes/default/js/' ; 68 69 } 70 else 71 { 72 // version 1.9 73 $path_js= "template-common/lib/"; 74 $icon_path = "admin/template/goto/theme/clear/icon/help.png"; 75 } 76 77 78 $tabhelp= ' <img src="'.PHPWG_ROOT_PATH. $icon_path .'" width=10px alt="(?)"> '; 65 79 66 80 … … 80 94 81 95 82 $tabsheet->add('mail_superv_help', $tabhelp83 ,96 $tabsheet->add('mail_superv_help', 97 $tabhelp, 84 98 $my_base_url.'&tab=mail_superv_help'); 85 99 … … 272 286 'PHPWG_VERSION' => PHPWG_VERSION , 273 287 'version' => $version , 274 288 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 289 'path_js' => $path_js 275 290 ) 276 291 ); … … 289 304 290 305 $mails_données = Get_Datas() ; 291 292 306 $group_id = isset($_POST['group']) ? $_POST['group'] : '-1' ; 293 307 if ($group_id >= 0) { … … 303 317 } 304 318 //================================================ 305 306 307 319 // info by email to an access granted group of category informations 320 if (isset($_POST['submitEmail']) and !empty($_POST['group'])) 321 { 322 set_make_full_url(); 323 /* TODO: if $category['representative_picture_id'] 324 is empty find child representative_picture_id */ 325 /* 326 * send en email to user's group 327 * 328 * @param: 329 * - group_id: mail are sent to group with this Id 330 * - email_format: mail format 331 * - keyargs_subject: mail subject on l10n_args format 332 * - dirname: short name of directory including template 333 * - tpl_shortname: short template name without extension 334 * - assign_vars: array used to assign_vars to mail template 335 * - language_selected: send mail only to user with this selected language 336 * 337 * @return boolean (Ok or not) 338 */ 339 340 if (function_exists('get_user_language_desc') ) $titre = get_user_language_desc($conf['gallery_title']); 341 else 342 $titre=$conf['gallery_title']; 343 344 $message = empty($_POST['MAIL_CONTENT']) ? $mails_données['message_test'] : stripslashes($_POST['MAIL_CONTENT']); 345 346 if (function_exists('get_user_language_desc') ) $message = get_user_language_desc($message); 347 // TODO Mettre un array pour traduction subjet 348 349 350 pwg_mail_group( 351 $_POST['group'], 352 get_str_email_format(true), 353 get_l10n_args('[%s] ---> %s', array($titre,'Information') ), //sujet 354 'cat_group_info', // template 355 array 356 ( 357 'CPL_CONTENT' => $message."\n\n".$user['username'] 358 ), 359 '' ); 360 361 362 $mails_données['message_test']= str_replace('"',"'",$message) ; 363 unset_make_full_url(); 364 sauve_données(); 365 $mails_données = Get_Datas() ; 366 367 $query = ' 368 SELECT 369 name 370 FROM '.GROUPS_TABLE.' 371 WHERE id = '.$_POST['group'].' 372 ;'; 373 list($group_name) = mysql_fetch_row(pwg_query($query)); 374 375 array_push( 376 $page['infos'], 377 sprintf( 378 l10n('An information email was sent to group "%s"'), 379 $group_name 380 ) 381 ); 382 } 383 load_language('plugin.lang', MAIL_SUPERV_PATH); 384 //===================================================================================== 308 385 if ( isset($_POST['test_envoie']) ) { 309 310 $mails_données['message_test'] = isset($_POST['content']) ? $_POST['content'] : $mails_données['message_test'] ; 386 $mails_données['message_test'] = empty($_POST['MAIL_CONTENT']) ? '' : stripslashes($_POST['MAIL_CONTENT']); 311 387 $message=$mails_données['message_test']; 388 //test_envoie($message,$group_name,$group_id); 312 389 sauve_données(); 313 test_envoie($message,$group_name,$group_id);390 314 391 $mails_données = Get_Datas() ; 315 392 … … 347 424 'liste' => $destinataires , 348 425 'version' => $version , 426 'MAIL_CONTENT' => $mails_données['message_test'], 427 'path_js' => $path_js 349 428 ) 350 429 ); … … 352 431 $template->set_filenames(array('plugin_admin_content' => realpath(MAIL_SUPERV_PATH . 'admin/mail_superv_test.tpl'))); 353 432 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 433 434 $toolbar = 'Basic'; 435 $width = '750px'; 436 $height = '200px'; 437 $areas = array(); 438 $areas[]='MAIL_CONTENT'; 439 // $areas[]= 'MAIL_CONTENT'; 440 if (!empty($areas)) 441 { 442 if (function_exists('set_fckeditor_instance')) 443 set_fckeditor_instance($areas, $toolbar, $width, $height); 444 } 445 354 446 break; 355 447 // ************************************************************************* … … 435 527 'champs_bl' => $champs_bl , 436 528 'liste_bl' => $liste_bl , 437 'conf_admin_layout' => $conf['admin_layout'] ,529 //'conf_admin_layout' => $conf['admin_layout'] , 438 530 'istype' => $istype , 439 531 'ip_black' => $ip_black , … … 441 533 'ip_black_len' => strlen($ip_black) , 442 534 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 443 535 'path_js' => $path_js , 444 536 'F_ACTION' => $f_action , 445 537 … … 474 566 'smile_bonjour' => $smile_bonjour , 475 567 'version' => $version , 568 'MAIL_SUPERV_PATH' => MAIL_SUPERV_PATH , 569 'path_js' => $path_js 476 570 ) 477 571 ); … … 486 580 //================================================================================ 487 581 582 488 583 489 584 if ( $mails_données['reste'] < 0 ) { -
extensions/Mail_supervisor/admin/mail_superv_admin.tpl
r4888 r5670 1 {* $Id: mail_black_liste.tpl 3723 2009-08-07 04:53:38Z rvelices $ *} 2 {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} 3 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 1 {known_script id="jquery" src= $ROOT_URL|@cat:$path_js|@cat:"jquery.packed.js"} 2 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:$path_js|@cat:"plugins/jquery.cluetip.packed.js"} 4 3 5 4 <script type="text/javascript"> -
extensions/Mail_supervisor/admin/mail_superv_help.tpl
r4888 r5670 1 {known_script id="my_script" src= $MAIL_SUPERV_PATH|@cat:"include/Scripts.js"} 1 2 <div class="instructions" > 2 3 <h2>{'Sv_Tab_help'|translate}{'Sv_version'|translate}{$version}</h2> -
extensions/Mail_supervisor/admin/mail_superv_test.tpl
r4888 r5670 21 21 {$liste} 22 22 </td> 23 24 23 </tr> 25 24 … … 27 26 <td><strong>{'Sv_mail_content'|@translate}</strong></td> 28 27 <td> 29 <textarea cols="50" rows="5" name="content" id="mail_content" class="description">{$message_test}</textarea>28 <textarea name="MAIL_CONTENT" id="MAIL_CONTENT" class="description">{$MAIL_CONTENT}</textarea> 30 29 </td> 31 30 </tr> … … 36 35 <input class="submit" type="submit" name="raffraichir" value="{'Sv_refresh'|translate}" /> 37 36 <input class="submit" type="submit" name="test_envoie" value="{'Sv_Test'|translate}" /> 38 39 40 37 <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitEmail" {$tag_input_enabled}/> 41 38 </p> 42 39 </fieldset> -
extensions/Mail_supervisor/include/fonctions.php
r4925 r5670 63 63 64 64 $valeurs = implode( ',',$mails_options); 65 66 65 67 $query = ' 66 68 UPDATE '.CONFIG_TABLE.' … … 92 94 array_push($valeurs , "`".$champ."`" . ' = ' . "0" ) ; 93 95 } 96 94 97 } 95 98 $valeurs = implode(", ",$valeurs) ; -
extensions/Mail_supervisor/include/function_test_send.php
r4925 r5670 65 65 $groups=get_liste($group_id); 66 66 67 68 67 //======================================================================================= 69 68 if (count($groups) > 0) … … 74 73 } 75 74 76 $args['from'] =$conf_mail['formated_email_webmaster'];77 75 $args['from'] =(function_exists('get_user_language_desc')) ? get_user_language_desc($conf_mail['formated_email_webmaster']):$conf_mail['formated_email_webmaster']; 76 $message_html =$message; 78 77 if (function_exists('get_user_language_desc') and isset($message) and $message <> '') 79 78 $message = get_user_language_desc($message)."\n\n"; … … 88 87 ); 89 88 //================================================================== 90 $message_html =$message_texte;89 $message_html .= "</br>" . $message . "</br>" . $message_texte; 91 90 92 91 … … 223 222 } 224 223 225 226 224 return $ret; 227 225 228 226 } 229 227 230 231 228 ?> -
extensions/Mail_supervisor/main.inc.php
r4938 r5670 2 2 /* 3 3 Plugin Name: Mail supervisor 4 Version: 1. 3.74 Version: 1.4.0 5 5 Description: Mail supervisor surveille l'envoie des mails. 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=315
Note: See TracChangeset
for help on using the changeset viewer.