[SPIP Zone] [Spip-zone-commit] r22300 - in /_plugins_: _stable_/acces_restreint/acces_restreint_pipelines.php _stable_/acces_restreint/fond/inscription2_acces_restreint.html _stable_/acces_restreint/plugin.xml _test_/inscription2/inscription2_193/fond

je ne vois pas en quoi le plugin acces restreint devrait avoir du code specifique à inscription 2, a tartempion 25 ou à machin 15.
Si chacun y va de son morceau, ça ne peut que devenir illisible et inutilement lourd.

Tu peux mettre tout ca dans inscription 3, et faire l'inclusion sur un simple if (defined('_DIR_PLUGIN_ACCES_RESTREINT')){} )

En plus de ça, acces restreint n'est pas un greffon d'inscription 2, il existait bien avant.
un peu de respect svp.

Cédric

Le 29 août 08 à 10:00, cam.lafit@azerttyu.net a écrit :

Author: cam.lafit@azerttyu.net
Date: Fri Aug 29 10:00:53 2008
New Revision: 22300

Log:
Complete 22286

acces_restreint subit le meme sort que les autres greffons d'Inscription2

Added:
    _plugins_/_stable_/acces_restreint/fond/inscription2_acces_restreint.html
      - copied unchanged from r22282, _plugins_/_test_/inscription2/inscription2_193/fonds/inscription2_acces_restreint.html
Removed:
    _plugins_/_test_/inscription2/inscription2_193/fonds/inscription2_acces_restreint.html
Modified:
    _plugins_/_stable_/acces_restreint/acces_restreint_pipelines.php
    _plugins_/_stable_/acces_restreint/plugin.xml

Modified: _plugins_/_stable_/acces_restreint/acces_restreint_pipelines.php

--- _plugins_/_stable_/acces_restreint/acces_restreint_pipelines.php (original)
+++ _plugins_/_stable_/acces_restreint/acces_restreint_pipelines.php Fri Aug 29 10:00:53 2008
@@ -47,5 +47,9 @@
     return $flux;
   }

+ function AccesRestreint_I2_cfg_form($flux){
+ $flux .= recuperer_fond('fond/inscription2_acces_restreint');
+ return $flux;
+ }

?>
\ No newline at end of file

Modified: _plugins_/_stable_/acces_restreint/plugin.xml

--- _plugins_/_stable_/acces_restreint/plugin.xml (original)
+++ _plugins_/_stable_/acces_restreint/plugin.xml Fri Aug 29 10:00:53 2008
@@ -57,6 +57,11 @@
     <inclure>acces_restreint_pipelines.php</inclure>
   </pipeline>
   <pipeline>
+ <nom>I2_cfg_form</nom>
+ <action>I2_cfg_form</action>
+ <inclure>acces_restreint_pipelines.php</inclure>
+ </pipeline>
+ <pipeline>
     <nom>AccesRestreint_liste_zones_autorisees</nom>
     <action>liste_zones_autorisees</action>
     <inclure>inc/acces_restreint.php</inclure>

Removed: _plugins_/_test_/inscription2/inscription2_193/fonds/inscription2_acces_restreint.html

--- _plugins_/_test_/inscription2/inscription2_193/fonds/inscription2_acces_restreint.html (original)
+++ _plugins_/_test_/inscription2/inscription2_193/fonds/inscription2_acces_restreint.html (removed)
@@ -1,28 +0,0 @@
-#SET{selected,#CONFIG{inscription2/zones,'',''}}
-#SET{checked,#CONFIG{inscription2/accesrestreint,'',''}}
-
-<div>
-<label>
- <input type="checkbox" name="accesrestreint" onclick="showhide(this, '#zones')" [(#GET{checked}|?{#CONFIG{plugin/ACCESRESTREINT}|?{checked="checked"}})] id="accesrestreint" />
- <strong><:inscription2:accesrestreint:></strong>
-</label>
-
-<label for="zones" style="[(#GET{checked}|=={on}|?{display: block;, display:none;})]">
-<:inscription2:choisir_zones:>
-</label>
-<br />
-
-<B_zones>
-<select name="zones" multiple="multiple" size="[(#TOTAL_BOUCLE|<{6}|?{ [(#TOTAL_BOUCLE|plus{1})] , 5 })]" id="zones">
-<BOUCLE_zones(Spip_zones){tout}>
- <option value="#ID_ZONE"[(#ID_ZONE|in_array{#GET{selected}}|?{ selected="selected"})]>
- #TITRE
- </option>
-</BOUCLE_zones>
-</select>
-</B_zones>
-<//B_zones>
-
-<small><br /><:inscription2:select_listes:><br />
-<a href="#" onclick="$('#zones').find('option').attr('selected', false);return false;"><:inscription2:deselect_listes:></a> </small><br />
-</div>
\ No newline at end of file

_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit