Changeset 5763


Ignore:
Timestamp:
04/10/10 17:15:30 (10 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

Merged from trunk to branch 2.15

Location:
extensions/NBC_UserAdvManager/branches/2.15
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/branches/2.15/admin/UAM_admin.php

    r5634 r5763  
    5959// +-----------------------------------------------------------------------+ 
    6060$plugin =  PluginInfos(UAM_PATH); 
    61 $version = $plugin['version'] ; 
     61$version = $plugin['version']; 
    6262 
    6363 
  • extensions/NBC_UserAdvManager/branches/2.15/admin/template/global.tpl

    r5593 r5763  
    535535  </div> 
    536536</div> 
    537  
     537<fieldset> 
     538  {'UAM_Support_txt'|@translate} 
     539</fieldset> 
    538540 
    539541<script type="text/javascript"> 
  • extensions/NBC_UserAdvManager/branches/2.15/changelog.txt.php

    r5634 r5763  
    167167            Bug 1572 fixed - Fix unable to read resource: "ConfirmMail.tpl" 
    168168            Bug 1574 fixed - Beautifying ConfirmMail page 
    169             Bug 1576 fixed - Compatibility with other database systems than MySql like PostgreSql or Sqlite. Using Piwigo's pwg_db_### integrated functions. 
     169            Bug 1576 partially fixed - Compatibility with other database systems than MySql like PostgreSql or Sqlite. Using Piwigo's pwg_db_### integrated functions. There are 2 php functions for mysql still missing for PostgreSql and Sqlite 
     170            Bug 1586 fixed - Links to official forum topic support and bugtacker were added in plugin's admin page   
    170171*/ 
    171172?> 
  • extensions/NBC_UserAdvManager/branches/2.15/language/de_DE/plugin.lang.php

    r5634 r5763  
    258258 
    259259// --------- Starting below: New or revised $lang ---- from version 2.15.1 
    260 $lang['reg_err_mail_address_dbl'] = 'This email address is already used.'; 
     260$lang['reg_err_mail_address_dbl'] = 'Diese E-Mail-Adresse wird bereits verwendet.'; 
     261$lang['UAM_Support_txt'] = 'Die offizielle Unterstützung für dieses Plugin ist nur auf diesem Diskussionsforum von Piwigo:<br> 
     262<a href="http://fr.piwigo.org/forum/viewtopic.php?id=12775" onclick="window.open(this.href);return false;">Französisch-Forum - http://fr.piwigo.org/forum/viewtopic.php?id=12775</a> 
     263<br>oder<br> 
     264<a href="http://piwigo.org/forum/viewtopic.php?id=15015" onclick="window.open(this.href);return false;">Englisch-Forum - http://piwigo.org/forum/viewtopic.php?id=15015</a><br><br> 
     265Ebenfalls erhältlich, das Projekt Bugtracker: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>'; 
    261266// --------- End: New or revised $lang ---- from version 2.15.1 
    262267?> 
  • extensions/NBC_UserAdvManager/branches/2.15/language/en_UK/plugin.lang.php

    r5634 r5763  
    255255 
    256256// --------- Starting below: New or revised $lang ---- from version 2.15.1 
    257 $lang['reg_err_mail_address_dbl'] = 'Diese E-Mail-Adresse wird bereits verwendet.'; 
     257$lang['reg_err_mail_address_dbl'] = 'This email address is already used.'; 
     258$lang['UAM_Support_txt'] = 'The official support on this plugin is only on these Piwigo forum topic:<br> 
     259<a href="http://fr.piwigo.org/forum/viewtopic.php?id=12775" onclick="window.open(this.href);return false;">French forum - http://fr.piwigo.org/forum/viewtopic.php?id=12775</a> 
     260<br>or<br> 
     261<a href="http://piwigo.org/forum/viewtopic.php?id=15015" onclick="window.open(this.href);return false;">English forum - http://piwigo.org/forum/viewtopic.php?id=15015</a><br><br> 
     262Also available, the project\'s bugtracker: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>'; 
    258263// --------- End: New or revised $lang ---- from version 2.15.1 
    259264?> 
  • extensions/NBC_UserAdvManager/branches/2.15/language/es_ES/plugin.lang.php

    r5634 r5763  
    258258// --------- Starting below: New or revised $lang ---- from version 2.15.1 
    259259$lang['reg_err_mail_address_dbl'] = 'Esta dirección de correo electrónico ya se utiliza.'; 
     260$lang['UAM_Support_txt'] = 'El apoyo oficial sobre este plugin es sólo sobre estos tema en el foro de Piwigo:<br> 
     261<a href="http://fr.piwigo.org/forum/viewtopic.php?id=12775" onclick="window.open(this.href);return false;">Foro Francés - http://fr.piwigo.org/forum/viewtopic.php?id=12775</a> 
     262<br>o<br> 
     263<a href="http://piwigo.org/forum/viewtopic.php?id=15015" onclick="window.open(this.href);return false;">Foro Inglés - http://piwigo.org/forum/viewtopic.php?id=15015</a><br><br> 
     264También está disponible, el bugtracker del proyecto: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>'; 
    260265// --------- End: New or revised $lang ---- from version 2.15.1 
    261266?> 
  • extensions/NBC_UserAdvManager/branches/2.15/language/fr_FR/plugin.lang.php

    r5634 r5763  
    255255// --------- Starting below: New or revised $lang ---- from version 2.15.1 
    256256$lang['reg_err_mail_address_dbl'] = 'Cette adresse email est déjà utilisée.'; 
     257$lang['UAM_Support_txt'] = 'Le support officiel sur ce plugin se fait exclusivement sur ces fils du forum Piwigo:<br> 
     258<a href="http://fr.piwigo.org/forum/viewtopic.php?id=12775" onclick="window.open(this.href);return false;">Forum français - http://fr.piwigo.org/forum/viewtopic.php?id=12775</a> 
     259<br>ou<br> 
     260<a href="http://piwigo.org/forum/viewtopic.php?id=15015" onclick="window.open(this.href);return false;">Forum anglais - http://piwigo.org/forum/viewtopic.php?id=15015</a><br><br> 
     261Egalement disponible, le bugtracker du projet: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>'; 
    257262// --------- End: New or revised $lang ---- from version 2.15.1 
    258263?> 
  • extensions/NBC_UserAdvManager/branches/2.15/language/it_IT/plugin.lang.php

    r5634 r5763  
    9898// --------- Starting below: New or revised $lang ---- from version 2.12.8 
    9999/* Errors and Warnings */ 
    100 $lang['mail_exclusionlist_error'] = 'Attenzione! Avete inserito una nuova riga all\'inizio della lista d\'esclusione Email (indicato in rosso qui sotto). Anche se questa nuova riga non è visibile, con la sua presenza potrebbe causare delle disfunzioni del plugin. Si prega di cancellare la riga vuota.'; 
     100$lang['mail_exclusionlist_error'] = 'Attenzione! Avete inserito una nuova riga all\'inizio dell\'elenco d\'esclusione Email (indicato in rosso qui sotto). Anche se questa nuova riga non è visibile, con la sua presenza potrebbe causare delle disfunzioni del plugin. Si prega di cancellare la riga vuota.'; 
    101101// --------- End: New or revised $lang ---- from version 2.12.8 
    102102 
     
    237237              <ol> 
    238238                <li>Aggiungere un nuovo modulo "Blocco Personale : Mostrare il blocco personale (Nota o Editoriale per esempio)"</li> 
    239                 <li>Configurare il modulo, indicandone il titolo (ad esempio, "in attesa di convalida dell\'iscrizione"), la descrizione, ed in fine selezionando solo il gruppo "Attesa" nella lista dei gruppi ammessi</li> 
     239                <li>Configurare il modulo, indicandone il titolo (ad esempio, "in attesa di convalida dell\'iscrizione"), la descrizione, ed in fine selezionando solo il gruppo "Attesa" nell\'elenco dei gruppi ammessi</li> 
    240240                <li>Completare il contenuto del modulo con il testo da visualizzare per gli utenti non convalidati. Come NBC_UAM, i tag di lingua possono essere utilizzati se il plugin Extended Description è installato ed attivato</li> 
    241241                <li>Selezzionare "Visualizzare il modulo nella homepage del sito"</li> 
     
    258258// --------- Starting below: New or revised $lang ---- from version 2.15.1 
    259259$lang['reg_err_mail_address_dbl'] = 'Questo indirizzo e-mail è già utilizzato.'; 
     260$lang['UAM_Support_txt'] = 'Il supporto ufficiale a questo plugin è solo su questi argomento del forum Piwigo:<br> 
     261<a href="http://fr.piwigo.org/forum/viewtopic.php?id=12775" onclick="window.open(this.href);return false;">Forum francese - http://fr.piwigo.org/forum/viewtopic.php?id=12775</a> 
     262<br>o<br> 
     263<a href="http://piwigo.org/forum/viewtopic.php?id=15015" onclick="window.open(this.href);return false;">Forum inglese - http://piwigo.org/forum/viewtopic.php?id=15015</a><br><br> 
     264Disponibile anche, il bugtracker del progetto: <a href="http://piwigo.org/bugs/" onclick="window.open(this.href);return false;">http://piwigo.org/bugs/</a>'; 
    260265// --------- End: New or revised $lang ---- from version 2.15.1 
    261266?> 
  • extensions/NBC_UserAdvManager/branches/2.15/maintain.inc.php

    r5634 r5763  
    8181/* *********************** */ 
    8282  clean_obsolete_files(); 
    83  
    84 /* Check if it's a blank installation */ 
    85 /* ********************************** */ 
     83   
     84  include_once (UAM_PATH.'include/upgradedb.inc.php'); 
     85 
     86/* Check if old version is < 2.15 */ 
     87/* ****************************** */ 
    8688        $query = ' 
    8789SELECT param 
    8890  FROM '.CONFIG_TABLE.' 
    89 WHERE param = "nbc_UserAdvManager_ConfirmMail" 
    90 ;'; 
    91   $count1 = pwg_db_num_rows(pwg_query($query)); 
    92    
    93         $query1 = ' 
    94 SELECT param 
    95   FROM '.CONFIG_TABLE.' 
    96 WHERE param = "nbc_UserAdvManager_ConfirmMail" 
    97 ;'; 
    98   $count2 = pwg_db_num_rows(pwg_query($query1)); 
     91WHERE param = "nbc_UserAdvManager" 
     92;'; 
     93  $count = pwg_db_num_rows(pwg_query($query)); 
    9994 
    10095/* If old params exist an upgrade is needed */ 
    10196/* **************************************** */ 
    102   if ($count1 == 1 or $count2 == 1) 
     97  if ($count == 1) 
    10398  { 
    10499/* Check for upgrade from 2.10 to 2.11 */ 
     
    115110    /* upgrade from branch 2.10 to 2.11 */ 
    116111    /* ******************************** */ 
    117       upgrade_210(); 
     112      upgrade_210_211(); 
    118113    } 
    119114 
     
    125120    /* upgrade from branch 2.11 to 2.12 */ 
    126121    /* ******************************** */ 
    127                 upgrade_211(); 
     122                upgrade_211_212(); 
    128123    } 
    129124 
     
    147142    /* upgrade from branch 2.12 to 2.13 */ 
    148143    /* ******************************** */ 
    149       upgrade_212(); 
     144      upgrade_212_213(); 
    150145    } 
    151146 
     
    157152    /* upgrade from branch 2.13 to 2.14 */ 
    158153    /* ******************************** */ 
    159       upgrade_213(); 
    160     } 
    161    
    162  
    163 /* Check for upgrade from 2.14.1 to 2.14.2 */ 
    164 /* *************************************** */ 
     154      upgrade_213_214(); 
     155    } 
     156     
     157 
     158/* Check for upgrade from 2.14 to 2.15 */ 
     159/* *********************************** */ 
    165160        $query1 = ' 
    166161SELECT param 
     
    179174    if ($count1 == 1 or $count2 == 1) 
    180175    { 
    181     /* upgrade from branch 2.14.1 to 2.14.2 */ 
    182     /* ************************************ */ 
    183       upgrade_214_1(); 
     176    /* upgrade from branch 2.14 to 2.15 */ 
     177    /* ******************************** */ 
     178      upgrade_214_215(); 
    184179    } 
    185180  } 
     181   
     182/* Check for upgrade from 2.15 to 2.xx */ 
     183/* *********************************** */ 
    186184} 
    187185 
     
    217215  pwg_query( $q ); 
    218216} 
    219  
    220  
    221 // +----------------------------------------------------------+ 
    222 // |       Upgrading database from old plugin versions        | 
    223 // +----------------------------------------------------------+ 
    224  
    225 /* upgrade from branch 2.10 to 2.11 */ 
    226 /* ******************************** */ 
    227 function upgrade_210() 
    228 { 
    229         global $conf; 
    230            
    231   $q = ' 
    232 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 
    233 VALUES ("nbc_UserAdvManager_ConfirmMail","false;5;Hello. 
    234                  
    235 This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration. 
    236  
    237 Note: After this period, your account will be permanently deleted.;false;Hello. 
    238  
    239 This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered. 
    240  
    241 Note: After this period, your account will be permanently deleted.","Parametres nbc_UserAdvManager - ConfirmMail") 
    242   ;'; 
    243   pwg_query($q); 
    244  
    245   upgrade_211(); 
    246 } 
    247  
    248  
    249 /* upgrade from branch 2.11 to 2.12 */ 
    250 /* ******************************** */ 
    251 function upgrade_211() 
    252 { 
    253         global $conf; 
    254  
    255   $conf_UAM = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 
    256  
    257   if ((!isset($conf_UAM[14]) and !isset($conf_UAM[15])) and !isset($conf_UAM[16]) and !isset($conf_UAM[17])) 
    258   { 
    259     $upgrade_UAM = $conf_UAM[0].';'.$conf_UAM[1].';'.$conf_UAM[2].';'.$conf_UAM[3].';'.$conf_UAM[4].';'.$conf_UAM[5].';'.$conf_UAM[6].';'.$conf_UAM[7].';'.$conf_UAM[8].';'.$conf_UAM[9].';'.$conf_UAM[10].';'.$conf_UAM[11].';'.$conf_UAM[12].';'.$conf_UAM[13].';false;100;false;false;10;Hello. 
    260          
    261 This is a reminder because a very long time passed since your last visit on our gallery. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 
    262  
    263 On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account. 
    264  
    265 Best regards, 
    266  
    267 The admin of the gallery.'; 
    268                  
    269                 $query = ' 
    270 UPDATE '.CONFIG_TABLE.' 
    271 SET value="'.$upgrade_UAM.'" 
    272 WHERE param="nbc_UserAdvManager" 
    273 LIMIT 1 
    274 ;'; 
    275                 pwg_query($query); 
    276   } 
    277    
    278         $q = " 
    279 CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." ( 
    280   user_id SMALLINT(5) NOT NULL DEFAULT '0', 
    281   lastvisit DATETIME NULL DEFAULT NULL, 
    282   reminder ENUM('true','false') NULL, 
    283 PRIMARY KEY (`user_id`) 
    284   ) 
    285 ;"; 
    286   pwg_query($q); 
    287  
    288   upgrade_212(); 
    289 } 
    290  
    291  
    292 /* upgrade from branch 2.12 to 2.13 */ 
    293 /* ******************************** */ 
    294 function upgrade_212() 
    295 { 
    296 /* Create missing table */ 
    297   $query = " 
    298 ALTER TABLE ".USER_CONFIRM_MAIL_TABLE." 
    299 ADD reminder ENUM('true', 'false') NULL DEFAULT NULL 
    300 ;"; 
    301    
    302   pwg_query($query); 
    303  
    304 /* Upgrade plugin configuration */ 
    305         global $conf; 
    306  
    307   $conf_UAM = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 
    308  
    309   if ((!isset($conf_UAM[20]))) 
    310   { 
    311     $upgrade_UAM = $conf_UAM[0].';'.$conf_UAM[1].';'.$conf_UAM[2].';'.$conf_UAM[3].';'.$conf_UAM[4].';'.$conf_UAM[5].';'.$conf_UAM[6].';'.$conf_UAM[7].';'.$conf_UAM[8].';'.$conf_UAM[9].';'.$conf_UAM[10].';'.$conf_UAM[11].';'.$conf_UAM[12].';'.$conf_UAM[13].';'.$conf_UAM[14].';'.$conf_UAM[15].';'.$conf_UAM[16].';'.$conf_UAM[17].';'.$conf_UAM[18].';'.$conf_UAM[19].';false'; 
    312                  
    313                 $query = ' 
    314 UPDATE '.CONFIG_TABLE.' 
    315 SET value="'.$upgrade_UAM.'" 
    316 WHERE param="nbc_UserAdvManager" 
    317 LIMIT 1 
    318 ;'; 
    319                 pwg_query($query); 
    320      
    321     upgrade_213(); 
    322   } 
    323 } 
    324  
    325  
    326 /* upgrade from branch 2.13 to 2.14 */ 
    327 /* ******************************** */ 
    328 function upgrade_213() 
    329 { 
    330         global $conf; 
    331    
    332   $conf_UAM = explode(';', $conf['nbc_UserAdvManager']); 
    333  
    334   $upgrade_UAM = array($conf_UAM[0],$conf_UAM[1],$conf_UAM[2],$conf_UAM[3],$conf_UAM[4],$conf_UAM[5],$conf_UAM[6],$conf_UAM[7],$conf_UAM[8],$conf_UAM[9],$conf_UAM[10],$conf_UAM[11],$conf_UAM[12],$conf_UAM[13],$conf_UAM[14],$conf_UAM[15],$conf_UAM[16],$conf_UAM[17],$conf_UAM[18],$conf_UAM[19],$conf_UAM[20],'false'); 
    335  
    336   $query = ' 
    337 UPDATE '.CONFIG_TABLE.' 
    338   SET value = "'.addslashes(serialize($upgrade_UAM)).'" 
    339   WHERE param = "nbc_UserAdvManager" 
    340 ;'; 
    341   pwg_query($query); 
    342    
    343   if (unserialize($conf['nbc_UserAdvManager_ConfirmMail']) === false) 
    344   { 
    345     $data = explode(';', $conf['nbc_UserAdvManager_ConfirmMail']); 
    346  
    347     $query = ' 
    348 UPDATE '.CONFIG_TABLE.' 
    349   SET value = "'.addslashes(serialize($data)).'" 
    350   WHERE param = "nbc_UserAdvManager_ConfirmMail" 
    351 ;'; 
    352     pwg_query($query); 
    353      
    354     upgrade_214_1(); 
    355   } 
    356 } 
    357  
    358 function upgrade_214_1() 
    359 { 
    360   global $conf; 
    361  
    362 /* Changing parameter name */ 
    363   $q = ' 
    364 UPDATE '.CONFIG_TABLE.' 
    365 SET param = "UserAdvManager" 
    366 WHERE param = "nbc_UserAdvManager" 
    367 ;'; 
    368   pwg_query($q); 
    369    
    370   $q = ' 
    371 UPDATE '.CONFIG_TABLE.' 
    372 SET param = "UserAdvManager_ConfirmMail" 
    373 WHERE param = "nbc_UserAdvManager_ConfirmMail" 
    374 ;'; 
    375   pwg_query($q); 
    376  
    377 /* Upgrading ConfirmMail options */ 
    378   $query = ' 
    379 SELECT value 
    380   FROM '.CONFIG_TABLE.' 
    381 WHERE param = "UserAdvManager_ConfirmMail" 
    382 ;'; 
    383  
    384   $result = pwg_query($query); 
    385   $conf_UAM_ConfirmMail = pwg_db_fetch_assoc($result); 
    386      
    387   $conf_ConfirmMail = unserialize($conf_UAM_ConfirmMail['value']); 
    388    
    389   $conf_ConfirmMail[5] ='Thank you to have confirmed your email address and your registration on the gallery. Have fun !'; 
    390   $conf_ConfirmMail[6] ='Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'; 
    391    
    392   $update_conf = serialize($conf_ConfirmMail); 
    393      
    394   $query = ' 
    395       UPDATE '.CONFIG_TABLE.' 
    396                         SET value="'.addslashes($update_conf).'" 
    397                         WHERE param="UserAdvManager_ConfirmMail" 
    398                         LIMIT 1 
    399                 ;'; 
    400  
    401                 pwg_query($query); 
    402 } 
    403217?> 
Note: See TracChangeset for help on using the changeset viewer.