Changeset 8065 for extensions/NBC_UserAdvManager/trunk
- Timestamp:
- Dec 9, 2010, 10:46:14 PM (14 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php
r7955 r8065 74 74 $height = '300px'; 75 75 $areas = array(); 76 array_push( $areas,'UAM_ConfirmMail_Custom_Txt1','UAM_ConfirmMail_Custom_Txt2' );76 array_push( $areas,'UAM_ConfirmMail_Custom_Txt1','UAM_ConfirmMail_Custom_Txt2','UAM_GTAutoDelText'); 77 77 78 78 if (function_exists('set_fckeditor_instance')) … … 105 105 case 'global': 106 106 107 if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) )107 if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_No_Comment_Anonymous']) and isset($_POST['UAM_Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto'])) 108 108 { 109 109 … … 114 114 115 115 $_POST['UAM_GhostTracker_ReminderText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GhostTracker_ReminderText']))); 116 116 117 $_POST['UAM_GTAutoDelText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoDelText']))); 118 119 $_POST['UAM_GTAutoMailText'] = str_replace('\"', '"', str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_GTAutoMailText']))); 117 120 118 121 //Check if CR-LF exist at begining and end of mail exclusion list - If yes, removes them … … 121 124 array_push($page['errors'], l10n('mail_exclusionlist_error')); 122 125 $UAM_Exclusionlist_Error = true; 126 } 127 128 // Consistency check between ConfirmMail and AutoMail - We cannot use GTAutoMail if ConfirmMail is disabled 129 $conf_UAM = unserialize($conf['UserAdvManager']); 130 131 if (((isset($conf_UAM['1']) and ($conf_UAM['1'] == 'false' or $conf_UAM['1'] == 'local')) or ($_POST['UAM_Confirm_Mail'] == 'false' or $_POST['UAM_Confirm_Mail'] == 'local')) and $_POST['UAM_GTAutoMail'] == 'true') 132 { 133 $newvalue = 'false'; 134 $_POST['UAM_GTAutoMail'] = $newvalue; 135 array_push($page['errors'], l10n('Error_GTAutoMail_cannot_be_set_without_ConfirmMail')); 123 136 } 124 137 … … 145 158 $_POST['UAM_Add_LastVisit_Column'], 146 159 $_POST['UAM_Admin_ConfMail'], 147 $_POST['UAM_RedirToProfile']); 160 $_POST['UAM_RedirToProfile'], 161 $_POST['UAM_GTAuto'], 162 $_POST['UAM_GTAutoDel'], 163 $_POST['UAM_GTAutoMail'], 164 $_POST['UAM_GTAutoDelText'], 165 $_POST['UAM_GTAutoMailText'], 166 (isset($_POST['UAM_Downgrade_Group'])?$_POST['UAM_Downgrade_Group']:''), 167 (isset($_POST['UAM_Downgrade_Status'])?$_POST['UAM_Downgrade_Status']:'')); 148 168 149 169 $conf['UserAdvManager'] = serialize($newconf_UAM); … … 203 223 $conf_UAM = unserialize($conf['UserAdvManager']); 204 224 205 //Group setting for unvalidated and validated users225 //Group setting for unvalidated, validated users and downgrade group 206 226 $groups[-1] = '---------'; 207 227 $No_Valid = -1; 208 228 $Valid = -1; 229 $Downgrade = -1; 209 230 210 231 //Check groups list in database … … 229 250 { 230 251 $Valid = $row['id']; 252 } 253 //configuration value for downgrade users 254 if (isset($conf_UAM[27]) and $conf_UAM[27] == $row['id']) 255 { 256 $Downgrade = $row['id']; 231 257 } 232 258 } … … 248 274 ) 249 275 ); 276 //Template initialization for downgrade group 277 $template->assign( 278 'Downgrade_Group', 279 array( 280 'group_options'=> $groups, 281 'group_selected' => $Downgrade 282 ) 283 ); 250 284 251 //Status setting for unvalidated and validated users285 //Status setting for unvalidated, validated users and downgrade status 252 286 $status_options[-1] = '------------'; 253 287 $No_Valid_Status = -1; 254 288 $Valid_Status = -1; 289 $Downgrade_Status = -1; 255 290 256 //Get status values291 //Get unvalidate status values 257 292 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 258 293 { … … 263 298 } 264 299 265 //Template initialization for unvalidated users group300 //Template initialization for unvalidated users status 266 301 $template->assign( 267 302 'No_Confirm_Status', … … 273 308 } 274 309 275 //Get status values310 //Get validate status values 276 311 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 277 312 { … … 282 317 } 283 318 284 //Template initialization for unvalidated users group319 //Template initialization for validated users status 285 320 $template->assign( 286 321 'Confirm_Status', … … 288 323 'Status_options' => $status_options, 289 324 'Status_selected' => $Valid_Status 325 ) 326 ); 327 } 328 329 //Get downgrade status values 330 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 331 { 332 $status_options[$status] = l10n('user_status_'.$status); 333 if (isset($conf_UAM[28]) and $conf_UAM[28] == $status) 334 { 335 $Downgrade_Status = $status; 336 } 337 338 //Template initialization for validated users status 339 $template->assign( 340 'Downgrade_Status', 341 array( 342 'Status_options' => $status_options, 343 'Status_selected' => $Downgrade_Status 290 344 ) 291 345 ); … … 339 393 'UAM_REDIRTOPROFILE_TRUE' => $conf_UAM[21]=='true' ? 'checked="checked"' : '' , 340 394 'UAM_REDIRTOPROFILE_FALSE' => $conf_UAM[21]=='false' ? 'checked="checked"' : '' , 395 'UAM_GTAUTO_TRUE' => $conf_UAM[22]=='true' ? 'checked="checked"' : '' , 396 'UAM_GTAUTO_FALSE' => $conf_UAM[22]=='false' ? 'checked="checked"' : '' , 397 'UAM_GTAUTODEL_TRUE' => $conf_UAM[23]=='true' ? 'checked="checked"' : '' , 398 'UAM_GTAUTODEL_FALSE' => $conf_UAM[23]=='false' ? 'checked="checked"' : '' , 399 'UAM_GTAUTOMAIL_TRUE' => $conf_UAM[24]=='true' ? 'checked="checked"' : '' , 400 'UAM_GTAUTOMAIL_FALSE' => $conf_UAM[24]=='false' ? 'checked="checked"' : '' , 401 'UAM_GTAUTODEL_TEXT' => $conf_UAM[25], 402 'UAM_GTAUTOMAILTEXT' => $conf_UAM[26], 403 'UAM_Downgrade_Group' => $conf_UAM[27], 404 'UAM_Downgrade_Status' => $conf_UAM[28], 341 405 'UAM_PASSWORD_TEST_SCORE' => $UAM_Password_Test_Score, 342 406 'UAM_ERROR_REPORTS4' => $UAM_Exclusionlist_Error, -
extensions/NBC_UserAdvManager/trunk/admin/template/global.tpl
r7935 r8065 202 202 <br><br> 203 203 </li> 204 204 {if $UAM_CONFIRM_MAIL_FALSE} 205 <div class="uam_hide"> 206 {/if} 205 207 <ul> 206 208 <li> … … 262 264 263 265 <br><hr><br> 264 265 <div id="uam_notice">{'UAM_Confirm_grpstat_notice'|@translate}</div> 266 <br> 267 <li> 268 <label class="cluetip" title="{'UAM_confirmgrpTitle'|translate}|{'UAM_confirmgrpTitle_d'|translate}"> 269 {'UAM_Confirm_Group'|@translate} 270 </label> 271 <br><br> 272 </li> 273 274 <ul> 266 267 <ul> 268 <div id="uam_notice">{'UAM_Confirm_grpstat_notice'|@translate}</div> 269 <br> 275 270 <li> 276 <label> 277 {'UAM_No_Confirm_Group'|@translate} 278 </label><br> 279 <div id="uam_leftmargin"> 280 {html_options name="UAM_No_Confirm_Group" options=$No_Confirm_Group.group_options selected=$No_Confirm_Group.group_selected} 281 </div> 282 <br><br> 271 <label class="cluetip" title="{'UAM_confirmgrpTitle'|translate}|{'UAM_confirmgrpTitle_d'|translate}"> 272 {'UAM_Confirm_Group'|@translate} 273 </label> 274 <br><br> 283 275 </li> 284 276 277 <ul> 278 <li> 279 <label> 280 {'UAM_No_Confirm_Group'|@translate} 281 </label><br> 282 <div id="uam_leftmargin"> 283 {html_options name="UAM_No_Confirm_Group" options=$No_Confirm_Group.group_options selected=$No_Confirm_Group.group_selected} 284 </div> 285 <br><br> 286 </li> 287 288 <li> 289 <label> 290 {'UAM_Validated_Group'|@translate} 291 </label><br> 292 <div id="uam_leftmargin"> 293 {html_options name="UAM_Validated_Group" options=$Validated_Group.group_options selected=$Validated_Group.group_selected} 294 </div> 295 <br><br> 296 </li> 297 </ul> 298 285 299 <li> 286 <label> 287 {'UAM_Validated_Group'|@translate} 288 </label><br> 289 <div id="uam_leftmargin"> 290 {html_options name="UAM_Validated_Group" options=$Validated_Group.group_options selected=$Validated_Group.group_selected} 291 </div> 292 <br><br> 300 <label class="cluetip" title="{'UAM_confirmstatTitle'|translate}|{'UAM_confirmstatTitle_d'|translate}"> 301 {'UAM_Confirm_Status'|@translate} 302 </label> 303 <br><br> 293 304 </li> 294 </ul> 295 296 <li> 297 <label class="cluetip" title="{'UAM_confirmstatTitle'|translate}|{'UAM_confirmstatTitle_d'|translate}"> 298 {'UAM_Confirm_Status'|@translate} 299 </label> 300 <br><br> 301 </li> 302 303 <ul> 305 306 <ul> 307 <li> 308 <label> 309 {'UAM_No_Confirm_Status'|@translate} 310 </label><br> 311 <div id="uam_leftmargin"> 312 {html_options name="UAM_No_Confirm_Status" options=$No_Confirm_Status.Status_options selected=$No_Confirm_Status.Status_selected} 313 </div> 314 <br><br> 315 </li> 316 317 <li> 318 <label> 319 {'UAM_Validated_Status'|@translate} 320 </label><br> 321 <div id="uam_leftmargin"> 322 {html_options name="UAM_Validated_Status" options=$Confirm_Status.Status_options selected=$Confirm_Status.Status_selected} 323 </div> 324 <br><br> 325 </li> 326 </ul> 327 328 <br><hr><br> 329 304 330 <li> 305 <label> 306 {'UAM_No_Confirm_Status'|@translate} 307 </label><br> 308 <div id="uam_leftmargin"> 309 {html_options name="UAM_No_Confirm_Status" options=$No_Confirm_Status.Status_options selected=$No_Confirm_Status.Status_selected} 310 </div> 311 <br><br> 331 <label class="cluetip" title="{'UAM_validationlimitTitle'|translate}|{'UAM_validationlimitTitle_d'|translate}"> 332 {'UAM_ValidationLimit_Info'|@translate} 333 </label> 334 <br><br> 335 <input type="radio" value="false" {$UAM_CONFIRMMAIL_TIMEOUT_FALSE} name="UAM_ConfirmMail_TimeOut"> 336 {'UAM_ConfirmMail_TimeOut_false'|@translate}<br> 337 <input type="radio" value="true" {$UAM_CONFIRMMAIL_TIMEOUT_TRUE} name="UAM_ConfirmMail_TimeOut"> 338 {'UAM_ConfirmMail_TimeOut_true'|@translate} 339 <input type="text" name="UAM_ConfirmMail_Delay" value="{$UAM_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;"><br><br> 312 340 </li> 313 341 314 342 <li> 315 <label> 316 {'UAM_Validated_Status'|@translate} 317 </label><br> 318 <div id="uam_leftmargin"> 319 {html_options name="UAM_Validated_Status" options=$Confirm_Status.Status_options selected=$Confirm_Status.Status_selected} 320 </div> 321 <br><br> 343 <label class="cluetip" title="{'UAM_remailTitle'|translate}|{'UAM_remailTitle_d'|translate}"> 344 {'UAM_ConfirmMail_Remail'|@translate} 345 </label> 346 <br><br> 347 <input type="radio" value="false" {$UAM_CONFIRMMAIL_REMAIL_FALSE} name="UAM_ConfirmMail_Remail"> 348 {'UAM_ConfirmMail_Remail_false'|@translate}<br> 349 <input type="radio" value="true" {$UAM_CONFIRMMAIL_REMAIL_TRUE} name="UAM_ConfirmMail_Remail"> 350 {'UAM_ConfirmMail_Remail_true'|@translate}<br><br> 322 351 </li> 323 </ul> 324 325 <br><hr><br> 326 327 <li> 328 <label class="cluetip" title="{'UAM_validationlimitTitle'|translate}|{'UAM_validationlimitTitle_d'|translate}"> 329 {'UAM_ValidationLimit_Info'|@translate} 330 </label> 331 <br><br> 332 <input type="radio" value="false" {$UAM_CONFIRMMAIL_TIMEOUT_FALSE} name="UAM_ConfirmMail_TimeOut"> 333 {'UAM_ConfirmMail_TimeOut_false'|@translate}<br> 334 <input type="radio" value="true" {$UAM_CONFIRMMAIL_TIMEOUT_TRUE} name="UAM_ConfirmMail_TimeOut"> 335 {'UAM_ConfirmMail_TimeOut_true'|@translate} 336 <input type="text" name="UAM_ConfirmMail_Delay" value="{$UAM_CONFIRMMAIL_DELAY}" size="5" style="text-align: center;"><br><br> 337 </li> 338 339 <li> 340 <label class="cluetip" title="{'UAM_remailTitle'|translate}|{'UAM_remailTitle_d'|translate}"> 341 {'UAM_ConfirmMail_Remail'|@translate} 342 </label> 343 <br><br> 344 <input type="radio" value="false" {$UAM_CONFIRMMAIL_REMAIL_FALSE} name="UAM_ConfirmMail_Remail"> 345 {'UAM_ConfirmMail_Remail_false'|@translate}<br> 346 <input type="radio" value="true" {$UAM_CONFIRMMAIL_REMAIL_TRUE} name="UAM_ConfirmMail_Remail"> 347 {'UAM_ConfirmMail_Remail_true'|@translate}<br><br> 348 </li> 349 350 <ul> 351 <li> 352 <label class="cluetip" title="{'UAM_remailtxt1Title'|translate}|{'UAM_remailtxt1Title_d'|translate}"> 353 {'UAM_ConfirmMail_ReMail_Txt1'|@translate} 354 </label> 355 <br><br> 356 <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea> 357 <br><br> 358 </li> 352 353 <ul> 354 <li> 355 <label class="cluetip" title="{'UAM_remailtxt1Title'|translate}|{'UAM_remailtxt1Title_d'|translate}"> 356 {'UAM_ConfirmMail_ReMail_Txt1'|@translate} 357 </label> 358 <br><br> 359 <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt1" id="UAM_ConfirmMail_ReMail_Txt1" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT1}</textarea> 360 <br><br> 361 </li> 359 362 <!-- 360 {* if 'FCK_PATH'|@defined *}361 <div style="text-align:right;">362 <a href="#" onClick="toogleEditor('UAM_ConfirmMail_ReMail_Txt1'); return false;">FCK Editor On/Off</a>363 </div>364 {* /if *}363 {* if 'FCK_PATH'|@defined *} 364 <div style="text-align:right;"> 365 <a href="#" onClick="toogleEditor('UAM_ConfirmMail_ReMail_Txt1'); return false;">FCK Editor On/Off</a> 366 </div> 367 {* /if *} 365 368 --> 366 369 367 <li>368 <label class="cluetip" title="{'UAM_remailtxt2Title'|translate}|{'UAM_remailtxt2Title_d'|translate}">369 {'UAM_ConfirmMail_ReMail_Txt2'|@translate}370 </label>371 <br><br>372 <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea><br>373 </li>370 <li> 371 <label class="cluetip" title="{'UAM_remailtxt2Title'|translate}|{'UAM_remailtxt2Title_d'|translate}"> 372 {'UAM_ConfirmMail_ReMail_Txt2'|@translate} 373 </label> 374 <br><br> 375 <textarea class="uam_textfields" name="UAM_ConfirmMail_ReMail_Txt2" id="UAM_ConfirmMail_ReMail_Txt2" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_REMAIL_TXT2}</textarea><br> 376 </li> 374 377 <!-- 375 {* if 'FCK_PATH'|@defined *}376 <div style="text-align:right;">377 <a href="#" onClick="toogleEditor('UAM_ConfirmMail_ReMail_Txt2'); return false;">FCK Editor On/Off</a>378 </div>379 {* /if *}378 {* if 'FCK_PATH'|@defined *} 379 <div style="text-align:right;"> 380 <a href="#" onClick="toogleEditor('UAM_ConfirmMail_ReMail_Txt2'); return false;">FCK Editor On/Off</a> 381 </div> 382 {* /if *} 380 383 --> 381 </ul> 384 </ul> 385 </ul> 386 {if $UAM_CONFIRM_MAIL_FALSE} 387 </div> 388 {/if} 382 389 </ul> 383 390 </fieldset> … … 401 408 402 409 <ul> 403 <li> <label class="cluetip" title="{'UAM_gttextTitle'|translate}|{'UAM_gttextTitle_d'|translate}">{'UAM_GhostTracker_ReminderText'|@translate}</label><br><br>404 < textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea>405 <br><br> 406 </li>407 410 <li> 411 <label class="cluetip" title="{'UAM_gttextTitle'|translate}|{'UAM_gttextTitle_d'|translate}">{'UAM_GhostTracker_ReminderText'|@translate}</label> 412 <br><br> 413 <textarea class="uam_textfields" name="UAM_GhostTracker_ReminderText" id="UAM_GhostTracker_ReminderText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GHOSTRACKER_REMINDERTEXT}</textarea><br><br> 414 </li> 408 415 <!-- 409 416 {* if 'FCK_PATH'|@defined *} … … 413 420 {* /if *} 414 421 --> 422 423 <li><label class="cluetip" title="{'UAM_GTAutoTitle'|translate}|{'UAM_GTAutoTitle_d'|translate}">{'UAM_GTAuto'|@translate}</label> 424 <br><br> 425 <input type="radio" value="false" {$UAM_GTAUTO_FALSE} name="UAM_GTAuto">{'UAM_GTAuto_false'|@translate}<br> 426 <input type="radio" value="true" {$UAM_GTAUTO_TRUE} name="UAM_GTAuto">{'UAM_GTAuto_true'|@translate}<br><br> 427 </li> 428 429 {if $UAM_GTAUTO_FALSE} 430 <div class="uam_hide"> 431 {/if} 432 <ul> 433 <li><label class="cluetip" title="{'UAM_GTAutoDelTitle'|translate}|{'UAM_GTAutoDelTitle_d'|translate}">{'UAM_GTAutoDel'|@translate}</label> 434 <br><br> 435 <input type="radio" value="false" {$UAM_GTAUTODEL_FALSE} name="UAM_GTAutoDel">{'UAM_GTAutoDel_false'|@translate}<br> 436 <input type="radio" value="true" {$UAM_GTAUTODEL_TRUE} name="UAM_GTAutoDel">{'UAM_GTAutoDel_true'|@translate}<br><br> 437 <textarea class="uam_textfields" name="UAM_GTAutoDelText" id="UAM_GTAutoDelText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTODEL_TEXT}</textarea> 438 <br><br> 439 440 {if 'FCK_PATH'|@defined} 441 <div style="text-align:right;"> 442 <a href="#" onClick="toogleEditor('UAM_GTAutoDelText'); return false;">FCK Editor On/Off</a> 443 </div> 444 {/if} 445 </li> 446 447 {if $UAM_GTAUTODEL_TRUE} 448 <div class="uam_hide"> 449 {/if} 450 <li><label class="cluetip" title="{'UAM_GTAutoGpTitle'|translate}|{'UAM_GTAutoGpTitle_d'|translate}">{'UAM_GTAutoGp'|@translate}</label><br><br> 451 <ul> 452 <li> 453 <label> 454 {'UAM_Expired_Group'|@translate} 455 </label> 456 <br> 457 <div id="uam_leftmargin"> 458 {html_options name="UAM_Downgrade_Group" options=$Downgrade_Group.group_options selected=$Downgrade_Group.group_selected} 459 </div> 460 <br><br> 461 </li> 462 463 <li> 464 <label> 465 {'UAM_Expired_Status'|@translate} 466 </label> 467 <br> 468 <div id="uam_leftmargin"> 469 {html_options name="UAM_Downgrade_Status" options=$Downgrade_Status.Status_options selected=$Downgrade_Status.Status_selected} 470 </div> 471 <br><br> 472 </li> 473 </ul> 474 475 <ul> 476 <li><label class="cluetip" title="{'UAM_GTAutoMailTitle'|translate}|{'UAM_GTAutoMailTitle_d'|translate}">{'UAM_GTAutoMail'|@translate}</label><br><br> 477 <input type="radio" value="false" {$UAM_GTAUTOMAIL_FALSE} name="UAM_GTAutoMail">{'UAM_GTAutoMail_false'|@translate}<br> 478 <input type="radio" value="true" {$UAM_GTAUTOMAIL_TRUE} name="UAM_GTAutoMail">{'UAM_GTAutoMail_true'|@translate}<br><br><br> 479 <textarea class="uam_textfields" name="UAM_GTAutoMailText" id="UAM_GTAutoMailText" rows="10" {$TAG_INPUT_ENABLED}>{$UAM_GTAUTOMAILTEXT}</textarea><br><br> 480 </li> 481 </ul> 482 </li> 483 {if $UAM_GTAUTODEL_TRUE} 484 </div> 485 {/if} 486 </ul> 487 {if $UAM_GTAUTO_FALSE} 488 </div> 489 {/if} 415 490 </ul> 416 491 492 <br><hr><br> 493 417 494 <li><label class="cluetip" title="{'UAM_lastvisitTitle'|translate}|{'UAM_lastvisitTitle_d'|translate}">{'UAM_LastVisit'|@translate}</label><br><br> 418 495 <input type="radio" value="false" {$UAM_ADDLASTVISIT_FALSE} name="UAM_Add_LastVisit_Column">{'UAM_LastVisit_false'|@translate}<br> -
extensions/NBC_UserAdvManager/trunk/admin/template/uam.css
r7106 r8065 10 10 text-decoration: underline; 11 11 font-weight:bold; 12 } 13 14 div.uam_hide 15 { 16 display: none; 12 17 } 13 18 -
extensions/NBC_UserAdvManager/trunk/changelog.txt.php
r7955 r8065 204 204 205 205 -- 2.15.9 : Bug 2010 fixed - No confirmation email when information email is not set 206 207 -- 2.15.10 : Bug 2050 fixed - Compatibility with Captcha 208 209 210 *************************************** 211 ***** Plugin history (branch 2.16)***** 212 *************************************** 213 -- 2.16.0 : Bug 1430 and 1840 fixed - Automated tasks are available to delete or downgrade ghost users with or without email notification 214 206 215 */ 207 216 ?> -
extensions/NBC_UserAdvManager/trunk/include/functions.inc.php
r7968 r8065 152 152 * Additional controls on user registration check 153 153 */ 154 function UAM_RegistrationCheck($err , $user)155 { 156 global $ errors, $conf;154 function UAM_RegistrationCheck($errors, $user) 155 { 156 global $conf; 157 157 158 158 // Exclusion of Adult_Content users 159 159 if ($user['username'] != "16" and $user['username'] != "18") 160 160 { 161 162 // *********************************************************** 163 // We need to reset the standard Piwigo's register controls 164 // because the call of register_user_check trigger resets them 165 // *********************************************************** 166 167 // ********************************** 168 // Standard Piwigo's username control 169 // ********************************** 170 if ($_POST['login'] == '') 171 { 172 return l10n('reg_err_login1'); 173 } 174 if (preg_match('/^.* $/', $_POST['login'])) 175 { 176 return l10n('reg_err_login2'); 177 } 178 if (preg_match('/^ .*$/', $_POST['login'])) 179 { 180 return l10n('reg_err_login3'); 181 } 182 if (get_userid($_POST['login'])) 183 { 184 return l10n('reg_err_login5'); 185 } 186 187 if ($conf['insensitive_case_logon'] == true) 188 { 189 $login_error = validate_login_case($_POST['login']); 190 if ($login_error != '') 191 { 192 return l10n($login_error); 193 } 194 } 195 196 if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list') // not the same email variable if we are on users registration page or on admin's user registration page 197 { 198 // Email doblons check 199 $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase 200 $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name 201 $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i'; 202 203 if (!preg_match($regex, $_POST['email'])) 204 { 205 return l10n('reg_err_mail_address'); 206 } 207 208 $query = ' 209 SELECT count(*) 210 FROM '.USERS_TABLE.' 211 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['email'].'\') 212 ;'; 213 list($count) = pwg_db_fetch_row(pwg_query($query)); 214 if ($count != 0) 215 { 216 return l10n('reg_err_mail_address_dbl'); 217 } 218 } 219 220 if (script_basename() == 'register') // not the same email variable if we are on users registration page or on admin's user registration page 221 { 222 // Email doblons check 223 $atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase 224 $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name 225 $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i'; 226 227 if (!preg_match($regex, $_POST['mail_address'])) 228 { 229 return l10n('reg_err_mail_address'); 230 } 231 232 $query = ' 233 SELECT count(*) 234 FROM '.USERS_TABLE.' 235 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['mail_address'].'\') 236 ;'; 237 list($count) = pwg_db_fetch_row(pwg_query($query)); 238 if ($count != 0) 239 { 240 return l10n('reg_err_mail_address_dbl'); 241 } 242 } 243 // ****************************************** 244 // End of Piwigo's standard register controls 245 // ****************************************** 246 247 248 // ****************************************** 249 // Here begins the advanced register controls 250 // ****************************************** 161 load_language('plugin.lang', UAM_PATH); 162 251 163 $PasswordCheck = 0; 252 164 … … 263 175 { 264 176 $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck); 265 return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]); 177 $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]; 178 array_push($errors, $lang['reg_err_pass']); 266 179 } 267 180 } … … 273 186 { 274 187 $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck); 275 return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]); 188 $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]; 189 array_push($errors, $lang['reg_err_pass']); 276 190 } 277 191 } … … 279 193 280 194 // Username without forbidden keys 281 if (isset($conf_UAM[6]) and $conf_UAM[6] == 'true' and !empty($ _POST['login']) and ValidateUsername($_POST['login']) and !is_admin())282 { 283 $ _POST['login'] = '';284 return($lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_UAM[7]."'");195 if (isset($conf_UAM[6]) and $conf_UAM[6] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin()) 196 { 197 $lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_UAM[7]."'"; 198 array_push($errors, $lang['reg_err_login1']); 285 199 } 286 200 287 201 // Email without forbidden domains 288 if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']) and !is_admin()) 289 { 290 $_POST['mail_address'] = ''; 291 return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_UAM[12]."'"); 292 } 202 if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin()) 203 { 204 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_UAM[12]."'"; 205 array_push($errors, $lang['reg_err_login1']); 206 } 207 return $errors; 293 208 } 294 209 } … … 306 221 { 307 222 $user_idsOK = array(); 308 if (! check_consult($user['id'], $user_idsOK))223 if (!UAM_check_profile($user['id'], $user_idsOK)) 309 224 { 310 225 $user_idsOK[] = $user['id']; … … 397 312 * Triggered on login_success 398 313 * 399 * redirects a visitor (except for admins, webmasters and generic statuses) to his profile.php page400 * 401 * Thx to LucMorizur402 */ 403 function UAM_ RedirectToProfile()314 * Triggers scheduled tasks at login 315 * Redirects a visitor (except for admins, webmasters and generic statuses) to his profile.php page (Thx to LucMorizur) 316 * 317 */ 318 function UAM_LoginTasks() 404 319 { 405 320 global $conf, $user; … … 407 322 $conf_UAM = unserialize($conf['UserAdvManager']); 408 323 324 // Performing scheduled tasks 325 if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true')) 326 { 327 if ((isset($conf_UAM[22]) and $conf_UAM[22] == 'true')) 328 { 329 UAM_ScheduledTasks(); 330 } 331 } 332 333 // Performing redirection 409 334 $query =' 410 335 SELECT user_id, status … … 413 338 ;'; 414 339 $data = pwg_db_fetch_assoc(pwg_query($query)); 415 340 416 341 if ($data['status'] <> "admin" and $data['status'] <> "webmaster" and $data['status'] <> "generic") 417 342 { 418 if ((isset($conf_UAM[21]) and $conf_UAM[21] == 'true')) 419 { 420 $user_idsOK = array(); 421 if (!check_consult($user['id'], $user_idsOK)) 422 redirect(PHPWG_ROOT_PATH.'profile.php'); 423 } 424 } 425 } 426 427 /** 428 * Triggered on login_success 429 * 430 * Executes optional post-login tasks like GhostTracker auto tasks 431 * 432 */ 433 function UAM_Tasks() 434 { 435 global $conf, $user; 343 $user_idsOK = array(); 344 if (!UAM_check_profile($user['id'], $user_idsOK)) 345 redirect(PHPWG_ROOT_PATH.'profile.php'); 346 } 347 } 348 349 /** 350 * Triggered on UAM_LoginTasks() 351 * 352 * Executes optional post-login tasks 353 * 354 */ 355 function UAM_ScheduledTasks() 356 { 357 global $conf, $user, $page; 436 358 437 359 $conf_UAM = unserialize($conf['UserAdvManager']); 360 361 $collection = array(); 362 363 $page['filtered_users'] = get_ghosts_autotasks(); 438 364 439 365 // Ghost accounts auto deletion 440 366 if ((isset($conf_UAM[22]) and $conf_UAM[22] == 'true') and (isset($conf_UAM[23]) and $conf_UAM[23] == 'true')) 441 { 442 367 { 368 foreach($page['filtered_users'] as $listed_user) 369 { 370 array_push($collection, $listed_user['id']); 371 } 372 373 if (count($collection) > 0) 374 { 375 if (in_array($user['id'], $collection)) 376 { 377 invalidate_user_cache(); 378 379 foreach ($collection as $user_id) 380 { 381 //delete_user($user_id); 382 } 383 logout_user(); 384 redirect(UAM_PATH.'del_account.php'); 385 } 386 else 387 { 388 foreach ($collection as $user_id) 389 { 390 //delete_user($user_id); 391 } 392 } 393 } 443 394 } 444 395 445 396 // Ghost accounts auto group or status downgrade with or without information email sending 446 397 if ((isset($conf_UAM[22]) and $conf_UAM[22] == 'true') and (isset($conf_UAM[23]) and $conf_UAM[23] == 'false') and ((isset($conf_UAM[27]) and $conf_UAM[27] <> -1) or (isset($conf_UAM[28]) and $conf_UAM[28] <> -1))) 447 { 448 398 { 399 foreach($page['filtered_users'] as $listed_user) 400 { 401 array_push($collection, $listed_user['id']); 402 } 403 404 if (count($collection) > 0) 405 { 406 if (in_array($user['id'], $collection)) 407 { 408 foreach ($collection as $user_id) 409 { 410 // Auto change group and / or status 411 // Delete user from all groups 412 $query = " 413 DELETE FROM ".USER_GROUP_TABLE." 414 WHERE user_id = '".$user_id."' 415 AND ( 416 group_id = '".$conf_UAM[2]."' 417 OR 418 group_id = '".$conf_UAM[3]."' 419 ) 420 ;"; 421 422 pwg_query($query); 423 424 // Change user status 425 if (!is_admin() and $conf_UAM[28] <> -1) 426 { 427 $query = " 428 UPDATE ".USER_INFOS_TABLE." 429 SET status = '".$conf_UAM[28]."' 430 WHERE user_id = '".$user_id."' 431 ;"; 432 pwg_query($query); 433 } 434 435 // Change user group 436 if (!is_admin() and $conf_UAM[27] <> -1) 437 { 438 $query = " 439 INSERT INTO ".USER_GROUP_TABLE." 440 (user_id, group_id) 441 VALUES 442 ('".$user_id."', '".$conf_UAM[27]."') 443 ;"; 444 pwg_query($query); 445 } 446 447 // Auto send email notification on group / status downgrade 448 if ((isset($conf_UAM[24]) and $conf_UAM[24] == 'true')) 449 { 450 // Reset confirmed user status to unvalidated 451 $query = ' 452 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 453 SET date_check = NULL 454 WHERE user_id = "'.$user_id.'" 455 ;'; 456 pwg_query($query); 457 458 // Get users information for email notification 459 $query = ' 460 SELECT id, username, mail_address 461 FROM '.USERS_TABLE.' 462 WHERE id = '.$user_id.' 463 ;'; 464 $data = pwg_db_fetch_assoc(pwg_query($query)); 465 466 demotion_mail($user_id, $data['username'], $data['mail_address']); 467 } 468 } 469 invalidate_user_cache(); 470 log_user($user['id'], false); 471 redirect(make_index_url()); 472 } 473 else 474 { 475 foreach ($collection as $user_id) 476 { 477 // Auto change group and / or status 478 // Delete user from all groups 479 $query = " 480 DELETE FROM ".USER_GROUP_TABLE." 481 WHERE user_id = '".$user_id."' 482 AND ( 483 group_id = '".$conf_UAM[2]."' 484 OR 485 group_id = '".$conf_UAM[3]."' 486 ) 487 ;"; 488 489 pwg_query($query); 490 491 // Change user status 492 if (!is_admin() and $conf_UAM[28] <> -1) 493 { 494 $query = " 495 UPDATE ".USER_INFOS_TABLE." 496 SET status = '".$conf_UAM[28]."' 497 WHERE user_id = '".$user_id."' 498 ;"; 499 pwg_query($query); 500 } 501 502 // Change user group 503 if (!is_admin() and $conf_UAM[27] <> -1) 504 { 505 $query = " 506 INSERT INTO ".USER_GROUP_TABLE." 507 (user_id, group_id) 508 VALUES 509 ('".$user_id."', '".$conf_UAM[27]."') 510 ;"; 511 pwg_query($query); 512 } 513 514 // Auto send email notification on group / status downgrade 515 if ((isset($conf_UAM[24]) and $conf_UAM[24] == 'true')) 516 { 517 // Reset confirmed user status to unvalidated 518 $query = ' 519 UPDATE '.USER_CONFIRM_MAIL_TABLE.' 520 SET date_check = NULL 521 WHERE user_id = "'.$user_id.'" 522 ;'; 523 pwg_query($query); 524 525 // Get users information for email notification 526 $query = ' 527 SELECT id, username, mail_address 528 FROM '.USERS_TABLE.' 529 WHERE id = '.$user_id.' 530 ;'; 531 $data = pwg_db_fetch_assoc(pwg_query($query)); 532 533 demotion_mail($user_id, $data['username'], $data['mail_address']); 534 } 535 } 536 } 537 } 449 538 } 450 539 } … … 513 602 function SendMail2User($typemail, $id, $username, $password, $email, $confirm) 514 603 { 515 // Only available for next Piwigo release (bug in switch_lang function)516 604 global $conf; 517 605 … … 659 747 function ResendMail2User($typemail, $user_id, $username, $email, $confirm) 660 748 { 661 // Only available for next Piwigo release (bug in switch_lang function)662 749 global $conf; 663 750 … … 667 754 668 755 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 669 670 $infos1_perso = "";671 $infos2_perso = "";672 756 673 757 // We have to get the user's language in database … … 765 849 function ghostreminder($user_id, $username, $email) 766 850 { 767 // Only available for next Piwigo release (bug in switch_lang function)768 851 global $conf; 769 852 … … 824 907 825 908 /** 909 * Function called from functions.inc.php to send notification email when user have been downgraded 910 * 911 * @param : user id, username, email address, confirmation 912 * 913 */ 914 function demotion_mail($id, $username, $email) 915 { 916 global $conf; 917 918 $conf_UAM = unserialize($conf['UserAdvManager']); 919 920 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 921 922 $custom_txt = ""; 923 924 // We have to get the user's language in database 925 $query =' 926 SELECT user_id, language 927 FROM '.USER_INFOS_TABLE.' 928 WHERE user_id = '.$id.' 929 ;'; 930 $data = pwg_db_fetch_assoc(pwg_query($query)); 931 932 // Check if user is already registered (profile changing) - If not (new registration), language is set to current gallery language 933 if (empty($data)) 934 { 935 // And switch gallery to this language before using personalized and multilangual contents 936 $language = pwg_get_session_var( 'lang_switch', $user['language'] ); 937 switch_lang_to($language); 938 } 939 else 940 { 941 // And switch gallery to this language before using personalized and multilangual contents 942 $language = $data['language']; // Usefull for debugging 943 switch_lang_to($data['language']); 944 load_language('plugin.lang', UAM_PATH); 945 } 946 947 $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Demotion of %s', stripslashes($username))); 948 949 if (isset($conf_UAM[26]) and $conf_UAM[26] <> '') 950 { 951 if (function_exists('get_user_language_desc')) 952 { 953 $custom_txt = get_user_language_desc($conf_UAM[26])."\n\n"; 954 } 955 else $custom_txt = l10n($conf_UAM[26])."\n\n"; 956 } 957 958 $infos1 = array( 959 get_l10n_args('User: %s', stripslashes($username)), 960 get_l10n_args('Email: %s', $email), 961 get_l10n_args('', ''), 962 ); 963 964 $infos2 = array 965 ( 966 get_l10n_args('Link: %s', ResetConfirmMail($id)), 967 get_l10n_args('', ''), 968 ); 969 970 971 // Sending the email with subject and contents 972 pwg_mail($email, array( 973 'subject' => $subject, 974 'content' => ($custom_txt.l10n_args($infos1)."\n\n".l10n_args($infos2)."\n\n").get_absolute_root_url(), 975 )); 976 977 // ********************** 978 // Email sending debugger 979 // This is only to trace 980 // the send of emails for 981 // debugging 982 // ********************** 983 //$content = ($infos1."\n\n".$infos2."\n\n").get_absolute_root_url(); 984 //MailLog($email,$subject,$content,$language); 985 // ********************** 986 987 // Switching back to default language 988 switch_lang_back(); 989 } 990 991 /** 826 992 * Function called from functions AddConfirmMail and ResetConfirmMail for validation key generation 827 993 * … … 880 1046 pwg_query($query); 881 1047 1048 // Delete user from all groups 882 1049 $query = " 883 1050 DELETE FROM ".USER_GROUP_TABLE." … … 891 1058 pwg_query($query); 892 1059 1060 // Set user unvalidated status 893 1061 if (!is_admin() and $conf_UAM[8] <> -1) 894 1062 { … … 901 1069 } 902 1070 903 if ( $conf_UAM[2] <> -1 ) 1071 // Set user unvalidated group 1072 if (!is_admin() and $conf_UAM[2] <> -1) 904 1073 { 905 1074 $query = " … … 950 1119 } 951 1120 952 if ( $conf_UAM[2] <> -1)1121 if (!is_admin() and $conf_UAM[2] <> -1) 953 1122 { 954 1123 $query = " … … 1110 1279 $data = pwg_db_fetch_assoc(pwg_query($query)); 1111 1280 1112 if (!empty($data) and isset($data['user_id']) and !isset($data['date_check'])) 1281 //if (!empty($data) and isset($data['user_id']) and !isset($data['date_check'])) 1282 if (!empty($data) and isset($data['user_id'])) 1113 1283 { 1114 1284 $query = " … … 1387 1557 if (isset($email) and isset($conf_UAM[12]) and $conf_UAM[12] <> '') 1388 1558 { 1389 //$ncsemail = strtolower($email);1390 1559 $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[12]); 1391 1560 for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) … … 1547 1716 } 1548 1717 1718 1719 /** 1720 * Function called from functions.inc.php - Get all ghost users to delete or downgrade automatically on any user login 1721 * 1722 * @return : List of users to delete or downgrade automatically 1723 * 1724 */ 1725 function get_ghosts_autotasks() 1726 { 1727 global $conf, $page; 1728 1729 $conf_UAM = unserialize($conf['UserAdvManager']); 1730 1731 $users = array(); 1732 1733 // search users depending expiration date and reminder sent 1734 $query = ' 1735 SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id, 1736 lv.lastvisit, 1737 lv.reminder 1738 FROM '.USERS_TABLE.' AS u 1739 INNER JOIN '.USER_LASTVISIT_TABLE.' AS lv 1740 ON u.'.$conf['user_fields']['id'].' = lv.user_id 1741 WHERE (TO_DAYS(NOW()) - TO_DAYS(lv.lastvisit) >= "'.$conf_UAM[17].'") 1742 AND lv.reminder = "true" 1743 ORDER BY lv.lastvisit ASC;'; 1744 1745 $result = pwg_query($query); 1746 1747 while ($row = pwg_db_fetch_assoc($result)) 1748 { 1749 $user = $row; 1750 $user['groups'] = array(); 1751 1752 array_push($users, $user); 1753 } 1754 1755 // add group lists 1756 $user_ids = array(); 1757 foreach ($users as $i => $user) 1758 { 1759 $user_ids[$i] = $user['id']; 1760 } 1761 1762 return $users; 1763 } 1764 1765 1549 1766 /** 1550 1767 * Function called from UAM_admin.php - Get all users to display the number of days since their last visit … … 1823 2040 1824 2041 /** 1825 * check_consult- Thx to LucMorizur2042 * UAM_check_profile - Thx to LucMorizur 1826 2043 * checks if a user id is registered as having already 1827 2044 * visited his profile.php page. … … 1836 2053 * 1837 2054 */ 1838 function check_consult($uid, &$user_idsOK)2055 function UAM_check_profile($uid, &$user_idsOK) 1839 2056 { 1840 2057 $t = array(); -
extensions/NBC_UserAdvManager/trunk/include/upgradedb.inc.php
r7955 r8065 2 2 /** 3 3 * @author Eric@piwigo.org 4 * @copyright 2010 5 * 4 * 6 5 * Upgrade processes for old plugin version 7 6 * Called from maintain.inc.php on plugin activation … … 96 95 function upgrade_212_213() 97 96 { 98 /* Create missing table */ 97 // Create missing table 99 98 $query = " 100 99 ALTER TABLE ".USER_CONFIRM_MAIL_TABLE." … … 104 103 pwg_query($query); 105 104 106 /* Upgrade plugin configuration */ 105 // Upgrade plugin configuration 107 106 global $conf; 108 107 … … 164 163 global $conf; 165 164 166 /* Changing parameter name */ 165 // Changing parameter name 167 166 $q = ' 168 167 UPDATE '.CONFIG_TABLE.' … … 179 178 pwg_query($q); 180 179 181 /* Upgrading ConfirmMail options */ 180 // Upgrading ConfirmMail options 182 181 $query = ' 183 182 SELECT value … … 214 213 global $conf; 215 214 216 /* Upgrading options */ 215 // Upgrading options 217 216 $query = ' 218 217 SELECT value … … 268 267 } 269 268 270 /* upgrade from 2.15. 9to 2.16.0 */269 /* upgrade from 2.15.x to 2.16.0 */ 271 270 /* ***************************** */ 272 function upgrade_215 9_2160()271 function upgrade_215_2160() 273 272 { 274 273 global $conf; 275 274 276 /* Upgrading options */ 275 // Upgrading options 277 276 $query = ' 278 277 SELECT value … … 291 290 $Newconf_UAM[25] = 'Sorry, your account has been deleted due to a too long time passed since your last visit.'; 292 291 $Newconf_UAM[26] = 'Sorry, your account has been deprecated due to a too long time passed since your last visit. Please, use the following link to revalidate your account.'; 292 $Newconf_UAM[27] = '-1'; 293 $Newconf_UAM[28] = '-1'; 293 294 294 295 $update_conf = serialize($Newconf_UAM); … … 306 307 $query = ' 307 308 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 308 VALUES ("UserAdvManager_Version","2.1 5.8","UAM version check")309 VALUES ("UserAdvManager_Version","2.16.0","UAM version check") 309 310 ;'; 310 311 -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php
r7935 r8065 13 13 '; 14 14 $lang['UAM_miscTitle'] = 'Suivi des inscrits et fonctions diverses'; 15 $lang['UAM_miscTitle_d'] = '16 - Gestion des visiteurs fantômes<br>17 - Suivi des visiteurs inscrits<br>18 - Pseudo obligatoire sur commentaire pour les visiteurs<br>19 ...20 ';21 15 $lang['UAM_casenTitle'] = 'Noms d\'utilisateurs : Sensibilité à la casse'; 22 16 $lang['UAM_carexcTitle'] = 'Noms d\'utilisateurs : Exclusion de certains caractères'; … … 56 50 $lang['UAM_remailtxt2Title'] = 'Message de rappel sans regénération de clé'; 57 51 $lang['UAM_ghosttrackerTitle'] = 'Gestion des visiteurs fantômes (aussi appelée Ghost Tracker)'; 58 $lang['UAM_ghosttrackerTitle_d'] = 'L\'activation de cette fonction permet la gestion des visiteurs inscrits en fonction de la fréquence de leurs visites. Une fois atteint le délai entre 2 visites successives, le visiteur apparaît dans le tableau de l\'onglet "Ghost Tracker" d\'où il est possible de le relancer par email.<br><br>59 <b style="color: red;">IMPORTANT : A première activation de cette fonction, ou à sa réactivation après une longue période pendant laquelle de nouveaux visiteurs se sont inscrits, il convient d\'initialiser le Ghost Tracker (voir les instructions correspondantes sur l\'onglet "Ghost Tracker").</b>';60 52 $lang['UAM_gttextTitle'] = 'Message de rappel Ghost Tracker'; 61 53 $lang['UAM_lastvisitTitle'] = 'Suivi des utilisateurs inscrits'; … … 134 126 <b>Fonction de tri du tableau</b>: Vous pouvez trier les données affichées en cliquant sur les entêtes de colonnes. L\'utilisation de la touche MAJ ou SHIFT permet de trier sur 1 à 4 colonnes simultanées maximum.'; 135 127 $lang['UAM_confirmmailTitle'] = 'Confirmation d\'inscription'; 136 $lang['UAM_confirmmailTitle_d'] = 'Cette option permet soit à un utilisateur de valider son inscription en cliquant sur un lien reçu dans un email envoyé dès son enregistrement sur la galerie soit à l\'administrateur d\'activer manuellement les inscriptions.<br><br>128 $lang['UAM_confirmmailTitle_d'] = 'Cette option permet soit à un utilisateur de valider son inscription en cliquant sur un lien reçu dans un email envoyé dès son enregistrement sur la galerie, soit à l\'administrateur d\'activer manuellement les inscriptions.<br><br> 137 129 Dans le premier cas, le message envoyé comprend une partie fixe, avec le lien d\'activation généré à partir d\'une clef aléatoire (cette clé peut éventuellement être régénérée via l\'onglet "Suivi des validations"), et une partie personnalisable par un texte d\'accueil. 138 130 <br><br> … … 154 146 155 147 156 // --------- Starting below: New or revised $lang ---- from version 2.15.7157 $lang['UAM_GTAutoTitle'] = 'Gestion automatique des utilisateurs fantomes';158 $lang['UAM_GTAutoTitle_d'] = 'Cette option permet d\'appliquer des règles de gestion automatisée des visiteurs fantômes. Lorsque ce mode est actif, on partira du principe qu\'un visiteur ayant atteind la limite maximale entre deux visites et ayant déjà été notifié par mail est considéré comme expiré.';159 $lang['UAM_GTAutoDelTitle'] = 'Suppression automatique des comptes expirés';160 $lang['UAM_GTAutoDelTitle_d'] = 'Supprime automatiquement le compte d\'un utilisateur lorsque celui-ci est expiré. La suppression survient lors de la connexion de l\'utilisateur qui est alors redirigé vers une page annonçant que sont compte a été détruit. Un texte personnalisé peut être saisi dans le champ ci-dessous.<br>161 Ce champ est compatible avec l\'extension FCK Editor et, pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.<br><br>162 Note : Lorsque cette option est active, les autres règles automatiques ne sont pas accessibles.';163 $lang['UAM_GTAutoGpTitle'] = 'Changement automatique de groupe / statut';164 $lang['UAM_GTAutoGpTitle_d'] = 'Changement automatique de groupe / statut';165 $lang['UAM_GTAutoMailTitle'] = 'Emailing automatique des comptes expirés';166 $lang['UAM_GTAutoMailTitle_d'] = 'Emailing automatique des comptes expirés';167 // --------- End: New or revised $lang ---- from version 2.15.7168 169 170 148 // --------- Starting below: New or revised $lang ---- from version 2.16.0 149 $lang['UAM_ghosttrackerTitle_d'] = 'L\'activation de cette fonction permet la gestion des visiteurs inscrits en fonction de la fréquence de leurs visites. 2 fonctionnements sont possibles:<br><br> 150 - Gestion manuelle : Lorsque le délai entre 2 visites successives est atteint, le visiteur apparaît dans le tableau de l\'onglet "Ghost Tracker" d\'où il est possible de le relancer manuellement par email ou le supprimer.<br><br> 151 - Gestion automatisée : Lorsque le délai entre 2 visites successives est atteint, le visiteur est automatiquement soit supprimé, soit basculé dans un groupe et/ou statut d\'attente. Dans ce deuxième cas, un email d\'information peut lui être envoyé.<br><br><br> 152 <b style="color: red;">IMPORTANT : A première activation de cette fonction, ou à sa réactivation après une longue période pendant laquelle de nouveaux visiteurs se sont inscrits, il convient d\'initialiser le Ghost Tracker (voir les instructions correspondantes sur l\'onglet "Ghost Tracker").</b>'; 153 $lang['UAM_miscTitle_d'] = ' 154 - Gestion automatique ou manuelle des visiteurs fantômes<br> 155 - Suivi des visiteurs inscrits<br> 156 - Pseudo obligatoire sur commentaire pour les visiteurs<br> 157 ... 158 '; 171 159 $lang['UAM_mailexcTitle_d'] = 'Par défaut, Piwigo accepte toutes les adresses de messagerie au format xxx@yyy.zz. L\'activation de cette option permet d\'exclure certains domaines selon le format : @[nom_du_domaine].[extension_du_domaine].<br><br> 172 160 Exemples :<br> … … 191 179 $lang['UAM_gttextTitle_d'] = 'Saisissez ici le texte qui apparaîtra dans l\'email de rappel pour inciter l\'utilisateur à revenir visiter votre galerie (NB: Le texte pré-renseigné à l\'installation du plugin est donné à titre d\'exemple).<br><br> 192 180 Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.'; 181 $lang['UAM_GTAutoTitle'] = 'Gestion automatique des utilisateurs fantomes'; 182 $lang['UAM_GTAutoTitle_d'] = 'Cette option permet d\'appliquer des règles de gestion automatisée des visiteurs fantômes. 183 <br><br>Principe de base : Un compte d\'utilisateur ayant atteind la limite maximale entre deux visites <b>et</b> ayant déjà été notifié par email est considéré comme expiré. On peut alors appliquer des règles de traitement automatisées telles que la suppression automatique des comptes expirés ou leur rétrogradation en restreignant l\'accès à la galerie (bascule automatique dans un groupe et/ou un statut à accès restreint). 184 <br><br>Le déclenchement de ces automatismes se réalise lors de la connexion des utilisateurs (n\'importe quel utilisateur !)à la galerie.'; 185 $lang['UAM_GTAutoDelTitle'] = 'Suppression automatique des comptes expirés'; 186 $lang['UAM_GTAutoDelTitle_d'] = 'Supprime automatiquement le compte d\'un utilisateur lorsque celui-ci est expiré. 187 <br><br>Fonction à utiliser avec précaution car la suppression des comptes est définitive et sans appel !<br><br> 188 La suppression survient lors de la connexion de l\'utilisateur qui est alors redirigé vers une page annonçant que son compte a été détruit. Un texte personnalisé peut être saisi dans le champ ci-dessous.<br> 189 Ce champ est compatible avec l\'extension FCK Editor et, pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.<br><br> 190 Note : Lorsque cette option est active, les autres règles automatiques ne sont pas accessibles.'; 191 $lang['UAM_GTAutoGpTitle'] = 'Changement automatique de groupe / statut'; 192 $lang['UAM_GTAutoGpTitle_d'] = 'Le changement automatique de groupe ou de statut équivaut à une rétrogradation des comptes concernés et fonctionne sur le même principe que le groupe ou le statut de validation (voir "Paramétrage des confirmations et validations d\'inscriptions"). Il conviendra donc de définir un groupe et/ou un statut rétrogradant l\'accès à la galerie. Si cela a déjà été défini avec l\'utilisation de la fonction Confirmation d\'inscription, on peut utiliser ces mêmes groupe / statut.'; 193 $lang['UAM_GTAutoMailTitle'] = 'Email automatique sur changement de groupe / statut'; 194 $lang['UAM_GTAutoMailTitle_d'] = 'Lorsqu\'un compte est expiré (changement de groupe / statut rétrogradant le visiteur), un email d\'information peut être envoyé pour préciser les raisons de ce changement et le moyen de recouvrer l\'accès initial à la galerie. 195 <br>Pour ce faire, un lien de revalidation de l\'inscription est joint à l\'email (génération automatique d\'une nouvelle clé de validation). 196 <br><br>Saisissez aussi le texte personnalisé qui expliquera les raisons de la rétrogradation et qui accompagnera le lien de validation. Le texte personnalisé n\'est pas obligatoire mais vivement conseillé. En effet, vos visiteurs inscrits n\'apprécieront que moyennement de recevoir un email ne contenant qu\'un simple lien sans plus d\'explications. ;-) 197 <br><br>Pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif. 198 <br><br><b style="color: red;">Attention : L\'emploi de cette fonction est intimement lié à l\'option de confirmation d\'inscription par l\'utilisateur (confirmation par mail) et ne peut pas être activée sans cette option.</b>'; 193 199 // --------- End: New or revised $lang ---- from version 2.16.0 194 200 ?> -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r7935 r8065 271 271 272 272 // --------- Starting below: New or revised $lang ---- from version 2.16.0 273 $lang['UAM_Expired_Group'] = '<b>Groupe</b> pour les utilisateurs dont l\'inscription aura expirée<br>'; 274 $lang['UAM_Expired_Status'] = '<b>Statut</b> pour les utilisateurs dont l\'inscription aura expirée<br>'; 273 275 $lang['UAM_GTAuto'] = 'Gestion automatique des utilisateurs fantomes'; 274 276 $lang['UAM_GTAuto_false'] = ' Désactiver (valeur par défaut)'; … … 278 280 $lang['UAM_GTAutoDel_false'] = ' Désactiver (valeur par défaut)'; 279 281 $lang['UAM_GTAutoDel_true'] = ' Activer'; 280 $lang['UAM_GTAutoMail'] = 'Email ing de rappel automatique';282 $lang['UAM_GTAutoMail'] = 'Email automatique sur changement de groupe / statut'; 281 283 $lang['UAM_GTAutoMail_false'] = ' Désactiver (valeur par défaut)'; 282 284 $lang['UAM_GTAutoMail_true'] = ' Activer'; 285 $lang['Deleted_Account_Redirection_Page'] = 'Accès refusé - Compte détruit !'; 286 $lang['title_redir_page'] = 'Accès refusé pour cause de compte détruit !'; 287 $lang['Error_GTAutoMail_cannot_be_set_without_ConfirmMail'] = 'Erreur de cohérence dans la configuration choisie :<br><br> 288 "Paramétrage des suivis des inscrits et autres options > Gestion des visiteurs fantômes (Ghost Tracker) > Gestion automatique des utilisateurs fantomes > Email automatique sur changement de groupe / statut" ne peut pas être activé si "Paramétrage des confirmations et validations d\'inscriptions > Confirmation d\'inscription - Validation par le visiteur" n\'est pas activé au préalable.<br><br> 289 Pour garantir la cohérence, l\'option "Email automatique sur changement de groupe / statut" a été automatiquement repositionnée en "désactivé".<br><br>'; 290 $lang['Demotion of %s'] = 'Rétrogradation de %s'; 283 291 // --------- End: New or revised $lang ---- from version 2.16.0 284 292 ?> -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r7955 r8065 2 2 /* 3 3 Plugin Name: UserAdvManager 4 Version: 2.16.0 -alpha4 Version: 2.16.0b 5 5 Description: Renforcer la gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 … … 47 47 48 48 // Redirection to profile page 49 add_event_handler('login_success', 'RedirectToProfile'); 49 add_event_handler('login_success', 'UAM_LoginTasks'); 50 50 51 51 52 // *** Important ! This is necessary to make email exclusion work in admin's users management panel *** -
extensions/NBC_UserAdvManager/trunk/maintain.inc.php
r7955 r8065 26 26 Best regards, 27 27 28 The admin of the gallery.','false','false','false' );28 The admin of the gallery.','false','false','false','false','false','false','Sorry, your account has been deleted due to a too long time passed since your last visit.','Sorry, your account has been deprecated due to a too long time passed since your last visit. Please, use the following link to revalidate your account.',-1,-1); 29 29 30 30 $q = ' … … 180 180 } 181 181 182 182 /* Check for upgrade from 2.15 to 2.16 */ 183 /* *********************************** */ 183 184 $query = ' 184 185 SELECT param … … 190 191 if ($count == 0) 191 192 { 192 upgrade_2159_2160(); 193 /* upgrade from branch 2.15 to 2.16 */ 194 /* ******************************** */ 195 upgrade_215_2160(); 193 196 } 194 197
Note: See TracChangeset
for help on using the changeset viewer.