Changeset 6898 for extensions/Register_FluxBB
- Timestamp:
- Sep 13, 2010, 9:42:39 PM (14 years ago)
- Location:
- extensions/Register_FluxBB/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Register_FluxBB/trunk/admin/admin.php
r6815 r6898 7 7 if (!defined('REGFLUXBB_PATH')) define('REGFLUXBB_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 8 8 9 //ini_set('error_reporting', E_ALL);10 //ini_set('display_errors', true);9 ini_set('error_reporting', E_ALL); 10 ini_set('display_errors', true); 11 11 12 12 include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); … … 574 574 if (isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details'])) 575 575 { 576 $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group']; 577 578 $query = ' 576 577 /* Configuration controls */ 578 // Piwigo's admin username control 579 $query1 = " 580 SELECT username, id 581 FROM ".USERS_TABLE." 582 WHERE id = ".$conf['webmaster_id']." 583 ;"; 584 585 $pwgadmin = pwg_db_fetch_assoc(pwg_query($query1)); 586 587 // FluxBB's admin username control 588 $query2 = " 589 SELECT username, id 590 FROM ".FluxBB_USERS_TABLE." 591 WHERE id = 2 592 ;"; 593 594 $fbbadmin = pwg_db_fetch_assoc(pwg_query($query2)); 595 596 // FluxBB's Guest username control 597 $query3 = " 598 SELECT username, id 599 FROM ".FluxBB_USERS_TABLE." 600 WHERE id = 1 601 ;"; 602 603 $fbbguest = pwg_db_fetch_assoc(pwg_query($query3)); 604 605 // Compute configuration errors 606 if (stripslashes($pwgadmin['username']) != stripslashes($_POST['FluxBB_admin'])) 607 { 608 array_push($page['errors'], l10n('error_config_admin1')); 609 } 610 if (stripslashes($pwgadmin['username']) != stripslashes($fbbadmin['username'])) 611 { 612 array_push($page['errors'], l10n('error_config_admin2')); 613 } 614 if (stripslashes($fbbguest['username']) != stripslashes($_POST['FluxBB_guest'])) 615 { 616 array_push($page['errors'], l10n('error_config_guest')); 617 } 618 elseif (count($page['errors']) == 0) 619 { 620 if (!function_exists('FindAvailableConfirmMailID')) 621 { 622 $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0'; 623 } 624 elseif (function_exists('FindAvailableConfirmMailID')) 625 { 626 $conf_UAM = unserialize($conf['UserAdvManager']); 627 628 if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and isset($conf_UAM[2]) and $conf_UAM[2] != '-1') 629 { 630 $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group']; 631 } 632 else 633 { 634 $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';false;0'; 635 } 636 } 637 638 $query = ' 579 639 UPDATE '.CONFIG_TABLE.' 580 640 SET value="'.$conf['Register_FluxBB'].'" … … 583 643 ;'; 584 644 585 pwg_query($query); 586 587 array_push($page['infos'], l10n('save_config')); 645 pwg_query($query); 646 647 array_push($page['infos'], l10n('save_config')); 648 } 588 649 } 589 650 … … 617 678 $UAM_bridge = true; 618 679 } 619 }620 621 $template->assign(622 array623 (624 'UAM_BRIDGE' => $UAM_bridge,625 'FluxBB_UAM_LINK_TRUE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',626 'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',627 'FluxBB_GROUP' => $conf_Register_FluxBB[7],628 ) 629 );630 680 681 $template->assign( 682 array 683 ( 684 'UAM_BRIDGE' => $UAM_bridge, 685 'FluxBB_UAM_LINK_TRUE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '', 686 'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '', 687 'FluxBB_GROUP' => $conf_Register_FluxBB[7], 688 ) 689 ); 690 } 691 631 692 $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/manage.tpl'); 632 693 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); … … 635 696 636 697 case 'Migration': 698 699 $conf_Register_FluxBB = isset($conf['Register_FluxBB']) ? explode(";" , $conf['Register_FluxBB']) : array(); 637 700 638 701 if ( isset($_POST['Migration']) and !is_adviser() ) … … 654 717 655 718 $result = pwg_query($query); 656 719 657 720 while ($row = pwg_db_fetch_assoc($result)) 658 721 { -
extensions/Register_FluxBB/trunk/admin/template/manage.tpl
r6815 r6898 47 47 <li><label>{'Admin'|@translate}</label><br> 48 48 <input type="text" name="FluxBB_admin" value={$FluxBB_ADMIN} size="20" style="text-align: center;"><br> 49 {'User'|@translate}50 49 <br> 51 50 </li> -
extensions/Register_FluxBB/trunk/language/de_DE/plugin.lang.php
r6815 r6898 19 19 Überprüfen Sie die Einstellungen ihrer FluxBB Installation und korrigieren Sie sie gegebenenfalls. <br> 20 20 Passen Sie das Verhalten des Plugins nach Ihren Wünschen an.'; 21 $lang['FluxBB_Prefix'] = 'FluxBB Tabellenpräfix :'; 22 $lang['FluxBB_Admin'] = 'Benutzername des Piwigo-administrators.'; 21 $lang['Prefix'] = 'FluxBB Tabellenpräfix :'; 23 22 $lang['Guest'] = 'Benutzername des FluxBB Gast-benutzers.'; 24 $lang['User'] = '<div class="warning">Das Administratorkonto von FluxBB muss das selbe sein</div>';25 23 $lang['Details'] = 'Detailgrad der generierten Reports.'; 26 24 $lang['Details_true'] = ' --> Alle Ergebnisdetails anzeigen.'; … … 157 155 Similarly, if you\'ve never used Register_FluxBB, the Piwigo\'s accounts migration phase from your gallery to your FluxBB forum will disregard the state validated or not for the accounts at the launch of the migration phase.'; 158 156 // --------- End: New or revised $lang ---- from version 2.3.0 157 158 // --------- Starting below: New or revised $lang ---- from version 2.3.3 159 /*TODO*/$lang['Admin'] = 'Piwigo\'s administrator username. <b style="color: red">The username of FluxBB\'s administrator account has to be the same!</b>'; 160 /*TODO*/$lang['error_config_admin1'] = 'ERROR : Piwigo\'s admin username is wrong!'; 161 /*TODO*/$lang['error_config_admin2'] = 'ERROR : The name of the FluxBB\'s administrator account is different from that of Piwigo ! Check the configuration of your FluxBB forum and rename the administrator account in the same name as that of Piwigo.'; 162 /*TODO*/$lang['error_config_guest'] = 'ERROR : The name of the FluxBB\'s guest account is wrong!'; 163 // --------- End: New or revised $lang ---- from version 2.3.3 159 164 ?> -
extensions/Register_FluxBB/trunk/language/en_UK/plugin.lang.php
r6815 r6898 19 19 Check the settings of your FluxBB installation and correct them if necessary. <br> 20 20 Change, if any, the behavior of the plugin at your convenience.'; 21 $lang['FluxBB_Prefix'] = 'FluxBB Prefix tables :'; 22 $lang['FluxBB_Admin'] = 'Username of the Piwigo administrator.'; 21 $lang['Prefix'] = 'FluxBB Prefix tables :'; 23 22 $lang['Guest'] = 'Username of the FluxBB Guest user.'; 24 $lang['User'] = '<div class="warning">FluxBB\'s administrator name must be the same</div>';25 23 $lang['Details'] = 'Level of detail in reports of operations.'; 26 24 $lang['Details_true'] = ' --> View all details of the results of operations.'; … … 157 155 Similarly, if you\'ve never used Register_FluxBB, the Piwigo\'s accounts migration phase from your gallery to your FluxBB forum will disregard the state validated or not for the accounts at the launch of the migration phase.'; 158 156 // --------- End: New or revised $lang ---- from version 2.3.0 157 158 // --------- Starting below: New or revised $lang ---- from version 2.3.3 159 $lang['Admin'] = 'Piwigo\'s administrator username. <b style="color: red">The username of FluxBB\'s administrator account has to be the same!</b>'; 160 $lang['error_config_admin1'] = 'ERROR : Piwigo\'s admin username is wrong!'; 161 $lang['error_config_admin2'] = 'ERROR : The name of the FluxBB\'s administrator account is different from that of Piwigo ! Check the configuration of your FluxBB forum and rename the administrator account in the same name as that of Piwigo.'; 162 $lang['error_config_guest'] = 'ERROR : The name of the FluxBB\'s guest account is wrong!'; 163 // --------- End: New or revised $lang ---- from version 2.3.3 159 164 ?> -
extensions/Register_FluxBB/trunk/language/fr_FR/plugin.lang.php
r6815 r6898 20 20 Modifiez, le cas échéant, le comportement du plugin à votre convenance.'; 21 21 $lang['Prefix'] = 'Préfixe des tables de FluxBB :'; 22 $lang['Admin'] = 'Nom d\'utilisateur de l\'administrateur de Piwigo.';23 22 $lang['Guest'] = 'Nom d\'utilisateur de l\'invité de FluxBB.'; 24 $lang['User'] = '<div class="warning">Le nom de l\'administrateur de FluxBB doit être identique</div>';25 23 $lang['Details'] = 'Niveau de détails dans les rapports d\'opérations.'; 26 24 $lang['Details_true'] = ' --> Afficher tous les détails des résultats sur les opérations.'; … … 158 156 De même, si vous n\'avez jamais utilisé Register_FluxBB, la phase de migration des comptes de votre galerie Piwigo vers votre forum FluxBB ne tiendra pas compte de l\'état validé ou non de vos inscrits au moment du lancement de la phase de migration.'; 159 157 // --------- End: New or revised $lang ---- from version 2.3.0 158 159 // --------- Starting below: New or revised $lang ---- from version 2.3.3 160 $lang['Admin'] = 'Nom d\'utilisateur de l\'administrateur de Piwigo. <b style="color: red">Le nom de l\'administrateur de FluxBB doit être identique !</b>'; 161 $lang['error_config_admin1'] = 'ERREUR : Le nom du compte administrateur de Piwigo est incorrect !'; 162 $lang['error_config_admin2'] = 'ERREUR : Le nom du compte administrateur de FluxBB est différent de celui de Piwigo ! Vérifiez la configuration de votre forum FluxBB et nommez le compte administrateur de la même manière que celui de Piwigo.'; 163 $lang['error_config_guest'] = 'ERREUR : Le nom du compte visiteur (guest) de FluxBB est incorrect !'; 164 // --------- End: New or revised $lang ---- from version 2.3.3 160 165 ?> -
extensions/Register_FluxBB/trunk/main.inc.php
r6880 r6898 2 2 /* 3 3 Plugin Name: Register FluxBB 4 Version: 2.3. 24 Version: 2.3.3 5 5 Description: Link user registration from Piwigo to FluxBB forum (registration, password changing, deletion) - Original Nicco's NBC_LinkUser2PunBB plugin upgraded to Piwigo / Liez l'inscription des utilisateurs de Piwigo avec votre forum FluxBB - Portage du plugin NBC_LinkUser2PunBB de Nicco vers Piwigo 6 6 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=252 … … 59 59 2.3.1 - 31/08/10 - Bug 1825 fixed : Password corruption after Piwigo's profile page visit 60 60 61 2.3.2 - 11/09/10 - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation 61 2.3.2 - 11/09/10 - Bug 1847 fixed : Admins and webmasters was not excluded from registration validation 62 63 2.3.3 - 13/09/10 - Bug 1853 fixed : Add of controls on plugin configuration settings to avoid some mistakes 64 - Bug 1855 fixed : Improvement of use of UAM bridge (fixes php notices) 65 - Several language files fix 62 66 -------------------------------------------------------------------------------- 63 67 */
Note: See TracChangeset
for help on using the changeset viewer.