Changeset 6815
- Timestamp:
- Aug 28, 2010, 10:20:24 PM (14 years ago)
- Location:
- extensions/Register_FluxBB/trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Register_FluxBB/trunk/admin/admin.php
r5635 r6815 572 572 case 'manage': 573 573 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 { 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'] ;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 { 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 577 578 578 $query = ' … … 598 598 'FluxBB_ADMIN' => stripslashes($conf_Register_FluxBB[1]), 599 599 'FluxBB_GUEST' => stripslashes($conf_Register_FluxBB[2]), 600 'FluxBB_DEL_PT_TRUE' => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'true') ? 'checked="checked"' : '' , 601 'FluxBB_DEL_PT_FALSE' => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'false') ? 'checked="checked"' : '' , 602 'FluxBB_CONFIRM_TRUE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'true') ? 'checked="checked"' : '' , 603 'FluxBB_CONFIRM_FALSE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'false') ? 'checked="checked"' : '' , 604 'FluxBB_DETAILS_TRUE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '' , 605 'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '' , 600 'FluxBB_DEL_PT_TRUE' => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'true') ? 'checked="checked"' : '', 601 'FluxBB_DEL_PT_FALSE' => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'false') ? 'checked="checked"' : '', 602 'FluxBB_CONFIRM_TRUE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'true') ? 'checked="checked"' : '', 603 'FluxBB_CONFIRM_FALSE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'false') ? 'checked="checked"' : '', 604 'FluxBB_DETAILS_TRUE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '', 605 'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '', 606 ) 607 ); 608 609 // If UAM exists and if UAM ConfirmMail is set, we can set this feature 610 if (function_exists('FindAvailableConfirmMailID')) 611 { 612 $conf_UAM = unserialize($conf['UserAdvManager']); 613 $UAM_bridge = false; 614 615 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') 616 { 617 $UAM_bridge = true; 618 } 619 } 620 621 $template->assign( 622 array 623 ( 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], 606 628 ) 607 629 ); -
extensions/Register_FluxBB/trunk/admin/template/manage.tpl
r5606 r6815 1 1 {html_head}<link rel="stylesheet" type="text/css" href="{$REGFLUXBB_PATH}admin/template/register_fluxbb.css">{/html_head} 2 3 <script type="text/javascript"> 4 function blockToggleDisplay(headerId, contentId) 5 {ldelim} 6 var revHeader = document.getElementById(headerId); 7 var revContent = document.getElementById(contentId); 8 9 if (revContent.style.display == 'none') 10 {ldelim} 11 revContent.style.display = 'block'; 12 revHeader.className = 'instructionBlockHeaderExpanded'; 13 {rdelim} 14 else 15 {ldelim} 16 revContent.style.display = 'none'; 17 revHeader.className = 'instructionBlockHeaderCollapsed'; 18 {rdelim} 19 {rdelim} 20 21 function rfbb_blockToggleDisplay( headerId, contentId ) 22 {ldelim} 23 if (typeof(headerId)=='string') 24 {ldelim} 25 if ( headerId.length> 1) 26 blockToggleDisplay(headerId, contentId) ; 27 document.getElementById("nb_para").value =headerId ; 28 document.getElementById("nb_para2").value =contentId; 29 {rdelim} 30 {rdelim} 31 </script> 2 32 3 33 <div class="titrePage"> … … 8 38 <fieldset> 9 39 <legend>{'Config_Title'|@translate}</legend> 10 <div align="left">{'Config_Disclaimer'|@translate}</div> 40 {'Config_Disclaimer'|@translate} 41 <br><br> 11 42 <ul> 12 43 <li><label>{'Prefix'|@translate}</label><br> 13 <input type="text" name="FluxBB_prefix" size="20" style="text-align: center;" value={$FluxBB_PREFIX}><br> 44 <input type="text" name="FluxBB_prefix" value={$FluxBB_PREFIX} size="20" style="text-align: center;"><br> 45 <br> 14 46 </li> 15 <br>16 47 <li><label>{'Admin'|@translate}</label><br> 17 48 <input type="text" name="FluxBB_admin" value={$FluxBB_ADMIN} size="20" style="text-align: center;"><br> 18 49 {'User'|@translate} 50 <br> 19 51 </li> 20 <br>21 52 <li><label>{'Guest'|@translate}</label><br> 22 53 <input type="text" name="FluxBB_guest" value={$FluxBB_GUEST} size="20" style="text-align: center;"><br> 54 <br> 23 55 </li> 24 <br>25 56 <li><label>{'Del_Pt'|@translate}</label><br> 26 57 <input type="radio" value="true" {$FluxBB_DEL_PT_TRUE} name="FluxBB_del_pt">{'Del_Pt_true'|@translate}<br> 27 58 <input type="radio" value="false" {$FluxBB_DEL_PT_FALSE} name="FluxBB_del_pt">{'Del_Pt_false'|@translate}<br> 59 <br> 28 60 </li> 29 <br>30 61 <li><label>{'Confirm'|@translate}</label><br> 31 62 <input type="radio" value="true" {$FluxBB_CONFIRM_TRUE} name="FluxBB_confirm">{'Confirm_true'|@translate}<br> 32 63 <input type="radio" value="false" {$FluxBB_CONFIRM_FALSE} name="FluxBB_confirm">{'Confirm_false'|@translate}<br> 64 <br> 33 65 </li> 34 <br>35 66 <li><label>{'Details'|@translate}</label><br> 36 67 <input type="radio" value="true" {$FluxBB_DETAILS_TRUE} name="FluxBB_details">{'Details_true'|@translate}<br> 37 68 <input type="radio" value="false" {$FluxBB_DETAILS_FALSE} name="FluxBB_details">{'Details_false'|@translate}<br> 69 <br> 38 70 </li> 71 {if $UAM_BRIDGE} 72 <li><label>{'Bridge_UAM'|@translate}</label><br> 73 <input type="radio" value="true" {$FluxBB_UAM_LINK_TRUE} name="FluxBB_UAM">{'Bridge_UAM_true'|@translate}<br> 74 <input type="radio" value="false" {$FluxBB_UAM_LINK_FALSE} name="FluxBB_UAM">{'Bridge_UAM_false'|@translate}<br> 75 <br> 76 </li> 77 <li><label>{'FluxBB_Group'|@translate}</label><br> 78 <input type="text" name="FluxBB_group" value={$FluxBB_GROUP} size="6" style="text-align: center;"><br> 79 </li> 80 {/if} 39 81 </ul> 40 <br>41 {'No_Reg_advise'|@translate}42 82 <br> 43 83 <div align="center"><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}></div> 44 84 </fieldset> 85 86 <div id="instructionConfig1" class="instructionBlock" > 87 <div id="config1_header" class="instructionBlockHeaderCollapsed" onclick="rfbb_blockToggleDisplay('config1_header', 'Config1')"> 88 {'About_Reg'|@translate} 89 </span> 90 </div> 91 92 <div id="Config1" class="instructionBlockContent" style="display:none"> 93 {'No_Reg_advise'|@translate} 94 </div> 95 </div> 96 <div id="instructionConfig2" class="instructionBlock" > 97 <div id="config2_header" class="instructionBlockHeaderCollapsed" onclick="rfbb_blockToggleDisplay('config2_header', 'Config2')"> 98 {'About_Bridge'|@translate} 99 </span> 100 </div> 101 102 <div id="Config2" class="instructionBlockContent" style="display:none"> 103 {'UAM_Bridge_advice'|@translate} 104 </div> 105 </div> 45 106 </form> -
extensions/Register_FluxBB/trunk/admin/template/register_fluxbb.css
r6294 r6815 47 47 background-color: #ffd5dc; 48 48 } 49 50 /* Bloc expand-collapse instructions */ 51 .instructionBlockHeaderCollapsed, .instructionBlockHeaderExpanded 52 { 53 background-color:#111; 54 background-position:15px center; 55 background-repeat:no-repeat; 56 color:#ff3363; 57 cursor:pointer; 58 font-size:110%; 59 overflow:hidden; 60 padding:8px 41px; 61 text-align: left; 62 } 63 64 .instructionBlockHeaderCollapsed span, .instructionBlockHeaderExpanded span 65 { 66 border-bottom: none; 67 } 68 69 .instructionBlockHeaderCollapsed 70 { 71 background-image: url(./icon/expand.gif); 72 } 73 74 .instructionBlockHeaderExpanded 75 { 76 background-image: url(./icon/collapse.gif); 77 } 78 79 .instructionBlockContent 80 { 81 padding:0 15px 15px; 82 } -
extensions/Register_FluxBB/trunk/include/functions.inc.php
r6791 r6815 58 58 $registred = time(); 59 59 $registred_ip = $_SERVER['REMOTE_ADDR']; 60 61 $query = " 60 61 // Check if UAM is installed and if bridge is set - Exception for admins and webmasters 62 if (function_exists('FindAvailableConfirmMailID') and isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') 63 { 64 $o_default_user_group = $conf_Register_FluxBB[7]; 65 } 66 else 67 { 68 $query = " 62 69 SELECT conf_value 63 70 FROM ".FluxBB_CONFIG_TABLE." … … 65 72 ;"; 66 73 67 $o_default_user_group = pwg_db_fetch_assoc(pwg_query($query)); 74 $o_default_user_group = pwg_db_fetch_assoc(pwg_query($query)); 75 } 68 76 69 77 // Check for FluxBB version 1.4.x and get the correct value -
extensions/Register_FluxBB/trunk/language/de_DE/plugin.lang.php
r6300 r6815 114 114 $lang['Title_Tab'] = 'Register_FluxBB - Version: '; 115 115 116 // --------- Starting below: New or revised $lang ---- from version 2. 2.2117 $lang['No_Reg_advise'] = '<b>Über die Registrierung von Benutzern im FluxBB Forum</b><br><br> 118 F ür eine bessere Integration, ist es ratsam, die folgenden drei Änderungen an Ihrem FluxBB Forum (<b>Warnung: Nehmen Sie diese Änderungen werden verschwinden, wenn Update-Forum</b>):<br>119 <b>* Deaktivieren Sie die Option "Neuanmeldungen erlauben" auf der FluxBB-Administrationsseite (unter: Einstellungen - Registrierung)</b>120 <br>121 <br> 122 <b>* Ändern Sie die Datei</b> : [FluxBBRoot]/lang/German/register.php und ersetzen Sie die folgende Zeile:123 <div class="mod">\'No new regs\' => \' Dieses Forum akzeptiert momentan keine neuen Mitglieder.\'</div>124 <b> mit:</b>125 <div class="info">\'No new regs\' => \'<a href="http://[YourPiwigoRoot]/register.php" > Registrieren Sie sich bitte hier </a><br/><br/>\'</div>116 // --------- Starting below: New or revised $lang ---- from version 2.3.0 117 /*TODO*/$lang['No_Reg_advise'] = ' 118 For better integration, it is advisable to make the following changes to your FluxBB forum (<b>Warning: These changes will disappear when updating the forum</b>): 119 <br><br> 120 <b>* In FluxBB\'s administration panel, change "Allow new registrations" to NO (in: Options - Registration)</b> 121 <br><br> 122 <b>* Modify the file</b> : [FluxBBRoot]/lang/English/register.php by replacing the following line: 123 <div class="mod">\'No new regs\' => \'This forum is not accepting new users.\'</div> 124 <b>with :</b> 125 <div class="info">\'No new regs\' => \'<a href="http://[YourPiwigoRoot]/register.php" > Go here to register </a><br/><br/>\'</div> 126 126 <br> 127 Selbstverständlich sollten Sie diese Änderung für alle installierten Sprachen Ihres FluxBB Forums vornehmen. 128 <br> 129 <br> 130 <b>* Modifier le fichier</b> : [RacineDeFluxBB]/login.php und ersetzen Sie die Zeile 69: 127 Of course you should also make the same change for other languages of your FluxBB forum. 128 <br><br> 129 <b>* Modify the file</b> : [FluxBBRoot]/login.php by replacing the line 69: 131 130 <div class="mod">message($lang_login[\'Wrong user/pass\'].\'<a href="login.php?action=forget"></div> 132 <b> mit:</b>131 <b>with :</b> 133 132 <div class="info">message($lang_login[\'Wrong user/pass\'].\'<a href="../[PiwigoRoot]/password.php"></div> 134 133 <br> 135 Und am Zeile 216:134 and at line 216: 136 135 <div class="mod"><a href="login.php?action=forget" tabindex="5"><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 137 <b> mit:</b>136 <b>with :</b> 138 137 <div class="info"><a href="../[PiwigoRoot]/password.php" tabindex="5"><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 139 138 <br>'; 140 // --------- End: New or revised $lang ---- from version 2.2.2 139 /*TODO*/$lang['About_Reg'] = 'About the registration of users on the forum FluxBB'; 140 /*TODO*/$lang['Bridge_UAM'] = 'Validation d\'accès au forum via le plugin UserAdvManager (UAM): Activez ici le pont entre les deux plugins qui vous permettra d\'interdir l\'accès à votre forum FluxBB tant que l\'utilisateur n\'a pas validé son inscription à la galerie (la fonction correspondante doit être active sur UAM). Access validation to the forum via UserAdvManager (UAM) plugin: Turn the bridge on between the two plugins that will allow you to prohibit the access to your FluxBB forum until the user has not validated its registration in the gallery (the function must be active on UAM).'; 141 /*TODO*/$lang['Bridge_UAM_true'] = ' --> Enable bridge Register_FluxBB / UAM'; 142 /*TODO*/$lang['Bridge_UAM_false'] = ' --> Disable bridge Register_FluxBB / UAM (default)'; 143 /*TODO*/$lang['FluxBB_Group'] = 'Précisez ici l\'ID du <b>groupe FluxBB</b> dans lequel les utilisateurs non validé doivent se trouver (à créer au préalable dans FluxBB). Pour être efficace, ce groupe ne doit avoir aucune permission sur le forum (voir à la fin de cette page pour les détails d\'utilisation de cette option).Specify the ID of <b>FluxBB\' group</b> in which non validated users must be (to be created in advance in FluxBB). To be effective, this group should have no permission on the forum (see the end of this page for details on using this option).'; 144 /*TODO*/$lang['About_Bridge'] = 'About Register_FluxBB / UAM bridge'; 145 /*TODO*/$lang['UAM_Bridge_advice'] = 'The UserAdvManager plugin allows forcing new registrants to confirm their registration before allowing them to access the entire gallery. The joint use of this plugin with Register_FluxBB can do the same on the forum linked: Registrants can not post until they have validated their registration in the gallery. <br> 146 Here is the general procedure to apply: 147 <br> 148 - In the administration of your FluxBB forum, set at least 2 groups of users (for example: "validated" and "no_validated").<br> 149 - Give the first group ("validated") access permissions you want on your forum and set it as the default group.<br> 150 - Remove the second group ("no_validated") all permissions on your forum (the members of this group can only read public posts).<br> 151 - Locate the ID of the second group "no_validated".<br> 152 - Enter this ID in Register_FluxBB plugin, activate the bridge and save the settings. 153 <br> 154 <b class="mod"><u>Important notes:</u></b> 155 <br> 156 If you already use an earlier version of Register_FluxBB, Piwigo\'s accounts linked between your gallery and your FluxBB forum will not be impacted by the effects of the bridge. Only new registers will be impacted after activation of the bridge.<b><u>Accounts resynchronization function will be void.</u></b><br> 157 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 // --------- End: New or revised $lang ---- from version 2.3.0 141 159 ?> -
extensions/Register_FluxBB/trunk/language/en_UK/plugin.lang.php
r6300 r6815 114 114 $lang['Title_Tab'] = 'Register_FluxBB - Version: '; 115 115 116 // --------- Starting below: New or revised $lang ---- from version 2.2.2 117 $lang['No_Reg_advise'] = '<b>About the registration of users on the forum FluxBB</b><br><br> 118 For better integration, it is advisable to make the following 3 changes to your FluxBB forum (<b>Warning: These changes will disappear when updating the forum</b>):<br> 116 // --------- Starting below: New or revised $lang ---- from version 2.3.0 117 $lang['No_Reg_advise'] = ' 118 For better integration, it is advisable to make the following changes to your FluxBB forum (<b>Warning: These changes will disappear when updating the forum</b>): 119 <br><br> 119 120 <b>* In FluxBB\'s administration panel, change "Allow new registrations" to NO (in: Options - Registration)</b> 120 <br> 121 <br> 121 <br><br> 122 122 <b>* Modify the file</b> : [FluxBBRoot]/lang/English/register.php by replacing the following line: 123 123 <div class="mod">\'No new regs\' => \'This forum is not accepting new users.\'</div> … … 126 126 <br> 127 127 Of course you should also make the same change for other languages of your FluxBB forum. 128 <br> 129 <br> 128 <br><br> 130 129 <b>* Modify the file</b> : [FluxBBRoot]/login.php by replacing the line 69: 131 130 <div class="mod">message($lang_login[\'Wrong user/pass\'].\'<a href="login.php?action=forget"></div> … … 138 137 <div class="info"><a href="../[PiwigoRoot]/password.php" tabindex="5"><?php echo $lang_login[\'Forgotten pass\']</a></p></div> 139 138 <br>'; 140 // --------- End: New or revised $lang ---- from version 2.2.2 139 $lang['About_Reg'] = 'About the registration of users on the forum FluxBB'; 140 $lang['Bridge_UAM'] = 'Validation d\'accès au forum via le plugin UserAdvManager (UAM): Activez ici le pont entre les deux plugins qui vous permettra d\'interdir l\'accès à votre forum FluxBB tant que l\'utilisateur n\'a pas validé son inscription à la galerie (la fonction correspondante doit être active sur UAM). Access validation to the forum via UserAdvManager (UAM) plugin: Turn the bridge on between the two plugins that will allow you to prohibit the access to your FluxBB forum until the user has not validated its registration in the gallery (the function must be active on UAM).'; 141 $lang['Bridge_UAM_true'] = ' --> Enable bridge Register_FluxBB / UAM'; 142 $lang['Bridge_UAM_false'] = ' --> Disable bridge Register_FluxBB / UAM (default)'; 143 $lang['FluxBB_Group'] = 'Précisez ici l\'ID du <b>groupe FluxBB</b> dans lequel les utilisateurs non validé doivent se trouver (à créer au préalable dans FluxBB). Pour être efficace, ce groupe ne doit avoir aucune permission sur le forum (voir à la fin de cette page pour les détails d\'utilisation de cette option).Specify the ID of <b>FluxBB\' group</b> in which non validated users must be (to be created in advance in FluxBB). To be effective, this group should have no permission on the forum (see the end of this page for details on using this option).'; 144 $lang['About_Bridge'] = 'About Register_FluxBB / UAM bridge'; 145 $lang['UAM_Bridge_advice'] = 'The UserAdvManager plugin allows forcing new registrants to confirm their registration before allowing them to access the entire gallery. The joint use of this plugin with Register_FluxBB can do the same on the forum linked: Registrants can not post until they have validated their registration in the gallery. <br> 146 Here is the general procedure to apply: 147 <br> 148 - In the administration of your FluxBB forum, set at least 2 groups of users (for example: "validated" and "no_validated").<br> 149 - Give the first group ("validated") access permissions you want on your forum and set it as the default group.<br> 150 - Remove the second group ("no_validated") all permissions on your forum (the members of this group can only read public posts).<br> 151 - Locate the ID of the second group "no_validated".<br> 152 - Enter this ID in Register_FluxBB plugin, activate the bridge and save the settings. 153 <br> 154 <b class="mod"><u>Important notes:</u></b> 155 <br> 156 If you already use an earlier version of Register_FluxBB, Piwigo\'s accounts linked between your gallery and your FluxBB forum will not be impacted by the effects of the bridge. Only new registers will be impacted after activation of the bridge.<b><u>Accounts resynchronization function will be void.</u></b><br> 157 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 // --------- End: New or revised $lang ---- from version 2.3.0 141 159 ?> -
extensions/Register_FluxBB/trunk/language/fr_FR/plugin.lang.php
r6299 r6815 115 115 116 116 117 // --------- Starting below: New or revised $lang ---- from version 2. 2.2118 $lang['No_Reg_advise'] = ' <b>A propos de l\'enregistrement d\'utilisateur sur le forum FluxBB</b><br><br>119 Pour une meilleur intégration, il est conseill e d\'apporter les 3 modifications suivantes à votre forum FluxBB (<b>Attention! Ces modifications disparaitront en cas de mise à jour du forum</b>):<br>120 <b>* Modifier dans l\'interface d\'administration de FluxBB "Autoriser les nouvelles inscriptions" à NON ( dans : Options - Inscriptions )</b>121 <br>122 <br> 117 // --------- Starting below: New or revised $lang ---- from version 2.3.0 118 $lang['No_Reg_advise'] = ' 119 Pour une meilleur intégration, il est conseillé d\'apporter les modifications suivantes à votre forum FluxBB (<b>Attention! Ces modifications disparaitront en cas de mise à jour du forum</b>): 120 <br><br> 121 <b>* Modifier dans l\'interface d\'administration de FluxBB l\'option "Autoriser les nouvelles inscriptions" à NON ( dans : Options - Inscriptions )</b> 122 <br><br> 123 123 <b>* Modifier le fichier</b> : [RacineDeFluxBB]/lang/French/register.php en remplacant la ligne suivante: 124 124 <div class="mod">\'No new regs\' => \'Ce forum n\\\'accepte pas de nouveaux utilisateurs.\'</div> … … 127 127 <br> 128 128 Et reporter cette modification pour toutes les langues gérées sur votre forum. 129 <br> 130 <br> 129 <br><br> 131 130 <b>* Modifier le fichier</b> : [RacineDeFluxBB]/login.php en remplacant à la ligne 69: 132 131 <div class="mod">message($lang_login[\'Wrong user/pass\'].\'<a href="login.php?action=forget"></div> … … 135 134 <br> 136 135 à la ligne 216: 137 <div class="mod"><a href="login.php?action=forget" tabindex="5" ><?php echo $lang_login[\'Forgotten pass\']</a></p></div>136 <div class="mod"><a href="login.php?action=forget" tabindex="5"><?php echo $lang_login[\'Forgotten pass\']</a></div> 138 137 <b>par :</b> 139 <div class="info"><a href="../[VotreRacineDePiwigo]/password.php" tabindex="5" ><?php echo $lang_login[\'Forgotten pass\']</a></p></div>138 <div class="info"><a href="../[VotreRacineDePiwigo]/password.php" tabindex="5"><?php echo $lang_login[\'Forgotten pass\']</a></div> 140 139 <br>'; 141 // --------- End: New or revised $lang ---- from version 2.2.2 140 $lang['About_Reg'] = 'A propos de l\'enregistrement d\'utilisateur sur le forum FluxBB'; 141 $lang['Bridge_UAM'] = 'Validation d\'accès au forum via le plugin UserAdvManager (UAM): Activez ici le pont entre les deux plugins qui vous permettra d\'interdir l\'accès à votre forum FluxBB tant que l\'utilisateur n\'a pas validé son inscription à la galerie (la fonction correspondante doit être active sur UAM).'; 142 $lang['Bridge_UAM_true'] = ' --> Pont Register_FluxBB / UAM activé'; 143 $lang['Bridge_UAM_false'] = ' --> Pont Register_FluxBB / UAM désactivé (par défaut)'; 144 $lang['FluxBB_Group'] = 'Précisez ici l\'ID du <b>groupe FluxBB</b> dans lequel les utilisateurs non validé doivent se trouver (à créer au préalable dans FluxBB). Pour être efficace, ce groupe ne doit avoir aucune permission sur le forum (voir à la fin de cette page pour les détails d\'utilisation de cette option).'; 145 $lang['About_Bridge'] = 'A propos du pont Register_FluxBB / UAM'; 146 $lang['UAM_Bridge_advice'] = 'Le plugin UserAdvManager permet de forcer les nouveaux inscrits à valider leur inscription avant de leur permettre d\'accéder à la totalité de la galerie. L\'utilisation conjointe de ce plugin avec Register_FluxBB permet de faire de même sur le forum lié: Ils ne pourront pas poster tant qu\'ils n\'auront pas validé leur inscription à la galerie.<br> 147 Voici la procédure générale à appliquer: 148 <br><br> 149 - Dans la partie d\'administration de votre forum FluxBB, établissez au minimum 2 groupes d\'utilisateurs (par exemple: "validés" et "non_validés").<br> 150 - Attribuez au premier groupe ("validés") les permissions d\'accès souhaitées sur votre forum et définissez le comme groupe par défaut.<br> 151 - Retirez au second groupe ("non_validés") toutes les permissions sur votre forum (les membres de ce groupe ne pourront que lire les posts publics).<br> 152 - Repérez l\'ID du second groupe "non_validés".<br> 153 - Notez l\'ID dans le plugin Register_FluxBB, activez le pont et sauvegardez les paramètres. 154 <br><br> 155 <b class="mod"><u>Notes importantes:</u></b> 156 <br><br> 157 Si vous utilisiez déjà Register_FluxBB dans une version antérieur, les comptes liés entre votre galerie Piwigo et votre forum FluxBB ne seront pas impactés par les effets du pont. Seuls les nouveaux inscrits après l\'activation du pont y seront soumis.<b><u>La fonction de resynchronisation des comptes sera sans effet.</u></b><br><br> 158 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 // --------- End: New or revised $lang ---- from version 2.3.0 142 160 ?> -
extensions/Register_FluxBB/trunk/main.inc.php
r6791 r6815 2 2 /* 3 3 Plugin Name: Register FluxBB 4 Version: 2. 2.44 Version: 2.3.0 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 … … 54 54 55 55 2.2.4 - 22/08/10 - Bug 1812 fixed : Compliance with FluxBB 1.4 56 57 2.3.0 - 01/09/10 - Bug 1434 fixed : Bridge between Register_FluxBB and UserAdvManager for new users validation 56 58 -------------------------------------------------------------------------------- 57 59 */ … … 91 93 include_once (REGFLUXBB_PATH.'include/functions.inc.php'); 92 94 93 // Warning : FluxBB uses Sha1 hash instead of md5 for Piwigo 95 // Warning : FluxBB uses Sha1 hash instead of md5 for Piwigo! 94 96 FluxBB_Adduser($register_user['id'], $register_user['username'], sha1($_POST['password']), $register_user['email']); 95 97 } … … 200 202 } 201 203 } 204 205 206 /* Access validation in FluxBB when validated in Piwigo through UAM plugin */ 207 add_event_handler('login_success', 'UAM_Bridge'); 208 209 function UAM_Bridge() 210 { 211 global $conf, $user; 212 213 $conf_Register_FluxBB = isset($conf['Register_FluxBB']) ? explode(";" , $conf['Register_FluxBB']) : array(); 214 215 // Check if UAM is installed and if bridge is set - Exception for admins and webmasters 216 if (function_exists('FindAvailableConfirmMailID') and isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true' and !is_admin() and !is_webmaster()) 217 { 218 $conf_UAM = unserialize($conf['UserAdvManager']); 219 220 // Getting unvalidated users group else Piwigo's default group 221 if (isset($conf_UAM[2]) and $conf_UAM[2] != '-1') 222 { 223 $Waitingroup = $conf_UAM[2]; 224 } 225 else 226 { 227 $query = ' 228 SELECT id 229 FROM '.GROUPS_TABLE.' 230 WHERE is_default = "true" 231 LIMIT 1 232 ;'; 233 $data = pwg_db_fetch_assoc(pwg_query($query)); 234 $Waitingroup = $data['id']; 235 } 236 237 // check if logged in user is in a Piwigo's validated or unvalidated users group 238 $query = ' 239 SELECT * 240 FROM '.USER_GROUP_TABLE.' 241 WHERE user_id = '.$user['id'].' 242 AND group_id = '.$Waitingroup.' 243 ;'; 244 $count = pwg_db_num_rows(pwg_query($query)); 245 246 // Check if logged in user is in a FluxBB's unvalidated group 247 $query = " 248 SELECT group_id 249 FROM ".FluxBB_USERS_TABLE." 250 WHERE id = ".FluxBB_Searchuser($user['id'])." 251 ;"; 252 253 $data = pwg_db_fetch_assoc(pwg_query($query)); 254 255 // Logged in user switch to the default FluxBB's group if he'is validated 256 if ($count == 0 and $data['group_id'] = $conf_Register_FluxBB[7]) 257 { 258 $query = " 259 SELECT conf_value 260 FROM ".FluxBB_CONFIG_TABLE." 261 WHERE conf_name = 'o_default_user_group' 262 ;"; 263 264 $o_default_user_group = pwg_db_fetch_assoc(pwg_query($query)); 265 266 $query = " 267 UPDATE ".FluxBB_USERS_TABLE." 268 SET group_id = ".$o_default_user_group['conf_value']." 269 WHERE id = ".FluxBB_Searchuser($user['id'])." 270 ;"; 271 pwg_query($query); 272 } 273 } 274 } 202 275 ?> -
extensions/Register_FluxBB/trunk/maintain.inc.php
r5606 r6815 17 17 $q = ' 18 18 INSERT INTO '.CONFIG_TABLE.' (param,value,comment) 19 VALUES ("Register_FluxBB","FluxBB_;PhpWebGallery;Guest;false;false;true ","Parametres Register_FluxBB")19 VALUES ("Register_FluxBB","FluxBB_;PhpWebGallery;Guest;false;false;true;false;0","Parametres Register_FluxBB") 20 20 ;'; 21 21 … … 42 42 /* *********************** */ 43 43 regfluxbb_obsolete_files(); 44 45 /* Check version < 2.3.0 */ 46 $conf_Register_FluxBB = isset($conf['Register_FluxBB']) ? explode(";" , $conf['Register_FluxBB']) : array(); 47 48 if (!isset($conf_Register_FluxBB[6]) and !isset($conf_Register_FluxBB[7])) 49 { 50 $upgrade_RFBB = $conf_Register_FluxBB[0].';'.$conf_Register_FluxBB[1].';'.$conf_Register_FluxBB[2].';'.$conf_Register_FluxBB[3].';'.$conf_Register_FluxBB[4].';'.$conf_Register_FluxBB[5].';false;0'; 51 52 $query = ' 53 UPDATE '.CONFIG_TABLE.' 54 SET value="'.$upgrade_RFBB.'" 55 WHERE param="Register_FluxBB" 56 LIMIT 1 57 ;'; 58 pwg_query($query); 59 } 44 60 } 45 61
Note: See TracChangeset
for help on using the changeset viewer.