Changeset 1901
- Timestamp:
- Mar 13, 2007, 12:10:35 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r1900 r1901 52 52 'email_admin_on_new_user', 53 53 'allow_user_registration', 54 'email_admin_on_picture_uploaded', 54 55 ); 55 56 -
trunk/include/functions_comment.inc.php
r1900 r1901 195 195 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 196 196 197 $del_url = get_absolute_root_url().'comments.php?delete='.$comm['id']; 197 $del_url = 198 get_absolute_root_url().'comments.php?delete='.$comm['id']; 198 199 199 200 $content = 200 'Author: '.$comm['author']."\n"201 'Author: '.$comm['author']."\n" 201 202 .'Comment: '.$comm['content']."\n" 202 .'IP: '.$comm['ip']."\n" 203 .'Browser: '.$comm['agent']."\n\n" 203 .get_block_mail_admin_info() 204 204 .'Delete: '.$del_url."\n"; 205 205 … … 207 207 { 208 208 $content .= 209 'Validate: ' .get_absolute_root_url()210 . 'comments.php?validate='.$comm['id'];209 'Validate: ' 210 .get_absolute_root_url().'comments.php?validate='.$comm['id']; 211 211 } 212 212 -
trunk/include/functions_mail.inc.php
r1828 r1901 195 195 196 196 return $result; 197 } 198 199 /* Return a standard block useful for admin mail */ 200 function get_block_mail_admin_info() 201 { 202 global $user; 203 204 return 205 "\n" 206 .'Connected user: '.$user['username']."\n" 207 .'IP: '.$_SERVER['REMOTE_ADDR']."\n" 208 .'Browser: '.$_SERVER['HTTP_USER_AGENT']."\n" 209 ."\n"; 197 210 } 198 211 … … 374 387 if (($args['content_format'] == 'text/plain') and ($args['email_format'] == 'text/html')) 375 388 { 376 $content.= '<p>'.nl2br(htmlentities($args['content'])).'</p>'; 389 $content.= '<p>'. 390 nl2br( 391 preg_replace("/(http:\/\/)([^\s,]*)/i", 392 "<a href='$1$2'>$1$2</a>", 393 htmlentities($args['content']))). 394 '</p>'; 377 395 } 378 396 else -
trunk/install/config.sql
r1900 r1901 30 30 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nbm_complementary_mail_content','','Complementary mail content for notification by mail'); 31 31 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('nbm_send_recent_post_dates','true','Send recent post by dates for notification by mail'); 32 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_new_user','false','Send an email to the admin when a user registers'); 33 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the admin when a valid comment is entered'); 34 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the admin when a comment requires validation'); 32 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_new_user','false','Send an email to theadministrators when a user registers'); 33 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the administrators when a valid comment is entered'); 34 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the administrators when a comment requires validation'); 35 INSERT INTO phpwebgallery_config (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded'); -
trunk/language/en_UK.iso-8859-1/admin.lang.php
r1900 r1901 83 83 $lang['Edit tags'] = 'Edit tags'; 84 84 $lang['Elements'] = 'Elements'; 85 $lang['Email admin when a new user registers'] = 'Email admin when a new user registers'; 86 $lang['Email admin when a valid comment is entered'] = 'Email admin when a valid comment is entered'; 87 $lang['Email admin when a comment requires validation'] = 'Email admin when a comment requires validation'; 85 $lang['Email administrators when a new user registers'] = 'Email admins when a new user registers'; 86 $lang['Email administrators when a valid comment is entered'] = 'Email admins when a valid comment is entered'; 87 $lang['Email administrators when a comment requires validation'] = 'Email admins when a comment requires validation'; 88 $lang['Email administrators when a picture is uploaded'] = 'Email adminis when a picture is uploaded'; 88 89 $lang['Empty caddie'] = 'Empty caddie'; 89 90 $lang['Environment'] = 'Environment'; -
trunk/language/en_UK.iso-8859-1/help/configuration.html
r1900 r1901 30 30 rate images.</li> 31 31 32 <li><strong>Email admin when a new user registers</strong>: Administrators will be received mail for each registration.</li>32 <li><strong>Email admins when a new user registers</strong>: Administrators will be received mail for each registration.</li> 33 33 34 34 <li><strong>Allow user registration</strong>: Registration is free for all.</li> 35 36 <li><strong>Email adminis when a picture is uploaded</strong>: Administrators will be received mail for each picture uploaded by a user.</li> 35 37 36 38 </ul> … … 67 69 Comments</span>.</li> 68 70 69 <li><strong>Email admin when a valid comment is entered</strong>:71 <li><strong>Email admins when a valid comment is entered</strong>: 70 72 Sends an email to the administrators when a user enters a comment and this comment is validated.</li> 71 73 72 <li><strong>Email admin when a comment requires validation</strong>:74 <li><strong>Email admins when a comment requires validation</strong>: 73 75 Sends an email to the administrators when a user enters a comment that requires validation by the admin. 74 76 User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li> -
trunk/language/fr_FR.iso-8859-1/admin.lang.php
r1900 r1901 83 83 $lang['Edit tags'] = 'Editer les tags'; 84 84 $lang['Elements'] = 'Éléments'; 85 $lang['Email admin when a new user registers'] = 'Notifier le webmestre lors de l\'inscription d\'un utilisateur'; 86 $lang['Email admin when a valid comment is entered'] = 'Notifier le webmestre quand un commentaire est enregistré'; 87 $lang['Email admin when a comment requires validation'] = 'Notifier le webmestre quand un commentaire requiert sa validation'; 85 $lang['Email administrators when a new user registers'] = 'Notifier les administrateurs lors de l\'inscription d\'un utilisateur'; 86 $lang['Email administrators when a valid comment is entered'] = 'Notifier les administrateurs quand un commentaire est enregistré'; 87 $lang['Email administrators when a comment requires validation'] = 'Notifier les administrateurs quand un commentaire requiert sa validation'; 88 $lang['Email administrators when a picture is uploaded'] = 'Notifier les administrateurs quand une image est téléchargée'; 88 89 $lang['Empty caddie'] = 'Vider le panier'; 89 90 $lang['Environment'] = 'Environnement'; -
trunk/language/fr_FR.iso-8859-1/help/configuration.html
r1900 r1901 30 30 non enregistrés peuvent noter les images.</li> 31 31 32 <li><strong>Notifier le webmestrelors de l'inscription d'un utilisateur</strong>: Les administrateurs recevront un courriel à chaque inscription.</li>32 <li><strong>Notifier les administrateurs lors de l'inscription d'un utilisateur</strong>: Les administrateurs recevront un courriel à chaque inscription.</li> 33 33 34 34 <li><strong>Permettre l'enregistrement des utilisateurs</strong>: L'inscription est libre pour tous.</li> 35 36 <li><strong>Notifier les administrateurs quand une image est téléchargée</strong>: Les administrateurs recevront un courriel à chaque image mis à disposition par un utilisateur.</li> 35 37 36 38 </ul> … … 67 69 Commentaires</span>.</li> 68 70 69 <li><strong>Notifier le webmestrequand un commentaire est enregistré</strong>:71 <li><strong>Notifier les administrateurs quand un commentaire est enregistré</strong>: 70 72 Envoi un courriel aux administrateurs lorsqu'un utilisateur enregistre un commentaire qui est validé.</li> 71 73 72 <li><strong>Notifier le webmestrequand un commentaire requiert sa validation </strong>:74 <li><strong>Notifier les administrateurs quand un commentaire requiert sa validation </strong>: 73 75 Envoi un courriel aux administrateurs lorsqu'un utilisateur enregistre un commentaire qui demande une validation de la part des administrateurs. 74 76 La validation des commentaires utilisateurs a lieu dans l'écran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li> -
trunk/register.php
r1900 r1901 68 68 $username = $_POST['login']; 69 69 $admin_url = get_absolute_root_url() 70 .'admin.php?page=user_list&username='.$username;70 .'admin.php?page=user_list&username='.$username; 71 71 72 72 $content = 73 'User: '.$username."\n"73 'User: '.$username."\n" 74 74 .'Mail: '.$_POST['mail_address']."\n" 75 .'IP: '.$_SERVER['REMOTE_ADDR']."\n" 76 .'Browser: '.$_SERVER['HTTP_USER_AGENT']."\n\n" 77 .l10n('admin').': '.$admin_url; 75 .get_block_mail_admin_info() 76 .'Admin'.': '.$admin_url; 78 77 79 78 pwg_mail -
trunk/template/yoga/admin/configuration.tpl
r1900 r1901 54 54 <li> 55 55 <label> 56 <span class="property">{lang:Email admin when a new user registers}</span>56 <span class="property">{lang:Email administrators when a new user registers}</span> 57 57 <input type="checkbox" name="email_admin_on_new_user" {main.EMAIL_ADMIN_ON_NEW_USER} /> 58 58 </label> … … 65 65 </label> 66 66 </li> 67 68 <li> 69 <label> 70 <span class="property">{lang:Email administrators when a picture is uploaded}</span> 71 <input type="checkbox" name="email_admin_on_picture_uploaded" {main.EMAIL_ADMIN_ON_PICTURE_UPLOADED} /> 72 </label> 73 </li> 74 67 75 </ul> 68 76 </fieldset> … … 114 122 <li> 115 123 <label> 116 <span class="property">{lang:Email admin when a valid comment is entered}</span>124 <span class="property">{lang:Email administrators when a valid comment is entered}</span> 117 125 <input type="checkbox" name="email_admin_on_comment" {comments.EMAIL_ADMIN_ON_COMMENT} /> 118 126 </label> … … 121 129 <li> 122 130 <label> 123 <span class="property">{lang:Email admin when a comment requires validation}</span>131 <span class="property">{lang:Email administrators when a comment requires validation}</span> 124 132 <input type="checkbox" name="email_admin_on_comment_validation" {comments.EMAIL_ADMIN_ON_COMMENT_VALIDATION} /> 125 133 </label> -
trunk/upload.php
r1900 r1901 223 223 pwg_query( $query ); 224 224 $page['waiting_id'] = mysql_insert_id(); 225 226 if ($conf['email_admin_on_picture_uploaded']) 227 { 228 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 229 230 $waiting_url = get_absolute_root_url().'admin.php?page=waiting'; 231 232 $content = 233 'Category: '.get_cat_display_name($category['upper_names'], null, false)."\n" 234 .'Picture name: '.$_FILES['picture']['name']."\n" 235 .'User: '.$_POST['username']."\n" 236 .'Email: '.$_POST['mail_address']."\n" 237 .'Picture name: '.$_POST['name']."\n" 238 .'Author: '.$_POST['author']."\n" 239 .'Creation Date: '.$_POST['date_creation']."\n" 240 .'Comment: '.$_POST['comment']."\n" 241 .get_block_mail_admin_info() 242 .'Waiting page: '.$waiting_url."\n"; 243 244 pwg_mail 245 ( 246 format_email('administrators', get_webmaster_mail_address()), 247 array 248 ( 249 'subject' => 'PWG picture uploaded by '.$_POST['username'], 250 'content' => $content, 251 'Bcc' => get_administrators_email() 252 ) 253 ); 254 } 225 255 } 226 256 }
Note: See TracChangeset
for help on using the changeset viewer.