Index: /plugins/sktheme/1_9_1/COPYING.txt
===================================================================
--- /plugins/sktheme/1_9_1/COPYING.txt	(revision 5)
+++ /plugins/sktheme/1_9_1/COPYING.txt	(revision 5)
@@ -0,0 +1,344 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: /plugins/sktheme/1_9_1/DOCUMENTATION.txt
===================================================================
--- /plugins/sktheme/1_9_1/DOCUMENTATION.txt	(revision 5)
+++ /plugins/sktheme/1_9_1/DOCUMENTATION.txt	(revision 5)
@@ -0,0 +1,76 @@
+// ----------------------------------------------------------------------------
+// STRUCTURE DOCUMENTATION
+//     
+// The Theme directory structure need to be like this
+// This is only for the public theme
+// 
+// themes/ 
+//      <squelette_dir1>
+//         theme.xml
+//        <files ... >
+//      <squelette_dir2>
+//         theme.xml
+//        <files ... >
+//      <...>
+//      <habillage_dir1>
+//         theme.xml
+//        <files ...>
+//      <habillage_dir2>
+//         theme.xml
+//        <files ...>
+//
+// Theme = Squelette [+ Habillage]
+// Habillage is optional, because default 'habillage' could be in the
+// 'squelette' directory itself (such 'dist').
+//
+// Available 'squelettes' or 'habillage' can be now stored in the same
+// directory but you still have the possibility to have 2 differents 
+// directories
+//
+// ---------------------------------------------------------------------------
+// Habillage
+// theme.xml (use to give a description in the interface and to select it
+//                with <squelettes> name)
+//    <theme>
+// 	<nom>name_of_the_habillage</nom>
+// 	<auteur>
+// 	author of the habillage
+// 	</auteur>
+// 	<version>
+// 	1.0
+// 	</version>
+// 	<etat>
+// 	stable
+// 	</etat>
+// 	<description>
+// 	...
+// 	</description>
+//      <type>themes</type>
+// 	<squelettes>dist</squelettes>
+// 	<squelettes>SarkaSpip</squelettes>
+//    </theme>
+//
+// You can define several dependances <squelettes></squelettes>
+// 
+// ---------------------------------------------------------------------------
+// Squelette
+// theme.xml (use to give description in the interface)
+//
+//    <theme>
+// 	<nom>name_of_the_squelette</nom>
+// 	<auteur>
+// 	author of the squelette
+// 	</auteur>
+// 	<version>
+// 	1.0
+// 	</version>
+// 	<etat>
+// 	stable
+// 	</etat>
+//      <type>squelettes</type>
+// 	<description>
+// 	...
+// 	</description>
+//    </theme>
+//
+// ---------------------------------------------------------------------------
Index: /plugins/sktheme/1_9_1/TODO.txt
===================================================================
--- /plugins/sktheme/1_9_1/TODO.txt	(revision 5)
+++ /plugins/sktheme/1_9_1/TODO.txt	(revision 5)
@@ -0,0 +1,10 @@
+// <b>VOUS POUVEZ AJOUTER DES ELEMENTS A CETTE LISTE</b>
+// <b>TODO</b>: Probablement ajouter des tests pour detecter l'usage de 'dossier_squelettes'.
+// <b>TODO</b>: Telecharger un squelette ou un theme distribue par internet et l'installer.
+// <b>TODO</b>: Afficher les fichiers capture.png si ils existent
+//
+// <b>YOU CAN ADD ITEM TO THIS LIST AS YOU WISH</b>
+// <b>TODO</b>: Probably add some tests to detect the usage of 'dossier_squelettes'.
+// <b>TODO</b>: Download a whole squelette or theme zip distribution trough the net and install it.
+// <b>TODO</b>: Display capture.png files if exist
+
Index: /plugins/sktheme/1_9_1/exec/sktheme_config.php
===================================================================
--- /plugins/sktheme/1_9_1/exec/sktheme_config.php	(revision 5)
+++ /plugins/sktheme/1_9_1/exec/sktheme_config.php	(revision 5)
@@ -0,0 +1,160 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');
+include_spip('inc/sktheme_util');
+
+function exec_sktheme_config() {
+  
+  global $sktheme_action;
+  global $squelettes_public_dir;
+  global $habillages_public_dir;
+  global $habillage_switcher_style;
+  global $theme_switcher_style;
+  global $switcher_activated;
+  global $switcher_admin_only;
+  
+  debut_page(_T('sktheme:title_config'),'configuration','sktheme_config');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:main_config_title'));
+  
+  // Include 'onglets'
+  sktheme_config_onglets();
+  
+  debut_gauche();
+  
+  // Include Doc box
+  sktheme_config_doc_box();
+  
+  debut_droite();
+  
+  //
+  // PUBLIC THEMES DIRECTORIES CONFIG
+  //
+  debut_cadre_trait_couleur('', false, "sktheme_config", _T('sktheme:public_themes_config'));
+  
+  // if submit : then save values
+  if ($sktheme_action=="set_dir") {
+    ecrire_meta('sktheme_squelettes_public_dir',$squelettes_public_dir);
+    ecrire_meta('sktheme_habillages_public_dir',$habillages_public_dir);
+    ecrire_metas();
+  }
+  
+  // Set directories
+  echo '<form action="'.generer_url_ecrire("sktheme_config", "sktheme_action=set_dir").'" method="post">';
+  
+  // Set squelettes_public_dir
+  debut_cadre_gris_clair();
+  echo '<strong>'._T('sktheme:squelettes_public_dir').' : </strong><input type="text" name="squelettes_public_dir" size="25" value="'.
+    $GLOBALS['meta']['sktheme_squelettes_public_dir'].'">';
+  fin_cadre_gris_clair();
+  
+  // Set habillages_public_dir
+  debut_cadre_couleur();
+  echo '<strong>'._T('sktheme:habillages_public_dir').' : </strong><input type="text" name="habillages_public_dir" size="25" value="'.
+    $GLOBALS['meta']['sktheme_habillages_public_dir'].'">';
+  fin_cadre_couleur(); 
+  
+  echo '<div><div style="text-align:right"><input type="submit" value="'._T('sktheme:save_public_directories').'" /></div></div>';
+  echo '</form>';
+ 
+  fin_cadre_trait_couleur();  
+  
+  //
+  // PRIVATE THEMES DIRECTORIES CONFIG
+  //
+  //   debut_cadre_trait_couleur('', false, "sktheme_config", _T('sktheme:private_themes_config'));
+  //   echo '<br />';
+  //   echo _T('sktheme:to_be_done');
+  //   echo '<br />';
+  //   fin_cadre_trait_couleur();  
+  //
+  // SWITCHER OPTIONS
+  //
+  // if submit : save switcher options
+  if ($sktheme_action=="set_switcher") {
+    ecrire_meta('sktheme_theme_switcher_style',$theme_switcher_style);
+    ecrire_meta('sktheme_habillage_switcher_style',$habillage_switcher_style);
+    ecrire_meta('sktheme_switcher_activated',$switcher_activated);
+    ecrire_meta('sktheme_switcher_admin_only',$switcher_admin_only);
+    ecrire_metas();
+  }
+  debut_cadre_trait_couleur('', false, "sktheme_config", _T('sktheme:themes_switcher'));
+  
+  echo '<form action="'.generer_url_ecrire("sktheme_config", "sktheme_action=set_switcher").'" method="post">';
+  
+  // Set sktheme_switcher_activated
+  debut_cadre_gris_clair();
+  echo '<strong>'._T('sktheme:switcher_activated').' : </strong>';
+  echo '<input type="radio" name="switcher_activated"  value="yes" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_activated']) AND ($GLOBALS['meta']['sktheme_switcher_activated']=="yes")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:yes');
+  echo '<input type="radio" name="switcher_activated" value="no" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_activated']) AND ($GLOBALS['meta']['sktheme_switcher_activated']=="no")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:no');
+  fin_cadre_gris_clair();
+  
+  // Set sktheme_switcher_admin_only
+  debut_cadre_couleur();
+  echo '<strong>'._T('sktheme:switcher_admin_only').' : </strong>';
+  echo '<input type="radio" name="switcher_admin_only"  value="yes" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_admin_only']) AND ($GLOBALS['meta']['sktheme_switcher_admin_only']=="yes")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:yes');
+  echo '<input type="radio" name="switcher_admin_only"  value="no" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_admin_only']) AND ($GLOBALS['meta']['sktheme_switcher_admin_only']=="no")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:no');
+  fin_cadre_couleur(); 
+  
+  // Set theme_switcher_style
+  debut_cadre_gris_clair();
+  echo '<strong>'._T('sktheme:theme_switcher_style').' : </strong>';
+  echo "<br />";
+  echo '<textarea  cols="50" rows="8" name="theme_switcher_style">';
+  echo $GLOBALS['meta']['sktheme_theme_switcher_style'].'</textarea>';  
+  fin_cadre_gris_clair();
+  
+  // Set habillage_switcher_style
+  debut_cadre_couleur();
+  echo '<strong>'._T('sktheme:habillage_switcher_style').' : </strong>';
+  echo "<br />";
+  echo '<textarea  cols="50" rows="8" name="habillage_switcher_style">';
+  echo $GLOBALS['meta']['sktheme_habillage_switcher_style'].'</textarea>';  
+  fin_cadre_couleur(); 
+  
+    
+  echo '<div><div style="text-align:right"><input type="submit" value="'._T('sktheme:save_switcher_options').'" /></div></div>';
+  echo '</form>';
+  
+  fin_cadre_trait_couleur();  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_1/exec/sktheme_doc.php
===================================================================
--- /plugins/sktheme/1_9_1/exec/sktheme_doc.php	(revision 5)
+++ /plugins/sktheme/1_9_1/exec/sktheme_doc.php	(revision 5)
@@ -0,0 +1,78 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');
+include_spip('inc/flock');
+include_spip('inc/sktheme_util');
+
+//
+// Private Area Page definition 
+//
+function exec_sktheme_doc() {
+
+  debut_page(_T('sktheme:extra_documentation'),'configuration','sktheme_public_choice');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:extra_documentation'));
+  
+  // Include 'onglets'
+  sktheme_doc_onglets();
+  
+  debut_gauche();
+
+  
+  debut_droite();
+  echo "<br />";
+  // debut_cadre_trait_couleur($icone='', $return = false, $fonction='', $titre=''){
+  debut_cadre_trait_couleur('', false, "sktheme_documentation", _T('sktheme:extra_documentation'));
+  
+  $doc = _DIR_PLUGIN_SKTHEME."/DOCUMENTATION.txt";
+  if (is_file($doc)) {
+    lire_fichier ($doc,$contenu);
+    $contenu = str_replace("<", "&lt;", $contenu);
+    $contenu = str_replace(">", "&gt;", $contenu);
+    $contenu = str_replace(" ", "&nbsp;", $contenu);
+    $contenu = str_replace("//", "<br />", $contenu);
+    echo $contenu;
+  } else {
+    echo _T('sktheme:to_be_done');
+  }
+  fin_cadre_trait_couleur();
+  debut_cadre_trait_couleur('', false, "sktheme_documentation", _T('sktheme:to_be_done'));
+  $todo = _DIR_PLUGIN_SKTHEME."/TODO.txt";
+  if (is_file($todo)) {
+    lire_fichier ($todo,$contenu);
+    $list = split('\/\/',$contenu);
+    foreach ($list as $lign) {
+      echo "$lign<br />";
+    }
+    echo "<br />";
+  } else {
+    echo _T('sktheme:to_be_done');
+  }
+   
+  fin_cadre_trait_couleur();
+  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_1/exec/sktheme_private_choice.php
===================================================================
--- /plugins/sktheme/1_9_1/exec/sktheme_private_choice.php	(revision 5)
+++ /plugins/sktheme/1_9_1/exec/sktheme_private_choice.php	(revision 5)
@@ -0,0 +1,67 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');
+include_spip('inc/sktheme_util');
+
+//
+// Private Area Page definition 
+//
+function exec_sktheme_private_choice() {
+
+  debut_page(_T('sktheme:private_theme_choice'),'configuration','sktheme_public_choice');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:private_theme_choice'));
+  
+  // Include 'onglets'
+  sktheme_private_choice_onglets();
+  
+  debut_gauche();
+  // Include 'raccourcis'
+  sktheme_raccourcis();
+
+  
+  debut_droite();
+  echo "<br />";
+  // debut_cadre_trait_couleur($icone='', $return = false, $fonction='', $titre=''){
+  debut_cadre_trait_couleur('', false, "sktheme_private_squelette_list", _T('sktheme:available_squelette_list'));
+  
+  echo '<br />';
+  echo _T('sktheme:to_be_done');
+  echo '<br />';
+   
+  fin_cadre_trait_couleur();
+  
+  debut_cadre_trait_couleur('', false, "sktheme_squelette_list", _T('sktheme:available_habillage_list'));
+
+  echo '<br />';
+  echo _T('sktheme:to_be_done');
+  echo '<br />';   
+  
+  fin_cadre_trait_couleur();
+ 
+  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_1/exec/sktheme_public_choice.php
===================================================================
--- /plugins/sktheme/1_9_1/exec/sktheme_public_choice.php	(revision 5)
+++ /plugins/sktheme/1_9_1/exec/sktheme_public_choice.php	(revision 5)
@@ -0,0 +1,259 @@
+<?php
+
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');   // for spip presentation functions
+include_spip('inc/layer');          // for spip layer functions
+include_spip('inc/utils');          // for _request function
+include_spip('inc/plugin');         // xml function
+include_spip('inc/sktheme_util');   // for sktheme_* functions
+include_spip('inc/sktheme_xml');    // for sktheme_* functions
+
+
+//
+// Public page choice definition
+//
+function exec_sktheme_public_choice() {
+
+  global $squelette_public_name; // parameter
+  global $habillage_public_name; // parameter
+  
+  // Get the specific action to do if some
+  $sktheme_action = _request('sktheme_action');
+  $original = _T('sktheme:original');
+
+  debut_page(_T('sktheme:public_theme_choice'),'configuration','sktheme_public_choice');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:public_theme_choice'));
+
+  // Include 'onglets'
+  sktheme_public_choice_onglets();
+  
+  debut_gauche();
+
+  // download a squelette distribution
+//  debut_cadre_gris_clair();
+//  echo '<form action="' . generer_url_action("sktheme_install") .'" method="post">';
+//  echo       '<strong>'._T('sktheme:zip_squelette_url').' : </strong>';
+//  echo       '<input type="text" name="zip_url" size="25" value="http://">';
+//  echo       '<input type="hidden" name="zip_type" value="squelette" />';
+//  echo	     '<input type="submit" value="Download" />';
+//  echo	'</form>';
+//  fin_cadre_gris_clair();
+
+  // download a habillage distribution
+// debut_cadre_gris_clair();
+// echo '<form action="' . generer_url_action("sktheme_install") .'" method="post">';
+// echo       '<strong>'._T('sktheme:zip_habillage_url').' : </strong>';
+// echo       '<input type="text" name="zip_url" size="25" value="http://">';
+// echo       '<input type="hidden" name="zip_type" value="habillage" />';
+// echo	     '<input type="submit" value="Download" />';
+// echo	'</form>';
+// fin_cadre_gris_clair();
+
+  // Include 'raccourcis'
+  sktheme_public_theme_doc_box();
+  
+  debut_droite();
+  
+  //
+  // Choose Squelette
+  $s_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_squelettes_public_dir'];
+  debut_cadre_trait_couleur('', false, "sktheme_public_squelette_list",
+			    _T('sktheme:available_squelette_list')." : ".$GLOBALS['meta']['sktheme_squelettes_public_dir']);
+  
+  $squelettes_list = array('dist' => '' );
+  if (is_dir($s_dir)) {
+    if ($dh = opendir($s_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($s_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is squelettes
+	  if (is_file($s_dir."/".$dir."/theme.xml")) {
+	    $s_info = sktheme_xml_get_infos($s_dir."/".$dir,"theme");
+	    $type = (isset($s_info['type'])) ? propre($s_info['type']) : "";
+	    if ($type == 'squelettes') {
+	      $squelettes_list[$dir]=$s_dir."/".$dir;
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    }
+  } else {
+      echo _T('sktheme:no_available_squelette');
+  }
+  
+  // Save if needed
+  if ($sktheme_action=="set_squelette") {
+    echo _T('sktheme:update_squelette_to') . $squelette_public_name. "<br />";
+    ecrire_meta('sktheme_squelette_public_name',$squelette_public_name);
+    // Set habillage to the original one when squelette is changed
+    ecrire_meta('sktheme_habillage_public_name',$original);
+    ecrire_metas();
+  } else {
+    $squelette_public_name = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  }
+  	
+  echo '<br />';
+  echo '<form action="'.generer_url_ecrire("sktheme_public_choice", "sktheme_action=set_squelette").'" method="post">';
+  foreach( $squelettes_list as $key => $value) {
+    $s_info = sktheme_xml_get_infos($value,"theme");
+    echo debut_cadre_gris_clair();
+    echo $s_info['extra_img_puce'];
+    if ($squelette_public_name==$key) {
+      echo '<input type="radio" name="squelette_public_name" value="'.$key.'" checked="checked" />';
+      $o_info = $s_info;
+    } else {
+      echo '<input type="radio" name="squelette_public_name" value="'.$key.'" />';
+    }
+    echo bouton_block_invisible("$key");
+    echo "<strong>$key</strong>";
+    echo debut_block_invisible("$key");
+    echo _T('version') .' '.  $s_info['version'] . " | <strong>".$s_info['extra_titre_etat']."</strong><br />";
+    if (isset($s_info['description']))
+      echo "<hr />" . propre($s_info['description']) . "<br />";
+    if (isset($s_info['auteur']))
+      echo "<hr />" . _T('auteur') .' '. propre($s_info['auteur']) . "<br />";
+    if (isset($s_info['lien']))
+      echo "<hr />" . _T('info_url') .' '. propre($s_info['lien']) . "<br />";
+    echo fin_block();
+    echo fin_cadre_gris_clair();
+  }
+  echo '<br />';
+  echo '<div><div style="text-align:right"><input type="submit" value="'._T('sktheme:save_squelette').'"></div></div>';
+  echo '</form>';
+  
+  
+  fin_cadre_trait_couleur();
+  
+  //
+  // Choose Habillage
+  $h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
+  debut_cadre_trait_couleur('', false, "sktheme_public_habillage_list", 
+			    _T('sktheme:available_habillage_list')." : ".$GLOBALS['meta']['sktheme_habillages_public_dir']);
+  
+  
+  $habillages_list = array($original => '');
+  if (is_dir($h_dir)) {
+    if ($dh = opendir($h_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($h_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is themes
+	  if (is_file($h_dir."/".$dir."/theme.xml")) {
+	    $h_info = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
+	    $type = (isset($h_info['type'])) ? propre($h_info['type']) : "";
+	    if ($type == 'themes') {
+	      $habillages_list[$dir]=$h_dir."/".$dir;
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    } 
+  } else {
+    echo _T('sktheme:no_available_habillage');
+  }
+  
+  // Save habillage if needed
+  if ($sktheme_action=="set_habillage") {
+    echo _T('sktheme:update_habillage_to') . $habillage_public_name . "<br />";
+    ecrire_meta('sktheme_habillage_public_name',$habillage_public_name);
+    ecrire_metas();
+  } else {
+    $habillage_public_name = $GLOBALS['meta']['sktheme_habillage_public_name'];
+  }
+    
+  echo '<br />';
+  echo '<form action="'.generer_url_ecrire("sktheme_public_choice", "sktheme_action=set_habillage").'" method="post">';
+  foreach( $habillages_list as $key => $value) {
+    $h_info = sktheme_xml_get_infos($value,"theme");
+
+    // Check if habillage is available for this squelette selection
+    // probably better way to do it in php (such grep perl function ? but its
+    // works anyway)
+    $squelette_ok = false;
+    if (is_array($h_info['squelettes'])) {
+      foreach ($h_info['squelettes'] as $sq){
+	$sq = trim($sq);
+	if ($sq == $squelette_public_name) {
+	  $squelette_ok = true;
+	}
+      }
+    } else {
+      if ($h_info['squelettes'] == $squelette_public_name) {
+	$squelette_ok = true;
+      }
+    }
+    
+    if (($key == $original)||($squelette_ok)) {
+      echo debut_cadre_gris_clair();
+      if ($key == $original) {
+	echo $o_info['extra_img_puce'];
+      } else {
+	echo $h_info['extra_img_puce'];
+      }
+      if ($habillage_public_name==$key) {
+	echo '<input type=radio  name="habillage_public_name" value="'.$key.'" checked="checked" />';
+      } else {
+	echo '<input type=radio  name="habillage_public_name" value="'.$key.'" />';
+      }
+      echo bouton_block_invisible("$key");
+      if ($key == $original) {
+	echo "<strong><i>$key (".$o_info['nom'].")</i></strong>";
+	echo debut_block_invisible("$key");
+	echo _T('version') .' '.  $o_info['version'] . " | <strong>".$o_info['extra_titre_etat']."</strong><br />";
+	if (isset($o_info['description']))
+	  echo "<hr />" . propre($o_info['description']) . "<br />";
+	if (isset($o_info['auteur']))
+	  echo "<hr />" . _T('auteur') .' '. propre($o_info['auteur']) . "<br />";
+	if (isset($o_info['lien']))
+	  echo "<hr />" . _T('info_url') .' '. propre($o_info['lien']) . "<br />";
+
+      } else {
+	echo "<strong>$key</strong>";
+	echo debut_block_invisible("$key");
+	echo _T('version') .' '.  $h_info['version'] . " | <strong>".$h_info['extra_titre_etat']."</strong><br />";
+	if (isset($h_info['description']))
+	  echo "<hr />" . propre($h_info['description']) . "<br />";
+	if (isset($h_info['auteur']))
+	  echo "<hr />" . _T('auteur') .' '. propre($h_info['auteur']) . "<br />";
+	if (isset($h_info['lien']))
+	  echo "<hr />" . _T('info_url') .' '. propre($h_info['lien']) . "<br />";
+      }
+      echo fin_block();
+      echo fin_cadre_gris_clair();
+    }
+  }
+    
+  echo '<br />';
+  echo '<div><div align="right"><input type="submit" value="'._t('sktheme:save_habillage').'"></div></div>';
+  echo '</form>';
+  
+  fin_cadre_trait_couleur();
+  
+  
+  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_1/inc/sktheme_balises.php
===================================================================
--- /plugins/sktheme/1_9_1/inc/sktheme_balises.php	(revision 5)
+++ /plugins/sktheme/1_9_1/inc/sktheme_balises.php	(revision 5)
@@ -0,0 +1,51 @@
+<?php
+
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+
+include_spip('inc/sktheme_list');
+
+// @param p est un objet SPIP
+function balise_SKTHEME_THEMES_SWITCHER ($p) {
+  $sktheme_list = sktheme_list();
+  $code.='<form action="" method="post">';
+  $code.='<select name="selecteurTheme" style="'.$GLOBALS['meta']['sktheme_theme_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">';
+  $code.='<option selected="selected" value="">'._T('themes').'</option>';
+  foreach( $sktheme_list as $value )	$code.='<option value="'.parametre_url(self(),'var_sktheme',$value).'">&nbsp;-> '.$value.'</option>';
+  $code.='</select>';
+  $code.='</form>';  
+  
+  $p->code = "'$code'";
+  return ($p);
+}
+
+// @param p est un objet SPIP
+function balise_SKTHEME_HABILLAGES_SWITCHER ($p) {
+  $sktheme_habillage_list = sktheme_habillage_list();
+  $code.='<form action="" method="post">';
+  $code.='<select name="selecteurHabillage" style="'.$GLOBALS['meta']['sktheme_habillage_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">';
+  $code.='<option selected="selected" value="">'._T('habillages').'</option>';
+  foreach( $sktheme_habillage_list as $value )	{
+    $code.='<option value="'.parametre_url(self(),'var_sktheme',"__current::".$value).'">&nbsp;-> '.$value.'</option>';
+  }
+  $code.='</select>';
+  $code.='</form>';  
+  $p->code = "'$code'";
+  return ($p);
+}
+
+?>
Index: /plugins/sktheme/1_9_1/inc/sktheme_list.php
===================================================================
--- /plugins/sktheme/1_9_1/inc/sktheme_list.php	(revision 5)
+++ /plugins/sktheme/1_9_1/inc/sktheme_list.php	(revision 5)
@@ -0,0 +1,159 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+  
+  // Create theme list
+function sktheme_list() {
+    
+  include_spip('inc/sktheme_xml');
+
+  $original = _T('sktheme:original');
+  $sktheme_list = array();
+  
+  $s_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_squelettes_public_dir'];
+  $squelettes_list = array('dist' => '' );
+  if (is_dir($s_dir)) {
+    if ($dh = opendir($s_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($s_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is squelettes
+	  if (is_file($s_dir."/".$dir."/theme.xml")) {
+	    $s_info = sktheme_xml_get_infos($s_dir."/".$dir,"theme");
+	    $type = (isset($s_info['type'])) ? propre($s_info['type']) : "";
+	    if ($type == 'squelettes') {
+	      $squelettes_list[$dir]=$s_dir."/".$dir;
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    }
+  } else {
+    // no extra directory for squelette
+    array_push($sktheme_list,"dist::".$original);
+    return $sktheme_list;
+  }
+
+  $h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
+  $habillages_list = array($original => '');
+  if (is_dir($h_dir)) {
+    if ($dh = opendir($h_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($h_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is themes
+	  if (is_file($h_dir."/".$dir."/theme.xml")) {
+	    $h_info = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
+	    $type = (isset($h_info['type'])) ? propre($h_info['type']) : "";
+	    if ($type == 'themes') {
+	      $habillages_list[$dir] = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    } 
+  } else {
+    // no habillage directory
+    foreach( $squelettes_list as $s_key => $s_value) {
+      array_push($sktheme_list,$s_key."::".$original);
+      return $sktheme_list;
+    }
+  }
+
+  // Look for matching theme
+  foreach( $squelettes_list as $s_key => $s_value) {
+    
+    foreach( $habillages_list as $h_key => $h_info) {
+      if ($h_key == $original) {
+	array_push($sktheme_list,$s_key."::".$h_key);
+      } else {
+	$squelette_ok = false;
+	if (is_array($h_info['squelettes'])) {
+	  foreach ($h_info['squelettes'] as $sq){
+	    $sq = trim($sq);
+	    if ($sq == $s_key) {
+	      $squelette_ok = true;
+	    }
+	  }
+	} else {
+	  if ($h_info['squelettes'] == $s_key) {
+	    $squelette_ok = true;
+	  }
+	}
+	if ($squelette_ok) {
+	  array_push($sktheme_list,$s_key."::".$h_key);
+	}
+      }
+    }
+  }
+  return $sktheme_list;
+}
+
+
+
+function sktheme_habillage_list() {
+    
+  include_spip('inc/sktheme_xml');
+
+  $original = _T('sktheme:original');
+  $sktheme_habillage_list = array();
+  
+  $squelette_name = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  
+  $h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
+  $habillages_list = array($original => '');
+  if (is_dir($h_dir)) {
+    if ($dh = opendir($h_dir)) {
+      while (($file = readdir($dh)) !== false) {
+	if ( (is_dir($h_dir."/".$file)) AND ($file[0]!=".") ) {
+	  $habillages_list[$file] = sktheme_xml_get_infos($h_dir."/".$file,"theme");
+	}
+      }
+      closedir($dh);
+    } 
+  } else {
+    // no habillage directory
+    array_push($sktheme_habillage_list,$original);
+    return $sktheme_habillage_list;
+  }
+
+  // Look for matching theme
+    
+  foreach( $habillages_list as $h_key => $h_info) {
+    if ($h_key == $original) {
+      array_push($sktheme_habillage_list,$h_key);
+    } else {
+      $squelette_ok = false;
+      if (is_array($h_info['squelettes'])) {
+	foreach ($h_info['squelettes'] as $sq){
+	  $sq = trim($sq);
+	  if ($sq == $squelette_name) {
+	    $squelette_ok = true;
+	  }
+	}
+      } else {
+	if ($h_info['squelettes'] == $squelette_name) {
+	  $squelette_ok = true;
+	}
+      }
+      if ($squelette_ok) {
+	array_push($sktheme_habillage_list,$h_key);
+      }
+    }
+  }
+  return $sktheme_habillage_list;
+}
+?>
Index: /plugins/sktheme/1_9_1/inc/sktheme_util.php
===================================================================
--- /plugins/sktheme/1_9_1/inc/sktheme_util.php	(revision 5)
+++ /plugins/sktheme/1_9_1/inc/sktheme_util.php	(revision 5)
@@ -0,0 +1,99 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+include_spip('inc/presentation');
+
+// Build 'onglets' for all pages
+function sktheme_public_choice_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_public_choice", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_public_choice", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_public_choice", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_public_choice", "sktheme_doc", "");
+   fin_onglet();
+
+}
+function sktheme_private_choice_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_private_choice", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_private_choice", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_private_choice", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_private_choice", "sktheme_doc", "");
+  fin_onglet();
+
+}
+function sktheme_config_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_config", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_config", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_config", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_config", "sktheme_doc", "");
+  fin_onglet();
+
+}
+function sktheme_doc_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_doc", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_config", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_doc", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_doc", "sktheme_doc", "");
+  fin_onglet();
+
+}
+
+// Build 'raccourcis' for all pages
+function sktheme_raccourcis() {
+
+  debut_raccourcis();
+  
+  
+  fin_raccourcis();
+
+}
+
+// Build documentation
+function sktheme_config_doc_box() {
+  
+  debut_cadre_relief();
+  echo _T('sktheme:config_doc_directories');
+  fin_cadre_relief();
+  debut_cadre_relief();
+  echo _T('sktheme:config_doc_switcher');
+  fin_cadre_relief();
+  
+}
+
+// Build documentation
+function  sktheme_public_theme_doc_box() {
+  debut_cadre_relief();
+  echo _T('sktheme:public_theme_doc_squelette');
+  fin_cadre_relief();
+  debut_cadre_relief();
+  echo _T('sktheme:public_theme_doc_habillage');
+  fin_cadre_relief();
+ 
+}
+
+?>
Index: /plugins/sktheme/1_9_1/inc/sktheme_xml.php
===================================================================
--- /plugins/sktheme/1_9_1/inc/sktheme_xml.php	(revision 5)
+++ /plugins/sktheme/1_9_1/inc/sktheme_xml.php	(revision 5)
@@ -0,0 +1,173 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+function sktheme_xml_get_infos($xml_dir,$xml_type){
+
+  include_spip('inc/plugin'); 
+
+  $ret = array();
+  if ((@file_exists($xml_dir))&&(is_dir($xml_dir))){
+    if (@file_exists($xml_dir."/$xml_type.xml")) {
+      lire_fichier($xml_dir."/$xml_type.xml", $texte);
+      $arbre = parse_plugin_xml($texte);
+      if (!isset($arbre[$xml_type])&&is_array($arbre[$xml_type]))
+	$arbre = array('erreur' => array(_T('erreur_plugin_fichier_def_incorrect')." : $xml_dir/$xml_type.xml"));
+    }
+    else {
+      // pour arriver ici on l'a vraiment cherche...
+      //debug echo "error: erreur_plugin_fichier_def_absent $xml_dir/$xml_type.xml<br>";
+      $arbre = array('erreur' => array(_T('erreur_plugin_fichier_def_absent')." : $xml_dir/$xml_type.xml"));
+    }
+
+    sktheme_xml_verifie_conformite($xml_dir,$xml_type,$arbre);
+		
+    $ret['nom'] = applatit_arbre($arbre['nom']);
+    $ret['version'] = trim(end($arbre['version']));
+    if (isset($arbre['auteur']))
+      $ret['auteur'] = applatit_arbre($arbre['auteur']);
+    if (isset($arbre['description']))
+      $ret['description'] = applatit_arbre($arbre['description']);
+    if (isset($arbre['lien']))
+      $ret['lien'] = join(' ',$arbre['lien']);
+    if (isset($arbre['etat']))
+      $ret['etat'] = trim(end($arbre['etat']));
+    if (isset($arbre['options']))
+      $ret['options'] = $arbre['options'];
+    if (isset($arbre['fonctions']))
+      $ret['fonctions'] = $arbre['fonctions'];
+    $ret['prefix'] = $arbre['prefix'];
+    if (isset($arbre['pipeline']))
+      $ret['pipeline'] = $arbre['pipeline'];
+    if (isset($arbre['erreur']))
+      $ret['erreur'] = $arbre['erreur'];
+    if (isset($arbre['squelettes'])) {
+      $ret['squelettes'] = $arbre['squelettes'];
+    }
+    if (isset($arbre['type'])) {
+      $ret['type'] =  trim(applatit_arbre($arbre['type']));
+    }
+
+    // Compute extra values
+    $etat = 'dev';
+    if (isset($ret['etat']))
+      $etat = $ret['etat'];
+    switch ($etat) {
+    case 'experimental':
+      $puce = 'puce-rouge.gif';
+      $titre_etat = _T('plugin_etat_experimental');
+      break;
+    case 'test':
+      $puce = 'puce-orange.gif';
+      $titre_etat = _T('plugin_etat_test');
+      break;
+    case 'stable':
+      $puce = 'puce-verte.gif';
+      $titre_etat = _T('plugin_etat_stable');
+      break;
+    default:
+      $puce = 'puce-poubelle.gif';
+      $titre_etat = _T('plugin_etat_developpement');
+      break;
+    }
+    $ret['extra_puce']       = $puce;
+    $ret['extra_img_puce']   = "<img src='"._DIR_IMG_PACK."$puce' width='9' height='9' style='border:0;' alt=\"$titre_etat\" title=\"$titre_etat\" />&nbsp;";
+    $ret['extra_titre_etat'] = $titre_etat;
+  }
+  return $ret;
+}
+
+function sktheme_xml_verifie_conformite($xml_dir,$xml_type="plugin",&$arbre){
+	$silence = false;
+	if (isset($arbre[$xml_type])&&is_array($arbre[$xml_type]))
+		$arbre = end($arbre[$xml_type]); // derniere def xml_type
+	else{
+		$arbre = array('erreur' => array(_T('erreur_plugin_tag_plugin_absent')." : $xml_dir/plugin.xml"));
+		$silence = true;
+	}
+  // verification de la conformite du plugin avec quelques
+  // precautions elementaires
+  if (!isset($arbre['nom'])){
+  	if (!$silence)
+			$arbre['erreur'][] = _T('erreur_plugin_nom_manquant');
+		$arbre['nom'] = array("");
+	}
+  if (!isset($arbre['version'])){
+  	if (!$silence)
+			$arbre['erreur'][] = _T('erreur_plugin_version_manquant');
+		$arbre['version'] = array("");
+	}
+  if (!isset($arbre['prefix'])){
+  	if (!$silence)
+			$arbre['erreur'][] = _T('erreur_plugin_prefix_manquant');
+		$arbre['prefix'] = array("");
+	}
+	else{
+		$prefix = "";
+		$prefix = trim(end($arbre['prefix']));
+		if (isset($arbre['etat'])){
+			$etat = trim(end($arbre['etat']));
+			if (!preg_match(',^(dev|experimental|test|stable)$,',$etat))
+				$arbre['erreur'][] = _T('erreur_plugin_etat_inconnu')." : $etat";
+		}
+		if (isset($arbre['options'])){
+			foreach($arbre['options'] as $optfile){
+				$optfile = trim($optfile);
+				if (!@is_readable(_DIR_PLUGINS."$xml_dir/$optfile"))
+  				if (!$silence)
+						$arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile";
+			}
+		}
+		if (isset($arbre['fonctions'])){
+			foreach($arbre['fonctions'] as $optfile){
+				$optfile = trim($optfile);
+				if (!@is_readable(_DIR_PLUGINS."$xml_dir/$optfile"))
+  				if (!$silence)
+						$arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile";
+			}
+		}
+		$fonctions = array();
+		if (isset($arbre['fonctions']))
+			$fonctions = $arbres['fonctions'];
+	  $liste_methodes_reservees = array('__construct','__destruct','plugin','install','uninstall',strtolower($prefix));
+		if (is_array($arbre['pipeline'])){
+			foreach($arbre['pipeline'] as $pipe){
+				$nom = trim(end($pipe['nom']));
+				if (isset($pipe['action']))
+					$action = trim(end($pipe['action']));
+				else
+					$action = $nom;
+				// verif que la methode a un nom autorise
+				if (in_array(strtolower($action),$liste_methodes_reservees)){
+					if (!$silence)
+						$arbre['erreur'][] = _T("erreur_plugin_nom_fonction_interdit")." : $action";
+				}
+				else{
+					// verif que le fichier de def est bien present
+					if (isset($pipe['inclure'])){
+						$inclure = _DIR_PLUGINS."$xml_dir/".end($pipe['inclure']);
+						if (!@is_readable($inclure))
+		  				if (!$silence)
+								$arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $inclure";
+					}
+				}
+			}
+		}
+	}
+}
+
+?>
Index: /plugins/sktheme/1_9_1/lang/sktheme_en.php
===================================================================
--- /plugins/sktheme/1_9_1/lang/sktheme_en.php	(revision 5)
+++ /plugins/sktheme/1_9_1/lang/sktheme_en.php	(revision 5)
@@ -0,0 +1,138 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$GLOBALS[$GLOBALS['idx_lang']] = 
+    array(
+	  // A
+	  "available_habillage_list" => "Available habillages",
+	  "available_squelette_list" => "Available squelettes",
+	  
+	  // B
+
+	  // C
+	  "configuration" => "Advanced configuration",
+	  "config_doc_directories" => "<b>R&eacute;pertoires</b>:<br>
+	  It is possible to re-defined default directories locations of yours
+	  <i>squelettes/habillages</i> distributions.Default is  the <i>'themes'</i>
+	   directory, directories are always relatives to
+	  your SPIP root site.
+	  ",
+	  "config_doc_switcher" => "<b>Switcher</b>:<br>
+	  The theme switcher can be activated to include a selection list in the
+	  public area, and then easily test themes. It is possible to limit this
+	  functionnality to the administrator only.<br>
+	  Moreover you can modify the style of this theme selector.<br>
+	  <br>
+	  A new 'balise' <b>#SKTHEME_HABILLAGES_SWITCHER</b> is available to
+	  include an 'habillage' selector list in your squelette. This list is
+	  composed of all available 'habillage' corresponding to the squelette
+	  distribution you have choosen. You can as well modify this
+	  list selector style here.
+	  
+	  
+	  ",
+	  
+	  // D
+	  "documentation" => "Documentation",
+	  "extra_documentation" => "Extra Documentation",
+
+	  // E
+
+	  // F
+
+	  // G
+
+	  // H
+	  "habillages_public_dir" => "Public habillages directory",
+
+	  // I
+
+	  // J
+
+	  // K
+
+	  // L
+
+	  // M
+	  "main_config_title" => "Configuration",
+	  "manage_theme" => "Manage themes",
+
+	  // N
+	  "no" => "No",
+	  "no_available_habillage" => "No available habillage",
+	  "no_available_squelette" => "No available squelette",
+
+	  // O
+	  "original" => "Original",
+
+	  // P
+	  "private_choice" => "Private theme choice",
+	  "private_themes_config" => "Private themes configuration",
+	  "private_theme_choice" => "Private theme choice",
+	  "public_choice" => "Public theme choice",
+	  "public_theme_choice" => "Public theme choice",
+	  "public_themes_config" => "Public themes configuration",
+	  "public_theme_doc_squelette" => "<b>Squelette choice:</b><br>
+	  Each time you will choose a 'squelette' (more exactly a squelettes distribution)
+	  the 'habillage' list will be updated with the available ones.
+	  The small square represent the state of the distribution, stable,
+	  test, experimental, ...<br>
+	  Clic on the small black triangle to get more details about the distribution.
+	  ",
+	  "public_theme_doc_habillage" => "<b>Habillage choice:</b><br>
+	  An Habillage is modifing colors and graphical aspect of your squelettes.
+	  It is composed of CSS, pictures, ...<br>
+	  A squelette distribution always contain a default 'habillage' which is
+	  called <b>Original</b>.  
+	  ",
+	  
+	  // Q
+
+	  // R
+
+	  // S
+	  "save_habillage" => "Save habillage",
+	  "save_public_directories" => "Save directories",
+	  "save_squelette" => "Save squelette",
+	  "save_switcher_options" => "Save switcher options",
+	  "squelettes_public_dir" => "Public squelettes directory",
+	  "switcher_activated" => "Theme switcher activated",
+	  "switcher_admin_only" => "Only for administrators",
+	  "switcher_style" => "Switcher style",
+
+	  // T
+	  "to_be_done" => "To be done !",
+	  "themes_switcher" => "Theme switch",
+
+	  // U
+	  "update_habillage_to" => "Update habillage to : ",
+	  "update_squelette_to" => "Update squelette to : ",
+
+	  // V
+
+	  // W
+
+	  // X
+
+	  // Y
+	  "yes" => "Yes",
+
+	  // Z
+
+);
+
+?>
Index: /plugins/sktheme/1_9_1/lang/sktheme_es.php
===================================================================
--- /plugins/sktheme/1_9_1/lang/sktheme_es.php	(revision 5)
+++ /plugins/sktheme/1_9_1/lang/sktheme_es.php	(revision 5)
@@ -0,0 +1,131 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$GLOBALS[$GLOBALS['idx_lang']] = 
+    array(
+	  // A
+	  "available_habillage_list" => "Lista de pieles disponibles",
+	  "available_squelette_list" => "Lista de esqueletos disponibles",
+	  
+	  // B
+
+	  // C
+	  "configuration" => "Configuraci&oacute;n avanzada",
+	  "config_doc_directories" => "<b>Carpetas</b>:<br /> 
+	  Es posible redefinir las carpetas de almacenaje de tus <i>'esqueletos'</i> 
+	  y de tus <i>'pieles'</i>, por omisi&oacute;n est&aacute;n en la carpeta 
+	  <i>'themes'</i>. Estas carpetas siempre son relativas a la ra&iacute;z detu sitio SPIP.
+	  ",
+	  "config_doc_switcher" => "<b>Alternador</b>:<br />
+	  Le 'alternador' (o 'switcher' de temas permite hacer aparecer una lista de selecci&oacute;n
+	  de temas en el espacio p&uacute;blico y as&iacute; probar los diferentes temas m&aacute;s 
+	  r&aacute;pidamente. Es posible limitar esta posibilidad s&oacute;lo a los administradores.<br />
+	  Adicionalmente, puedes cambiar aqu&iacute; el estilo de tiuselector de temas. 
+	  <br />
+	  <br />
+	  TambiÃ©n existe una baliza<br /> <b><small>#SKTHEME_HABILLAGES_SWITCHER</small></b><br />
+	  que es posible integrar a los esqueletos para disponer, esta vez, de un selector que corresponda a 
+      tu elecci&oacute;n de esqueletos. Igualmente, se puede modificar el estilo de este selector.
+	  ",
+	  // D
+	  "documentation" => "Documentaci&oacute;n",
+	  "extra_documentation" => "Documentaci&oacute;n extra",
+
+	  // E
+
+	  // F
+
+	  // G
+
+	  // H
+	  "habillages_public_dir" => "Carpetas para las pieles p&uacute;blicas",
+
+	  // I
+
+	  // J
+
+	  // K
+
+	  // L
+
+	  // M
+	  "main_config_title" => "Configuraci&oacute;n",
+	  "manage_theme" => "Gesti&oacute;n des temas",
+
+	  // N
+	  "no" => "No",
+	  "no_available_habillage" => "Ninguna piel disponible",
+	  "no_available_squelette" => "Aucun squelette disponible",
+
+	  // O
+	  "original" => "Original",
+
+	  // P
+	  "private_choice" => "Elecci&oacute;n tema privado",
+	  "private_themes_config" => "Configuraci&oacute;n para los temas privados",
+	  "private_theme_choice" => "Elecci&oacute;n del tema del espacio privado",
+	  "public_choice" => "Elecci&oacute;n tema p&uacute;blico",
+	  "public_theme_choice" => "Elecci&oacute;n del tema del espacio p&uacute;blico",
+	  "public_themes_config" => "Configuraci&oacute;n para los temas p&uacute;blicos",
+	  "public_theme_doc_squelette" => "<b>Elecci&oacute;n del esqueleto:</b><br />
+	  Cada vez que seleccionar&aacute;s un esqueleto (m&aacute;s exactamente una distribuci&oacute;n de 
+	  esqueletos) la lista de ropas disponibles se actualiza. El cuadradito indica el estado de la
+	  distribuci&oacute;n de esqueletos: estable, test, experimental ...<br />
+	  Para mayores detalles acerca de una distribuci&oacute;n pincha en la flecha negra.
+	  ",
+	  "public_theme_doc_habillage" => "<b>Elecci&oacute;n de la piel:</b><br />
+	  Las 'pieles' permiten modificar los colores y el aspecto gr&aacute;fico de una distribuci&oacute;n 
+	  de esqueletos. Se trata de CSS y/o de im&aacute;genes, ect. <br /> 
+	  Una distribuci&oacute;n de esqueletos siempre contiene una presentaci&oacute;n gr&aacute;fica
+      por omisi&oacute;n, que corresponde a la piel denominada <b>Original</b>.
+	  ",
+	  // Q
+
+	  // R
+
+	  // S
+	  "save_habillage" => "Guardar la piel",
+	  "save_public_directories" => "Guardar las carpetas ",
+	  "save_squelette" => "Guardar es esqueleto",
+	  "save_switcher_options" => "Guardar las opciones del alternador",
+	  "squelettes_public_dir" => "Carpetas para los esqueletos p&uacute;blicos",
+	  "switcher_activated" => "Activar el alternador de temas",
+	  "switcher_admin_only" => "S&oacute;lo para los administratdores",
+	  "switcher_style" => "Style du switcher",
+
+	  // T
+	  "to_be_done" => "&iexcl;a&uacute;n por hacer!",
+	  "themes_switcher" => "Alternador de temas",
+
+	  // U
+	  "update_habillage_to" => "Actualizaci&oacute;n de la piel por: ",
+	  "update_squelette_to" => "Actualizaci&oacute;n del esqueleto por: ",
+
+	  // V
+
+	  // W
+
+	  // X
+
+	  // Y
+	  "yes" => "S&iacute;",
+
+	  // Z
+
+);
+
+?>
Index: /plugins/sktheme/1_9_1/lang/sktheme_fr.php
===================================================================
--- /plugins/sktheme/1_9_1/lang/sktheme_fr.php	(revision 5)
+++ /plugins/sktheme/1_9_1/lang/sktheme_fr.php	(revision 5)
@@ -0,0 +1,140 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$GLOBALS[$GLOBALS['idx_lang']] = 
+    array(
+	  // A
+	  "available_habillage_list" => "Liste des habillages disponibles",
+	  "available_squelette_list" => "Liste des squelettes disponibles",
+	  
+	  // B
+
+	  // C
+	  "configuration" => "Configuration avanc&eacute;e",
+	  "config_doc_directories" => "<b>R&eacute;pertoires</b>:<br /> 
+	  Il est possible de red&eacute;finir les r&eacute;pertoires de stockage 
+	  de vos <i>'squelettes'</i> et de vos <i>'habillages'</i>, par 
+	  d&eacute;faut il s'agit du r&eacute;pertoire <i>'themes'</i>, les r&eacute;pertoires sont toujours 
+	  relatifs &agrave; la racine de votre site SPIP 
+	  ",
+	  "config_doc_switcher" => "<b>Switcher</b>:<br />
+	  Le 'switcher' de th&egrave;mes permet de faire appara&icirc;tre une liste de
+	  s&eacute;lection de th&egrave;mes dans l'espace public et ainsi tester
+	  les diff&eacute;rents th&egrave;mes plus rapidement. Il est possible
+	  de ne donner cette possibilit&eacute; qu'aux administrateurs<br />
+	  De plus vous pouvez changer le style de votre s&eacute;lecteur de
+	  th&egrave;mes ici.
+	  <br>
+	  <br>
+	  Il existe &eacute;galement une balise <br />
+	  <b><small>#SKTHEME_HABILLAGES_SWITCHER</small></b><br />
+	  qu'il est possible d'int&eacute;grer &agrave; vos squelettes pour disposer
+	  cette fois d'un s&eacute;lecteur d'habillage correspondant &agrave; votre
+	  choix de squelette. Une fois encore vous pouvez en modifier le style si besoin.
+	  ",
+	  // D
+	  "documentation" => "Documentation",
+	  "extra_documentation" => "Extra Documentation",
+
+	  // E
+
+	  // F
+
+	  // G
+
+	  // H
+	  "habillages_public_dir" => "R&eacute;pertoires pour les habillages publics",
+
+	  // I
+
+	  // J
+
+	  // K
+
+	  // L
+
+	  // M
+	  "main_config_title" => "Configuration",
+	  "manage_theme" => "Gestion des th&egrave;mes",
+
+	  // N
+	  "no" => "Non",
+	  "no_available_habillage" => "Aucun habillage disponible",
+	  "no_available_squelette" => "Aucun squelette disponible",
+
+	  // O
+	  "original" => "Original",
+
+	  // P
+	  "private_choice" => "Choix th&egrave;me priv&eacute;",
+	  "private_themes_config" => "Configuration pour les th&egrave;mes priv&eacute;s",
+	  "private_theme_choice" => "Choix du th&egrave;me de l'espace priv&eacute;",
+	  "public_choice" => "Choix th&egrave;me public",
+	  "public_theme_choice" => "Choix du th&egrave;me de l'espace public",
+	  "public_themes_config" => "Configuration pour les th&egrave;mes publics",
+	  "public_theme_doc_squelette" => "<b>Choix du squelette :</b><br />
+	  Chaque fois que vous s&eacute;lectionnez un squelette (plus exactement une
+	  distribution de squelettes) la liste des habillages disponibles est mise &agrave; 
+	  jour. Le petit carr&eacute;s indique l'&eacute;tat de
+	  la distribution de squelette, stable, test, experimental ...<br />
+	  Pour plus de d&eacute;tail sur une distribution cliquez sur la
+	  fl&egrave;che noire.
+	  ",
+	  "public_theme_doc_habillage" => "<b>Choix de l'habillage :</b><br />
+	  Les habillages permettent de modifier les couleurs et l'aspect
+	  graphique d'une distribution de squelettes. Il s'agit de CSS et/ou d'images
+	  etc ...<br /> 
+	  Une distribution de squelette contient toujours une
+	  pr&eacute;sentation graphique par d&eacute;faut, ceci correspond
+	  &agrave; l'habillage nomm&eacute; <b>Original</b>.
+	  ",
+	  // Q
+
+	  // R
+
+	  // S
+	  "save_habillage" => "Enregister l'habillage",
+	  "save_public_directories" => "Enregistrer les r&eacute;pertoires",
+	  "save_squelette" => "Enregister le squelette",
+	  "save_switcher_options" => "Enregistrer les options du switcher",
+	  "squelettes_public_dir" => "R&eacute;pertoires pour les squelettes publics",
+	  "switcher_activated" => "Activer le switcher de th&egrave;me",
+	  "switcher_admin_only" => "Seulement pour les administrateurs",
+	  "switcher_style" => "Style du switcher",
+
+	  // T
+	  "to_be_done" => "&agrave; faire !",
+	  "themes_switcher" => "Switcher de th&egrave;me",
+
+	  // U
+	  "update_habillage_to" => "Mise &agrave; jour de l'habillage par : ",
+	  "update_squelette_to" => "Mise &agrave; jour du squelette par : ",
+
+	  // V
+
+	  // W
+
+	  // X
+
+	  // Y
+	  "yes" => "Oui",
+
+	  // Z
+
+);
+
+?>
Index: /plugins/sktheme/1_9_1/plugin.xml
===================================================================
--- /plugins/sktheme/1_9_1/plugin.xml	(revision 5)
+++ /plugins/sktheme/1_9_1/plugin.xml	(revision 5)
@@ -0,0 +1,38 @@
+<plugin>
+ <nom>SkTheme (SPIP 1.9.1)</nom>
+ <version>0.6</version>
+ <etat>stable</etat>
+ <auteur>Skedus
+<multi>
+_ &copy; September 2006 - distributed under GNU/GPL licence.
+[fr]_ &copy; Septembre 2006 - distribu&#233; sous license GNU/GPL.
+</multi>
+</auteur>
+<description>
+<multi>
+Manage theme for SPIP
+_ WATCH OUT: You need to desactivate switcher plugin (quite incompatible because using same process - this means i copied it inside this plugin and i would like to thank  its authors Philippe Drouot and Fil for this nice switcher plugin)
+_ Activate this plugin and manage themes in the {{Configuration}} menu.
+[fr]
+Gestion des th&#232;mes de SPIP
+_ ATTENTION: D&#233;sactivez le plugin switcher (ils sont quelque peu incompatibles, car il est monstreusement copi&#233; dans ce plugin, merci aux auteurs Philippe Drouot et Fil)
+_ Activez ce plugin et g&#233;rez les th&#232;mes dans le menu {{Configuration}}.
+</multi>
+</description>
+	<lien>http://skedus.free.fr/spip/spip.php?article8</lien> <!-- URI de documentation -->
+ <prefix>sktheme</prefix>
+ <options>sktheme_options.php</options>
+ <pipeline>
+    <nom>ajouter_boutons</nom>
+    <inclure>sktheme_fonctions.php</inclure>
+ </pipeline>
+ <pipeline>
+    <nom>affichage_final</nom>
+    <action>affichage_final</action>
+    <inclure>sktheme_fonctions.php</inclure>
+ </pipeline>
+ <pipeline>
+   <nom>insert_head</nom>
+      <inclure>sktheme_head.php</inclure>
+ </pipeline>
+ </plugin>
Index: /plugins/sktheme/1_9_1/sktheme_fonctions.php
===================================================================
--- /plugins/sktheme/1_9_1/sktheme_fonctions.php	(revision 5)
+++ /plugins/sktheme/1_9_1/sktheme_fonctions.php	(revision 5)
@@ -0,0 +1,89 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$p=explode(basename(_DIR_PLUGINS)."/",str_replace('\\','/',realpath(dirname(__FILE__))));
+define('_DIR_PLUGIN_SKTHEME',(_DIR_PLUGINS.end($p)));
+
+include_spip('inc/sktheme_list');
+
+// Add private area button
+function sktheme_ajouter_boutons($boutons_admin) {
+  // administrator only
+  if ($GLOBALS['connect_statut'] == "0minirezo" && $GLOBALS["connect_toutes_rubriques"]) {
+    
+    // See button in the 'configuration' 
+    $boutons_admin['configuration']->sousmenu["sktheme_public_choice"]= 
+       new Bouton("../"._DIR_PLUGIN_SKTHEME."/img_pack/sktheme_icon.png",  // icon
+		  _L("sktheme:manage_theme"));                                     // title
+  }
+  return $boutons_admin;
+}
+
+
+//
+// Include Philippe Drouot switcher functionnality
+// Based on Fil contrib
+function sktheme_affichage_final($texte){
+	
+  global $html;
+  
+  $sktheme_list = sktheme_list();
+   
+  // Insertion du Javascript de rechargement de page
+  // Always include this script used for #SKTHEME_HABILLAGES_SWITCHER and #SKTHEME_THEMES_SWITCHER
+  $code = '<script type="text/javascript">
+		//<![CDATA[
+		function sktheme_gotof(url) {
+		window.location=url;
+		}//]]>
+		</script>';	  
+  
+  if (isset($GLOBALS['meta']['sktheme_switcher_activated']) 
+      AND ($GLOBALS['meta']['sktheme_switcher_activated']=="yes")) {
+    if ($html) {
+		
+      // Doit-on afficher le selecteur de squelette ? (Fonctionnalite restreinte aux seuls administrateurs ?)
+      $afficherSelecteur=TRUE;
+      if (isset($GLOBALS['meta']['sktheme_switcher_admin_only']) 
+	  AND ($GLOBALS['meta']['sktheme_switcher_admin_only']=="yes") 
+	  AND (!isset($_COOKIE['spip_admin']))) $afficherSelecteur=FALSE;
+		
+      if ($afficherSelecteur) {
+			
+			
+	// Insertion du selecteur de squelettes			
+	$code.='<div id="sktheme_switcher" style="top: 0;left: 20px; position: absolute; background-color: transparent;z-index: 100;">';
+	$code.='<form action="" method="post">';
+	$code.='<fieldset style="margin:0;padding:0;border:0">';
+	$code.='<select name="selecteurTheme" style="'.$GLOBALS['meta']['sktheme_theme_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">';
+	$code.='<option selected="selected" value="">Themes</option>';
+	foreach( $sktheme_list as $value )	$code.='<option value="'.parametre_url(self(),'var_sktheme',$value).'">&nbsp;-> '.$value.'</option>';
+	$code.='</select>';
+	$code.='</fieldset>';
+	$code.='</form>';
+	$code.='</div>';
+      }
+
+			
+    }
+  } 
+	// On rajoute le code du selecteur de squelettes avant la balise </body>  
+	$texte=eregi_replace("</body>","$code</body>",$texte);
+	return($texte);
+}
+
+?>
Index: /plugins/sktheme/1_9_1/sktheme_head.php
===================================================================
--- /plugins/sktheme/1_9_1/sktheme_head.php	(revision 5)
+++ /plugins/sktheme/1_9_1/sktheme_head.php	(revision 5)
@@ -0,0 +1,23 @@
+<?php
+
+
+
+function sktheme_insert_head($flux){
+  
+  if ($GLOBALS['meta']['sktheme_switcher_activated']) {
+
+    $flux .='
+	<style type="text/css" media="print">
+/* <![CDATA[ */
+	#sktheme_switcher { display: none; }
+/* ]]> */
+	</style>
+';
+
+    return $flux;
+  
+  }  
+}
+
+
+?>
Index: /plugins/sktheme/1_9_1/sktheme_options.php
===================================================================
--- /plugins/sktheme/1_9_1/sktheme_options.php	(revision 5)
+++ /plugins/sktheme/1_9_1/sktheme_options.php	(revision 5)
@@ -0,0 +1,90 @@
+<?php
+// ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+  // cache desactivation
+  $_SERVER['REQUEST_METHOD']='POST';
+
+include_spip("inc/meta");
+include_spip('inc/sktheme_balises');
+
+// Set a default configuration - each values can be modify 
+// in the private area
+if (!isset($GLOBALS['meta']['sktheme_squelettes_public_dir'])){
+  ecrire_meta('sktheme_squelettes_public_dir',"themes");
+  ecrire_meta('sktheme_habillages_public_dir',"themes");
+  ecrire_meta('sktheme_squelette_public_name',"dist");
+  ecrire_meta('sktheme_habillage_public_name',"");
+  ecrire_meta('sktheme_theme_switcher_style',"font-size: 10px;background-color: #FFF;color: #0C479D;border-top: 1px solid #CECECE; border-bottom: 2px solid #4A4A4A; border-left: 1px solid #CECECE; border-right: 1px solid #CECECE;margin:2px .5em;");
+  ecrire_meta('sktheme_habillage_switcher_style',"font-size: 10px;background-color: #FFF;color: #0C479D;border-top: 1px solid #CECECE; border-bottom: 2px solid #4A4A4A; border-left: 1px solid #CECECE; border-right: 1px solid #CECECE;margin:2px .5em;");
+  ecrire_meta('sktheme_switcher_activated',"no");
+  ecrire_meta('sktheme_switcher_admin_only',"yes");
+  ecrire_metas();
+} 
+
+// Set default user choice
+$s_dir = $GLOBALS['meta']['sktheme_squelettes_public_dir'].'/'.$GLOBALS['meta']['sktheme_squelette_public_name'];
+$h_dir = $GLOBALS['meta']['sktheme_habillages_public_dir'].'/'.$GLOBALS['meta']['sktheme_habillage_public_name'];
+
+//
+// SWITCHER THEME
+//
+// Contrib de Fil : voir http://trac.rezo.net/trac/spip-zone/browser/_contribs_/switcher/switcher.php
+// --------------------------------------------------------------------------------------------------
+// Ask sktheme 
+if (isset($_GET['var_sktheme'])) {
+  
+  // sktheme format : 
+  // for theme           = squelette_name::habillage_name
+  // for habillage only  = __current::habillage_name
+  // 
+  list($squelette,$habillage)= split ("::", $_GET['sktheme']);
+    
+  // For habillage only
+  if ($squelette == "__current") {
+    $squelette = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  }
+    
+  $s_dir = $GLOBALS['meta']['sktheme_squelettes_public_dir'].'/'.$squelette;
+  $h_dir = $GLOBALS['meta']['sktheme_habillages_public_dir'].'/'.$habillage;
+  if (is_dir(_DIR_RACINE.$s_dir)) {
+    // theme exist put a cookie
+    setcookie('spip_sktheme', $_COOKIE['spip_sktheme'] = $_GET['var_sktheme'], NULL, '/');
+  } else {
+    // not valid remove cookie
+    setcookie('spip_sktheme', $_COOKIE['spip_sktheme'] = '', -24*3600, '/');
+  }
+}
+
+if (isset($_COOKIE['spip_sktheme'])) {
+  list($squelette,$habillage)= split ("::", $_COOKIE['spip_sktheme']);
+  // For habillage only
+  if ($squelette == "__current") {
+    $squelette = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  }
+  $s_dir_new = $GLOBALS['meta']['sktheme_squelettes_public_dir'].'/'.$squelette;
+  $h_dir_new = $GLOBALS['meta']['sktheme_habillages_public_dir'].'/'.$habillage;
+  
+  if (is_dir(_DIR_RACINE.$s_dir_new)) {
+    $s_dir = $s_dir_new;
+  }
+  if (is_dir(_DIR_RACINE.$h_dir_new)) {
+    $h_dir = $h_dir_new;
+  }
+} 
+
+// So set only the 'dossier_squelettes' to the corresponding user choice
+$dossier_squelettes = $h_dir.':'.$s_dir;
+?>
Index: /plugins/sktheme/1_9_2/COPYING.txt
===================================================================
--- /plugins/sktheme/1_9_2/COPYING.txt	(revision 5)
+++ /plugins/sktheme/1_9_2/COPYING.txt	(revision 5)
@@ -0,0 +1,344 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: /plugins/sktheme/1_9_2/DOCUMENTATION.txt
===================================================================
--- /plugins/sktheme/1_9_2/DOCUMENTATION.txt	(revision 5)
+++ /plugins/sktheme/1_9_2/DOCUMENTATION.txt	(revision 5)
@@ -0,0 +1,76 @@
+// ----------------------------------------------------------------------------
+// STRUCTURE DOCUMENTATION
+//     
+// The Theme directory structure need to be like this
+// This is only for the public theme
+// 
+// themes/ 
+//      <squelette_dir1>
+//         theme.xml
+//        <files ... >
+//      <squelette_dir2>
+//         theme.xml
+//        <files ... >
+//      <...>
+//      <habillage_dir1>
+//         theme.xml
+//        <files ...>
+//      <habillage_dir2>
+//         theme.xml
+//        <files ...>
+//
+// Theme = Squelette [+ Habillage]
+// Habillage is optional, because default 'habillage' could be in the
+// 'squelette' directory itself (such 'dist').
+//
+// Available 'squelettes' or 'habillage' can be now stored in the same
+// directory but you still have the possibility to have 2 differents 
+// directories
+//
+// ---------------------------------------------------------------------------
+// Habillage
+// theme.xml (use to give a description in the interface and to select it
+//                with <squelettes> name)
+//    <theme>
+// 	<nom>name_of_the_habillage</nom>
+// 	<auteur>
+// 	author of the habillage
+// 	</auteur>
+// 	<version>
+// 	1.0
+// 	</version>
+// 	<etat>
+// 	stable
+// 	</etat>
+// 	<description>
+// 	...
+// 	</description>
+//      <type>themes</type>
+// 	<squelettes>dist</squelettes>
+// 	<squelettes>SarkaSpip</squelettes>
+//    </theme>
+//
+// You can define several dependances <squelettes></squelettes>
+// 
+// ---------------------------------------------------------------------------
+// Squelette
+// theme.xml (use to give description in the interface)
+//
+//    <theme>
+// 	<nom>name_of_the_squelette</nom>
+// 	<auteur>
+// 	author of the squelette
+// 	</auteur>
+// 	<version>
+// 	1.0
+// 	</version>
+// 	<etat>
+// 	stable
+// 	</etat>
+//      <type>squelettes</type>
+// 	<description>
+// 	...
+// 	</description>
+//    </theme>
+//
+// ---------------------------------------------------------------------------
Index: /plugins/sktheme/1_9_2/TODO.txt
===================================================================
--- /plugins/sktheme/1_9_2/TODO.txt	(revision 5)
+++ /plugins/sktheme/1_9_2/TODO.txt	(revision 5)
@@ -0,0 +1,10 @@
+// <b>VOUS POUVEZ AJOUTER DES ELEMENTS A CETTE LISTE</b>
+// <b>TODO</b>: Probablement ajouter des tests pour detecter l'usage de 'dossier_squelettes'.
+// <b>TODO</b>: Telecharger un squelette ou un theme distribue par internet et l'installer.
+// <b>TODO</b>: Afficher les fichiers capture.png si ils existent
+//
+// <b>YOU CAN ADD ITEM TO THIS LIST AS YOU WISH</b>
+// <b>TODO</b>: Probably add some tests to detect the usage of 'dossier_squelettes'.
+// <b>TODO</b>: Download a whole squelette or theme zip distribution trough the net and install it.
+// <b>TODO</b>: Display capture.png files if exist
+
Index: /plugins/sktheme/1_9_2/exec/sktheme_config.php
===================================================================
--- /plugins/sktheme/1_9_2/exec/sktheme_config.php	(revision 5)
+++ /plugins/sktheme/1_9_2/exec/sktheme_config.php	(revision 5)
@@ -0,0 +1,161 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');
+include_spip('inc/sktheme_util');
+
+function exec_sktheme_config() {
+  
+  global $sktheme_action;
+  global $squelettes_public_dir;
+  global $habillages_public_dir;
+  global $habillage_switcher_style;
+  global $theme_switcher_style;
+  global $switcher_activated;
+  global $switcher_admin_only;
+  
+  debut_page(_T('sktheme:title_config'),'configuration','sktheme_config');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:main_config_title'));
+  echo "<small><a href='?exec=sktheme_public_choice'>Habillages</a> | <a href='?exec=sktheme_doc'>Documentation</a></small><br />";
+  
+  // Include 'onglets'
+  sktheme_config_onglets();
+  
+  debut_gauche();
+  
+  // Include Doc box
+  sktheme_config_doc_box();
+  
+  debut_droite();
+  
+  //
+  // PUBLIC THEMES DIRECTORIES CONFIG
+  //
+  debut_cadre_trait_couleur('', false, "sktheme_config", _T('sktheme:public_themes_config'));
+  
+  // if submit : then save values
+  if ($sktheme_action=="set_dir") {
+    ecrire_meta('sktheme_squelettes_public_dir',$squelettes_public_dir);
+    ecrire_meta('sktheme_habillages_public_dir',$habillages_public_dir);
+    ecrire_metas();
+  }
+  
+  // Set directories
+  echo '<form action="'.generer_url_ecrire("sktheme_config", "sktheme_action=set_dir").'" method="post">';
+  
+  // Set squelettes_public_dir
+  debut_cadre('gris_clair');
+  echo '<strong>'._T('sktheme:squelettes_public_dir').' : </strong><input type="text" name="squelettes_public_dir" size="25" value="'.
+    $GLOBALS['meta']['sktheme_squelettes_public_dir'].'">';
+  fin_cadre('gris_clair');
+  
+  // Set habillages_public_dir
+  debut_cadre_couleur();
+  echo '<strong>'._T('sktheme:habillages_public_dir').' : </strong><input type="text" name="habillages_public_dir" size="25" value="'.
+    $GLOBALS['meta']['sktheme_habillages_public_dir'].'">';
+  fin_cadre_couleur(); 
+  
+  echo '<div><div style="text-align:right"><input type="submit" value="'._T('sktheme:save_public_directories').'" /></div></div>';
+  echo '</form>';
+ 
+  fin_cadre_trait_couleur();  
+  
+  //
+  // PRIVATE THEMES DIRECTORIES CONFIG
+  //
+  //   debut_cadre_trait_couleur('', false, "sktheme_config", _T('sktheme:private_themes_config'));
+  //   echo '<br />';
+  //   echo _T('sktheme:to_be_done');
+  //   echo '<br />';
+  //   fin_cadre_trait_couleur();  
+  //
+  // SWITCHER OPTIONS
+  //
+  // if submit : save switcher options
+  if ($sktheme_action=="set_switcher") {
+    ecrire_meta('sktheme_theme_switcher_style',$theme_switcher_style);
+    ecrire_meta('sktheme_habillage_switcher_style',$habillage_switcher_style);
+    ecrire_meta('sktheme_switcher_activated',$switcher_activated);
+    ecrire_meta('sktheme_switcher_admin_only',$switcher_admin_only);
+    ecrire_metas();
+  }
+  debut_cadre_trait_couleur('', false, "sktheme_config", _T('sktheme:themes_switcher'));
+  
+  echo '<form action="'.generer_url_ecrire("sktheme_config", "sktheme_action=set_switcher").'" method="post">';
+  
+  // Set sktheme_switcher_activated
+  debut_cadre('gris_clair');
+  echo '<strong>'._T('sktheme:switcher_activated').' : </strong>';
+  echo '<input type="radio" name="switcher_activated"  value="yes" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_activated']) AND ($GLOBALS['meta']['sktheme_switcher_activated']=="yes")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:yes');
+  echo '<input type="radio" name="switcher_activated" value="no" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_activated']) AND ($GLOBALS['meta']['sktheme_switcher_activated']=="no")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:no');
+  fin_cadre('gris_clair');
+  
+  // Set sktheme_switcher_admin_only
+  debut_cadre_couleur();
+  echo '<strong>'._T('sktheme:switcher_admin_only').' : </strong>';
+  echo '<input type="radio" name="switcher_admin_only"  value="yes" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_admin_only']) AND ($GLOBALS['meta']['sktheme_switcher_admin_only']=="yes")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:yes');
+  echo '<input type="radio" name="switcher_admin_only"  value="no" ';
+  if (isset($GLOBALS['meta']['sktheme_switcher_admin_only']) AND ($GLOBALS['meta']['sktheme_switcher_admin_only']=="no")) {
+    echo ' checked="checked" ';
+  }
+  echo ' />'._T('sktheme:no');
+  fin_cadre_couleur(); 
+  
+  // Set theme_switcher_style
+  debut_cadre('gris_clair');
+  echo '<strong>'._T('sktheme:theme_switcher_style').' : </strong>';
+  echo "<br />";
+  echo '<textarea  cols="50" rows="8" name="theme_switcher_style">';
+  echo $GLOBALS['meta']['sktheme_theme_switcher_style'].'</textarea>';  
+  fin_cadre('gris_clair');
+  
+  // Set habillage_switcher_style
+  debut_cadre_couleur();
+  echo '<strong>'._T('sktheme:habillage_switcher_style').' : </strong>';
+  echo "<br />";
+  echo '<textarea  cols="50" rows="8" name="habillage_switcher_style">';
+  echo $GLOBALS['meta']['sktheme_habillage_switcher_style'].'</textarea>';  
+  fin_cadre_couleur(); 
+  
+    
+  echo '<div><div style="text-align:right"><input type="submit" value="'._T('sktheme:save_switcher_options').'" /></div></div>';
+  echo '</form>';
+  
+  fin_cadre_trait_couleur();  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_2/exec/sktheme_doc.php
===================================================================
--- /plugins/sktheme/1_9_2/exec/sktheme_doc.php	(revision 5)
+++ /plugins/sktheme/1_9_2/exec/sktheme_doc.php	(revision 5)
@@ -0,0 +1,79 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');
+include_spip('inc/flock');
+include_spip('inc/sktheme_util');
+
+//
+// Private Area Page definition 
+//
+function exec_sktheme_doc() {
+
+  debut_page(_T('sktheme:extra_documentation'),'configuration','sktheme_public_choice');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:extra_documentation'));
+  echo "<small><a href='?exec=sktheme_public_choice'>Habillages</a> | <a href='?exec=sktheme_config'>Configuration</a></small><br />";
+  
+  // Include 'onglets'
+  sktheme_doc_onglets();
+  
+  debut_gauche();
+
+  
+  debut_droite();
+  echo "<br />";
+  // debut_cadre_trait_couleur($icone='', $return = false, $fonction='', $titre=''){
+  debut_cadre_trait_couleur('', false, "sktheme_documentation", _T('sktheme:extra_documentation'));
+  
+  $doc = _DIR_PLUGIN_SKTHEME."/DOCUMENTATION.txt";
+  if (is_file($doc)) {
+    lire_fichier ($doc,$contenu);
+    $contenu = str_replace("<", "&lt;", $contenu);
+    $contenu = str_replace(">", "&gt;", $contenu);
+    $contenu = str_replace(" ", "&nbsp;", $contenu);
+    $contenu = str_replace("//", "<br />", $contenu);
+    echo $contenu;
+  } else {
+    echo _T('sktheme:to_be_done');
+  }
+  fin_cadre_trait_couleur();
+  debut_cadre_trait_couleur('', false, "sktheme_documentation", _T('sktheme:to_be_done'));
+  $todo = _DIR_PLUGIN_SKTHEME."/TODO.txt";
+  if (is_file($todo)) {
+    lire_fichier ($todo,$contenu);
+    $list = split('\/\/',$contenu);
+    foreach ($list as $lign) {
+      echo "$lign<br />";
+    }
+    echo "<br />";
+  } else {
+    echo _T('sktheme:to_be_done');
+  }
+   
+  fin_cadre_trait_couleur();
+  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_2/exec/sktheme_private_choice.php
===================================================================
--- /plugins/sktheme/1_9_2/exec/sktheme_private_choice.php	(revision 5)
+++ /plugins/sktheme/1_9_2/exec/sktheme_private_choice.php	(revision 5)
@@ -0,0 +1,67 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');
+include_spip('inc/sktheme_util');
+
+//
+// Private Area Page definition 
+//
+function exec_sktheme_private_choice() {
+
+  debut_page(_T('sktheme:private_theme_choice'),'configuration','sktheme_public_choice');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:private_theme_choice'));
+  
+  // Include 'onglets'
+  sktheme_private_choice_onglets();
+  
+  debut_gauche();
+  // Include 'raccourcis'
+  sktheme_raccourcis();
+
+  
+  debut_droite();
+  echo "<br />";
+  // debut_cadre_trait_couleur($icone='', $return = false, $fonction='', $titre=''){
+  debut_cadre_trait_couleur('', false, "sktheme_private_squelette_list", _T('sktheme:available_squelette_list'));
+  
+  echo '<br />';
+  echo _T('sktheme:to_be_done');
+  echo '<br />';
+   
+  fin_cadre_trait_couleur();
+  
+  debut_cadre_trait_couleur('', false, "sktheme_squelette_list", _T('sktheme:available_habillage_list'));
+
+  echo '<br />';
+  echo _T('sktheme:to_be_done');
+  echo '<br />';   
+  
+  fin_cadre_trait_couleur();
+ 
+  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_2/exec/sktheme_public_choice.php
===================================================================
--- /plugins/sktheme/1_9_2/exec/sktheme_public_choice.php	(revision 5)
+++ /plugins/sktheme/1_9_2/exec/sktheme_public_choice.php	(revision 5)
@@ -0,0 +1,260 @@
+<?php
+
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+include_spip('inc/presentation');   // for spip presentation functions
+include_spip('inc/layer');          // for spip layer functions
+include_spip('inc/utils');          // for _request function
+include_spip('inc/plugin');         // xml function
+include_spip('inc/sktheme_util');   // for sktheme_* functions
+include_spip('inc/sktheme_xml');    // for sktheme_* functions
+
+
+//
+// Public page choice definition
+//
+function exec_sktheme_public_choice() {
+
+  global $squelette_public_name; // parameter
+  global $habillage_public_name; // parameter
+  
+  // Get the specific action to do if some
+  $sktheme_action = _request('sktheme_action');
+  $original = _T('sktheme:original');
+
+  debut_page(_T('sktheme:public_theme_choice'),'configuration','sktheme_public_choice');
+
+  echo "<br />";
+  gros_titre(_T('sktheme:public_theme_choice'));
+  echo "<small><a href='?exec=sktheme_config'>Configuration</a> | <a href='?exec=sktheme_doc'>Documentation</a></small><br />";
+
+  // Include 'onglets'
+  sktheme_public_choice_onglets();
+  
+  debut_gauche();
+
+  // download a squelette distribution
+//  debut_cadre_gris_clair();
+//  echo '<form action="' . generer_url_action("sktheme_install") .'" method="post">';
+//  echo       '<strong>'._T('sktheme:zip_squelette_url').' : </strong>';
+//  echo       '<input type="text" name="zip_url" size="25" value="http://">';
+//  echo       '<input type="hidden" name="zip_type" value="squelette" />';
+//  echo	     '<input type="submit" value="Download" />';
+//  echo	'</form>';
+//  fin_cadre_gris_clair();
+
+  // download a habillage distribution
+// debut_cadre_gris_clair();
+// echo '<form action="' . generer_url_action("sktheme_install") .'" method="post">';
+// echo       '<strong>'._T('sktheme:zip_habillage_url').' : </strong>';
+// echo       '<input type="text" name="zip_url" size="25" value="http://">';
+// echo       '<input type="hidden" name="zip_type" value="habillage" />';
+// echo	     '<input type="submit" value="Download" />';
+// echo	'</form>';
+// fin_cadre_gris_clair();
+
+  // Include 'raccourcis'
+  sktheme_public_theme_doc_box();
+  
+  debut_droite();
+  
+  //
+  // Choose Squelette
+  $s_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_squelettes_public_dir'];
+  debut_cadre_trait_couleur('', false, "sktheme_public_squelette_list",
+			    _T('sktheme:available_squelette_list')." : ".$GLOBALS['meta']['sktheme_squelettes_public_dir']);
+  
+  $squelettes_list = array('dist' => '' );
+  if (is_dir($s_dir)) {
+    if ($dh = opendir($s_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($s_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is squelettes
+	  if (is_file($s_dir."/".$dir."/theme.xml")) {
+	    $s_info = sktheme_xml_get_infos($s_dir."/".$dir,"theme");
+	    $type = (isset($s_info['type'])) ? propre($s_info['type']) : "";
+	    if ($type == 'squelettes') {
+	      $squelettes_list[$dir]=$s_dir."/".$dir;
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    }
+  } else {
+      echo _T('sktheme:no_available_squelette');
+  }
+  
+  // Save if needed
+  if ($sktheme_action=="set_squelette") {
+    echo _T('sktheme:update_squelette_to') . $squelette_public_name. "<br />";
+    ecrire_meta('sktheme_squelette_public_name',$squelette_public_name);
+    // Set habillage to the original one when squelette is changed
+    ecrire_meta('sktheme_habillage_public_name',$original);
+    ecrire_metas();
+  } else {
+    $squelette_public_name = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  }
+  	
+  echo '<br />';
+  echo '<form action="'.generer_url_ecrire("sktheme_public_choice", "sktheme_action=set_squelette").'" method="post">';
+  foreach( $squelettes_list as $key => $value) {
+    $s_info = sktheme_xml_get_infos($value,"theme");
+    echo debut_cadre('gris_clair');
+    echo $s_info['extra_img_puce'];
+    if ($squelette_public_name==$key) {
+      echo '<input type="radio" name="squelette_public_name" value="'.$key.'" checked="checked" />';
+      $o_info = $s_info;
+    } else {
+      echo '<input type="radio" name="squelette_public_name" value="'.$key.'" />';
+    }
+    echo bouton_block_invisible("$key");
+    echo "<strong>$key</strong>";
+    echo debut_block_invisible("$key");
+    echo _T('version') .' '.  $s_info['version'] . " | <strong>".$s_info['extra_titre_etat']."</strong><br />";
+    if (isset($s_info['description']))
+      echo "<hr />" . propre($s_info['description']) . "<br />";
+    if (isset($s_info['auteur']))
+      echo "<hr />" . _T('auteur') .' '. propre($s_info['auteur']) . "<br />";
+    if (isset($s_info['lien']))
+      echo "<hr />" . _T('info_url') .' '. propre($s_info['lien']) . "<br />";
+    echo fin_block();
+    echo fin_cadre('gris_clair');
+  }
+  echo '<br />';
+  echo '<div><div style="text-align:right"><input type="submit" value="'._T('sktheme:save_squelette').'"></div></div>';
+  echo '</form>';
+  
+  
+  fin_cadre_trait_couleur();
+  
+  //
+  // Choose Habillage
+  $h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
+  debut_cadre_trait_couleur('', false, "sktheme_public_habillage_list", 
+			    _T('sktheme:available_habillage_list')." : ".$GLOBALS['meta']['sktheme_habillages_public_dir']);
+  
+  
+  $habillages_list = array($original => '');
+  if (is_dir($h_dir)) {
+    if ($dh = opendir($h_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($h_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is themes
+	  if (is_file($h_dir."/".$dir."/theme.xml")) {
+	    $h_info = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
+	    $type = (isset($h_info['type'])) ? propre($h_info['type']) : "";
+	    if ($type == 'themes') {
+	      $habillages_list[$dir]=$h_dir."/".$dir;
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    } 
+  } else {
+    echo _T('sktheme:no_available_habillage');
+  }
+  
+  // Save habillage if needed
+  if ($sktheme_action=="set_habillage") {
+    echo _T('sktheme:update_habillage_to') . $habillage_public_name . "<br />";
+    ecrire_meta('sktheme_habillage_public_name',$habillage_public_name);
+    ecrire_metas();
+  } else {
+    $habillage_public_name = $GLOBALS['meta']['sktheme_habillage_public_name'];
+  }
+    
+  echo '<br />';
+  echo '<form action="'.generer_url_ecrire("sktheme_public_choice", "sktheme_action=set_habillage").'" method="post">';
+  foreach( $habillages_list as $key => $value) {
+    $h_info = sktheme_xml_get_infos($value,"theme");
+
+    // Check if habillage is available for this squelette selection
+    // probably better way to do it in php (such grep perl function ? but its
+    // works anyway)
+    $squelette_ok = false;
+    if (is_array($h_info['squelettes'])) {
+      foreach ($h_info['squelettes'] as $sq){
+	$sq = trim($sq);
+	if ($sq == $squelette_public_name) {
+	  $squelette_ok = true;
+	}
+      }
+    } else {
+      if ($h_info['squelettes'] == $squelette_public_name) {
+	$squelette_ok = true;
+      }
+    }
+    
+    if (($key == $original)||($squelette_ok)) {
+      echo debut_cadre('gris_clair');
+      if ($key == $original) {
+	echo $o_info['extra_img_puce'];
+      } else {
+	echo $h_info['extra_img_puce'];
+      }
+      if ($habillage_public_name==$key) {
+	echo '<input type=radio  name="habillage_public_name" value="'.$key.'" checked="checked" />';
+      } else {
+	echo '<input type=radio  name="habillage_public_name" value="'.$key.'" />';
+      }
+      echo bouton_block_invisible("$key");
+      if ($key == $original) {
+	echo "<strong><i>$key (".$o_info['nom'].")</i></strong>";
+	echo debut_block_invisible("$key");
+	echo _T('version') .' '.  $o_info['version'] . " | <strong>".$o_info['extra_titre_etat']."</strong><br />";
+	if (isset($o_info['description']))
+	  echo "<hr />" . propre($o_info['description']) . "<br />";
+	if (isset($o_info['auteur']))
+	  echo "<hr />" . _T('auteur') .' '. propre($o_info['auteur']) . "<br />";
+	if (isset($o_info['lien']))
+	  echo "<hr />" . _T('info_url') .' '. propre($o_info['lien']) . "<br />";
+
+      } else {
+	echo "<strong>$key</strong>";
+	echo debut_block_invisible("$key");
+	echo _T('version') .' '.  $h_info['version'] . " | <strong>".$h_info['extra_titre_etat']."</strong><br />";
+	if (isset($h_info['description']))
+	  echo "<hr />" . propre($h_info['description']) . "<br />";
+	if (isset($h_info['auteur']))
+	  echo "<hr />" . _T('auteur') .' '. propre($h_info['auteur']) . "<br />";
+	if (isset($h_info['lien']))
+	  echo "<hr />" . _T('info_url') .' '. propre($h_info['lien']) . "<br />";
+      }
+      echo fin_block();
+      echo fin_cadre('gris_clair');
+    }
+  }
+    
+  echo '<br />';
+  echo '<div><div align="right"><input type="submit" value="'._t('sktheme:save_habillage').'"></div></div>';
+  echo '</form>';
+  
+  fin_cadre_trait_couleur();
+  
+  
+  
+  
+  fin_page();
+
+}
+
+
+?>
Index: /plugins/sktheme/1_9_2/inc/sktheme_balises.php
===================================================================
--- /plugins/sktheme/1_9_2/inc/sktheme_balises.php	(revision 5)
+++ /plugins/sktheme/1_9_2/inc/sktheme_balises.php	(revision 5)
@@ -0,0 +1,51 @@
+<?php
+
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+
+include_spip('inc/sktheme_list');
+
+// @param p est un objet SPIP
+function balise_SKTHEME_THEMES_SWITCHER ($p) {
+  $sktheme_list = sktheme_list();
+  $code.='<form action="" method="post">';
+  $code.='<select name="selecteurTheme" style="'.$GLOBALS['meta']['sktheme_theme_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">';
+  $code.='<option selected="selected" value="">'._T('themes').'</option>';
+  foreach( $sktheme_list as $value )	$code.='<option value="'.parametre_url(self(),'var_sktheme',$value).'">&nbsp;-> '.$value.'</option>';
+  $code.='</select>';
+  $code.='</form>';  
+  
+  $p->code = "'$code'";
+  return ($p);
+}
+
+// @param p est un objet SPIP
+function balise_SKTHEME_HABILLAGES_SWITCHER ($p) {
+  $sktheme_habillage_list = sktheme_habillage_list();
+  $code.='<form action="" method="post">';
+  $code.='<select name="selecteurHabillage" style="'.$GLOBALS['meta']['sktheme_habillage_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">';
+  $code.='<option selected="selected" value="">'._T('habillages').'</option>';
+  foreach( $sktheme_habillage_list as $value )	{
+    $code.='<option value="'.parametre_url(self(),'var_sktheme',"__current::".$value).'">&nbsp;-> '.$value.'</option>';
+  }
+  $code.='</select>';
+  $code.='</form>';  
+  $p->code = "'$code'";
+  return ($p);
+}
+
+?>
Index: /plugins/sktheme/1_9_2/inc/sktheme_list.php
===================================================================
--- /plugins/sktheme/1_9_2/inc/sktheme_list.php	(revision 5)
+++ /plugins/sktheme/1_9_2/inc/sktheme_list.php	(revision 5)
@@ -0,0 +1,159 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+  
+  // Create theme list
+function sktheme_list() {
+    
+  include_spip('inc/sktheme_xml');
+
+  $original = _T('sktheme:original');
+  $sktheme_list = array();
+  
+  $s_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_squelettes_public_dir'];
+  $squelettes_list = array('dist' => '' );
+  if (is_dir($s_dir)) {
+    if ($dh = opendir($s_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($s_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is squelettes
+	  if (is_file($s_dir."/".$dir."/theme.xml")) {
+	    $s_info = sktheme_xml_get_infos($s_dir."/".$dir,"theme");
+	    $type = (isset($s_info['type'])) ? propre($s_info['type']) : "";
+	    if ($type == 'squelettes') {
+	      $squelettes_list[$dir]=$s_dir."/".$dir;
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    }
+  } else {
+    // no extra directory for squelette
+    array_push($sktheme_list,"dist::".$original);
+    return $sktheme_list;
+  }
+
+  $h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
+  $habillages_list = array($original => '');
+  if (is_dir($h_dir)) {
+    if ($dh = opendir($h_dir)) {
+      while (($dir = readdir($dh)) !== false) {
+	if ( (is_dir($h_dir."/".$dir)) AND ($dir[0]!=".") ) {
+	  // Check if a theme.xml exists and if the type is themes
+	  if (is_file($h_dir."/".$dir."/theme.xml")) {
+	    $h_info = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
+	    $type = (isset($h_info['type'])) ? propre($h_info['type']) : "";
+	    if ($type == 'themes') {
+	      $habillages_list[$dir] = sktheme_xml_get_infos($h_dir."/".$dir,"theme");
+	    }
+	  }
+	}
+      }
+      closedir($dh);
+    } 
+  } else {
+    // no habillage directory
+    foreach( $squelettes_list as $s_key => $s_value) {
+      array_push($sktheme_list,$s_key."::".$original);
+      return $sktheme_list;
+    }
+  }
+
+  // Look for matching theme
+  foreach( $squelettes_list as $s_key => $s_value) {
+    
+    foreach( $habillages_list as $h_key => $h_info) {
+      if ($h_key == $original) {
+	array_push($sktheme_list,$s_key."::".$h_key);
+      } else {
+	$squelette_ok = false;
+	if (is_array($h_info['squelettes'])) {
+	  foreach ($h_info['squelettes'] as $sq){
+	    $sq = trim($sq);
+	    if ($sq == $s_key) {
+	      $squelette_ok = true;
+	    }
+	  }
+	} else {
+	  if ($h_info['squelettes'] == $s_key) {
+	    $squelette_ok = true;
+	  }
+	}
+	if ($squelette_ok) {
+	  array_push($sktheme_list,$s_key."::".$h_key);
+	}
+      }
+    }
+  }
+  return $sktheme_list;
+}
+
+
+
+function sktheme_habillage_list() {
+    
+  include_spip('inc/sktheme_xml');
+
+  $original = _T('sktheme:original');
+  $sktheme_habillage_list = array();
+  
+  $squelette_name = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  
+  $h_dir = _DIR_RACINE.$GLOBALS['meta']['sktheme_habillages_public_dir'];
+  $habillages_list = array($original => '');
+  if (is_dir($h_dir)) {
+    if ($dh = opendir($h_dir)) {
+      while (($file = readdir($dh)) !== false) {
+	if ( (is_dir($h_dir."/".$file)) AND ($file[0]!=".") ) {
+	  $habillages_list[$file] = sktheme_xml_get_infos($h_dir."/".$file,"theme");
+	}
+      }
+      closedir($dh);
+    } 
+  } else {
+    // no habillage directory
+    array_push($sktheme_habillage_list,$original);
+    return $sktheme_habillage_list;
+  }
+
+  // Look for matching theme
+    
+  foreach( $habillages_list as $h_key => $h_info) {
+    if ($h_key == $original) {
+      array_push($sktheme_habillage_list,$h_key);
+    } else {
+      $squelette_ok = false;
+      if (is_array($h_info['squelettes'])) {
+	foreach ($h_info['squelettes'] as $sq){
+	  $sq = trim($sq);
+	  if ($sq == $squelette_name) {
+	    $squelette_ok = true;
+	  }
+	}
+      } else {
+	if ($h_info['squelettes'] == $squelette_name) {
+	  $squelette_ok = true;
+	}
+      }
+      if ($squelette_ok) {
+	array_push($sktheme_habillage_list,$h_key);
+      }
+    }
+  }
+  return $sktheme_habillage_list;
+}
+?>
Index: /plugins/sktheme/1_9_2/inc/sktheme_util.php
===================================================================
--- /plugins/sktheme/1_9_2/inc/sktheme_util.php	(revision 5)
+++ /plugins/sktheme/1_9_2/inc/sktheme_util.php	(revision 5)
@@ -0,0 +1,99 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+include_spip('inc/presentation');
+
+// Build 'onglets' for all pages
+function sktheme_public_choice_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_public_choice", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_public_choice", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_public_choice", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_public_choice", "sktheme_doc", "");
+   fin_onglet();
+
+}
+function sktheme_private_choice_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_private_choice", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_private_choice", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_private_choice", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_private_choice", "sktheme_doc", "");
+  fin_onglet();
+
+}
+function sktheme_config_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_config", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_config", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_config", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_config", "sktheme_doc", "");
+  fin_onglet();
+
+}
+function sktheme_doc_onglets() {
+
+  debut_onglet();
+  // onglet($texte, $lien, $onglet_ref, $onglet, $icone="")
+  onglet(_T('sktheme:public_choice'),  "?exec=sktheme_public_choice",  "sktheme_doc", "sktheme_public_choice", "");
+  //onglet(_T('sktheme:private_choice'), "?exec=sktheme_private_choice", "sktheme_config", "sktheme_private_choice", "");
+  onglet(_T('sktheme:configuration'),  "?exec=sktheme_config",         "sktheme_doc", "sktheme_config", "");
+  onglet(_T('sktheme:documentation'),  "?exec=sktheme_doc",            "sktheme_doc", "sktheme_doc", "");
+  fin_onglet();
+
+}
+
+// Build 'raccourcis' for all pages
+function sktheme_raccourcis() {
+
+  debut_raccourcis();
+  
+  
+  fin_raccourcis();
+
+}
+
+// Build documentation
+function sktheme_config_doc_box() {
+  
+  debut_cadre_relief();
+  echo _T('sktheme:config_doc_directories');
+  fin_cadre_relief();
+  debut_cadre_relief();
+  echo _T('sktheme:config_doc_switcher');
+  fin_cadre_relief();
+  
+}
+
+// Build documentation
+function  sktheme_public_theme_doc_box() {
+  debut_cadre_relief();
+  echo _T('sktheme:public_theme_doc_squelette');
+  fin_cadre_relief();
+  debut_cadre_relief();
+  echo _T('sktheme:public_theme_doc_habillage');
+  fin_cadre_relief();
+ 
+}
+
+?>
Index: /plugins/sktheme/1_9_2/inc/sktheme_xml.php
===================================================================
--- /plugins/sktheme/1_9_2/inc/sktheme_xml.php	(revision 5)
+++ /plugins/sktheme/1_9_2/inc/sktheme_xml.php	(revision 5)
@@ -0,0 +1,173 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+if (!defined("_ECRIRE_INC_VERSION")) return;
+
+function sktheme_xml_get_infos($xml_dir,$xml_type){
+
+  include_spip('inc/plugin'); 
+
+  $ret = array();
+  if ((@file_exists($xml_dir))&&(is_dir($xml_dir))){
+    if (@file_exists($xml_dir."/$xml_type.xml")) {
+      lire_fichier($xml_dir."/$xml_type.xml", $texte);
+      $arbre = parse_plugin_xml($texte);
+      if (!isset($arbre[$xml_type])&&is_array($arbre[$xml_type]))
+	$arbre = array('erreur' => array(_T('erreur_plugin_fichier_def_incorrect')." : $xml_dir/$xml_type.xml"));
+    }
+    else {
+      // pour arriver ici on l'a vraiment cherche...
+      //debug echo "error: erreur_plugin_fichier_def_absent $xml_dir/$xml_type.xml<br>";
+      $arbre = array('erreur' => array(_T('erreur_plugin_fichier_def_absent')." : $xml_dir/$xml_type.xml"));
+    }
+
+    sktheme_xml_verifie_conformite($xml_dir,$xml_type,$arbre);
+		
+    $ret['nom'] = applatit_arbre($arbre['nom']);
+    $ret['version'] = trim(end($arbre['version']));
+    if (isset($arbre['auteur']))
+      $ret['auteur'] = applatit_arbre($arbre['auteur']);
+    if (isset($arbre['description']))
+      $ret['description'] = applatit_arbre($arbre['description']);
+    if (isset($arbre['lien']))
+      $ret['lien'] = join(' ',$arbre['lien']);
+    if (isset($arbre['etat']))
+      $ret['etat'] = trim(end($arbre['etat']));
+    if (isset($arbre['options']))
+      $ret['options'] = $arbre['options'];
+    if (isset($arbre['fonctions']))
+      $ret['fonctions'] = $arbre['fonctions'];
+    $ret['prefix'] = $arbre['prefix'];
+    if (isset($arbre['pipeline']))
+      $ret['pipeline'] = $arbre['pipeline'];
+    if (isset($arbre['erreur']))
+      $ret['erreur'] = $arbre['erreur'];
+    if (isset($arbre['squelettes'])) {
+      $ret['squelettes'] = $arbre['squelettes'];
+    }
+    if (isset($arbre['type'])) {
+      $ret['type'] =  trim(applatit_arbre($arbre['type']));
+    }
+
+    // Compute extra values
+    $etat = 'dev';
+    if (isset($ret['etat']))
+      $etat = $ret['etat'];
+    switch ($etat) {
+    case 'experimental':
+      $puce = 'puce-rouge.gif';
+      $titre_etat = _T('plugin_etat_experimental');
+      break;
+    case 'test':
+      $puce = 'puce-orange.gif';
+      $titre_etat = _T('plugin_etat_test');
+      break;
+    case 'stable':
+      $puce = 'puce-verte.gif';
+      $titre_etat = _T('plugin_etat_stable');
+      break;
+    default:
+      $puce = 'puce-poubelle.gif';
+      $titre_etat = _T('plugin_etat_developpement');
+      break;
+    }
+    $ret['extra_puce']       = $puce;
+    $ret['extra_img_puce']   = "<img src='"._DIR_IMG_PACK."$puce' width='9' height='9' style='border:0;' alt=\"$titre_etat\" title=\"$titre_etat\" />&nbsp;";
+    $ret['extra_titre_etat'] = $titre_etat;
+  }
+  return $ret;
+}
+
+function sktheme_xml_verifie_conformite($xml_dir,$xml_type="plugin",&$arbre){
+	$silence = false;
+	if (isset($arbre[$xml_type])&&is_array($arbre[$xml_type]))
+		$arbre = end($arbre[$xml_type]); // derniere def xml_type
+	else{
+		$arbre = array('erreur' => array(_T('erreur_plugin_tag_plugin_absent')." : $xml_dir/plugin.xml"));
+		$silence = true;
+	}
+  // verification de la conformite du plugin avec quelques
+  // precautions elementaires
+  if (!isset($arbre['nom'])){
+  	if (!$silence)
+			$arbre['erreur'][] = _T('erreur_plugin_nom_manquant');
+		$arbre['nom'] = array("");
+	}
+  if (!isset($arbre['version'])){
+  	if (!$silence)
+			$arbre['erreur'][] = _T('erreur_plugin_version_manquant');
+		$arbre['version'] = array("");
+	}
+  if (!isset($arbre['prefix'])){
+  	if (!$silence)
+			$arbre['erreur'][] = _T('erreur_plugin_prefix_manquant');
+		$arbre['prefix'] = array("");
+	}
+	else{
+		$prefix = "";
+		$prefix = trim(end($arbre['prefix']));
+		if (isset($arbre['etat'])){
+			$etat = trim(end($arbre['etat']));
+			if (!preg_match(',^(dev|experimental|test|stable)$,',$etat))
+				$arbre['erreur'][] = _T('erreur_plugin_etat_inconnu')." : $etat";
+		}
+		if (isset($arbre['options'])){
+			foreach($arbre['options'] as $optfile){
+				$optfile = trim($optfile);
+				if (!@is_readable(_DIR_PLUGINS."$xml_dir/$optfile"))
+  				if (!$silence)
+						$arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile";
+			}
+		}
+		if (isset($arbre['fonctions'])){
+			foreach($arbre['fonctions'] as $optfile){
+				$optfile = trim($optfile);
+				if (!@is_readable(_DIR_PLUGINS."$xml_dir/$optfile"))
+  				if (!$silence)
+						$arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile";
+			}
+		}
+		$fonctions = array();
+		if (isset($arbre['fonctions']))
+			$fonctions = $arbres['fonctions'];
+	  $liste_methodes_reservees = array('__construct','__destruct','plugin','install','uninstall',strtolower($prefix));
+		if (is_array($arbre['pipeline'])){
+			foreach($arbre['pipeline'] as $pipe){
+				$nom = trim(end($pipe['nom']));
+				if (isset($pipe['action']))
+					$action = trim(end($pipe['action']));
+				else
+					$action = $nom;
+				// verif que la methode a un nom autorise
+				if (in_array(strtolower($action),$liste_methodes_reservees)){
+					if (!$silence)
+						$arbre['erreur'][] = _T("erreur_plugin_nom_fonction_interdit")." : $action";
+				}
+				else{
+					// verif que le fichier de def est bien present
+					if (isset($pipe['inclure'])){
+						$inclure = _DIR_PLUGINS."$xml_dir/".end($pipe['inclure']);
+						if (!@is_readable($inclure))
+		  				if (!$silence)
+								$arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $inclure";
+					}
+				}
+			}
+		}
+	}
+}
+
+?>
Index: /plugins/sktheme/1_9_2/lang/sktheme_en.php
===================================================================
--- /plugins/sktheme/1_9_2/lang/sktheme_en.php	(revision 5)
+++ /plugins/sktheme/1_9_2/lang/sktheme_en.php	(revision 5)
@@ -0,0 +1,138 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$GLOBALS[$GLOBALS['idx_lang']] = 
+    array(
+	  // A
+	  "available_habillage_list" => "Available habillages",
+	  "available_squelette_list" => "Available squelettes",
+	  
+	  // B
+
+	  // C
+	  "configuration" => "Advanced configuration",
+	  "config_doc_directories" => "<b>R&eacute;pertoires</b>:<br>
+	  It is possible to re-defined default directories locations of yours
+	  <i>squelettes/habillages</i> distributions.Default is  the <i>'themes'</i>
+	   directory, directories are always relatives to
+	  your SPIP root site.
+	  ",
+	  "config_doc_switcher" => "<b>Switcher</b>:<br>
+	  The theme switcher can be activated to include a selection list in the
+	  public area, and then easily test themes. It is possible to limit this
+	  functionnality to the administrator only.<br>
+	  Moreover you can modify the style of this theme selector.<br>
+	  <br>
+	  A new 'balise' <b>#SKTHEME_HABILLAGES_SWITCHER</b> is available to
+	  include an 'habillage' selector list in your squelette. This list is
+	  composed of all available 'habillage' corresponding to the squelette
+	  distribution you have choosen. You can as well modify this
+	  list selector style here.
+	  
+	  
+	  ",
+	  
+	  // D
+	  "documentation" => "Documentation",
+	  "extra_documentation" => "Extra Documentation",
+
+	  // E
+
+	  // F
+
+	  // G
+
+	  // H
+	  "habillages_public_dir" => "Public habillages directory",
+
+	  // I
+
+	  // J
+
+	  // K
+
+	  // L
+
+	  // M
+	  "main_config_title" => "Configuration",
+	  "manage_theme" => "Manage themes",
+
+	  // N
+	  "no" => "No",
+	  "no_available_habillage" => "No available habillage",
+	  "no_available_squelette" => "No available squelette",
+
+	  // O
+	  "original" => "Original",
+
+	  // P
+	  "private_choice" => "Private theme choice",
+	  "private_themes_config" => "Private themes configuration",
+	  "private_theme_choice" => "Private theme choice",
+	  "public_choice" => "Public theme choice",
+	  "public_theme_choice" => "Public theme choice",
+	  "public_themes_config" => "Public themes configuration",
+	  "public_theme_doc_squelette" => "<b>Squelette choice:</b><br>
+	  Each time you will choose a 'squelette' (more exactly a squelettes distribution)
+	  the 'habillage' list will be updated with the available ones.
+	  The small square represent the state of the distribution, stable,
+	  test, experimental, ...<br>
+	  Clic on the small black triangle to get more details about the distribution.
+	  ",
+	  "public_theme_doc_habillage" => "<b>Habillage choice:</b><br>
+	  An Habillage is modifing colors and graphical aspect of your squelettes.
+	  It is composed of CSS, pictures, ...<br>
+	  A squelette distribution always contain a default 'habillage' which is
+	  called <b>Original</b>.  
+	  ",
+	  
+	  // Q
+
+	  // R
+
+	  // S
+	  "save_habillage" => "Save habillage",
+	  "save_public_directories" => "Save directories",
+	  "save_squelette" => "Save squelette",
+	  "save_switcher_options" => "Save switcher options",
+	  "squelettes_public_dir" => "Public squelettes directory",
+	  "switcher_activated" => "Theme switcher activated",
+	  "switcher_admin_only" => "Only for administrators",
+	  "switcher_style" => "Switcher style",
+
+	  // T
+	  "to_be_done" => "To be done !",
+	  "themes_switcher" => "Theme switch",
+
+	  // U
+	  "update_habillage_to" => "Update habillage to : ",
+	  "update_squelette_to" => "Update squelette to : ",
+
+	  // V
+
+	  // W
+
+	  // X
+
+	  // Y
+	  "yes" => "Yes",
+
+	  // Z
+
+);
+
+?>
Index: /plugins/sktheme/1_9_2/lang/sktheme_es.php
===================================================================
--- /plugins/sktheme/1_9_2/lang/sktheme_es.php	(revision 5)
+++ /plugins/sktheme/1_9_2/lang/sktheme_es.php	(revision 5)
@@ -0,0 +1,131 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$GLOBALS[$GLOBALS['idx_lang']] = 
+    array(
+	  // A
+	  "available_habillage_list" => "Lista de pieles disponibles",
+	  "available_squelette_list" => "Lista de esqueletos disponibles",
+	  
+	  // B
+
+	  // C
+	  "configuration" => "Configuraci&oacute;n avanzada",
+	  "config_doc_directories" => "<b>Carpetas</b>:<br /> 
+	  Es posible redefinir las carpetas de almacenaje de tus <i>'esqueletos'</i> 
+	  y de tus <i>'pieles'</i>, por omisi&oacute;n est&aacute;n en la carpeta 
+	  <i>'themes'</i>. Estas carpetas siempre son relativas a la ra&iacute;z detu sitio SPIP.
+	  ",
+	  "config_doc_switcher" => "<b>Alternador</b>:<br />
+	  Le 'alternador' (o 'switcher' de temas permite hacer aparecer una lista de selecci&oacute;n
+	  de temas en el espacio p&uacute;blico y as&iacute; probar los diferentes temas m&aacute;s 
+	  r&aacute;pidamente. Es posible limitar esta posibilidad s&oacute;lo a los administradores.<br />
+	  Adicionalmente, puedes cambiar aqu&iacute; el estilo de tiuselector de temas. 
+	  <br />
+	  <br />
+	  TambiÃ©n existe una baliza<br /> <b><small>#SKTHEME_HABILLAGES_SWITCHER</small></b><br />
+	  que es posible integrar a los esqueletos para disponer, esta vez, de un selector que corresponda a 
+      tu elecci&oacute;n de esqueletos. Igualmente, se puede modificar el estilo de este selector.
+	  ",
+	  // D
+	  "documentation" => "Documentaci&oacute;n",
+	  "extra_documentation" => "Documentaci&oacute;n extra",
+
+	  // E
+
+	  // F
+
+	  // G
+
+	  // H
+	  "habillages_public_dir" => "Carpetas para las pieles p&uacute;blicas",
+
+	  // I
+
+	  // J
+
+	  // K
+
+	  // L
+
+	  // M
+	  "main_config_title" => "Configuraci&oacute;n",
+	  "manage_theme" => "Gesti&oacute;n des temas",
+
+	  // N
+	  "no" => "No",
+	  "no_available_habillage" => "Ninguna piel disponible",
+	  "no_available_squelette" => "Aucun squelette disponible",
+
+	  // O
+	  "original" => "Original",
+
+	  // P
+	  "private_choice" => "Elecci&oacute;n tema privado",
+	  "private_themes_config" => "Configuraci&oacute;n para los temas privados",
+	  "private_theme_choice" => "Elecci&oacute;n del tema del espacio privado",
+	  "public_choice" => "Elecci&oacute;n tema p&uacute;blico",
+	  "public_theme_choice" => "Elecci&oacute;n del tema del espacio p&uacute;blico",
+	  "public_themes_config" => "Configuraci&oacute;n para los temas p&uacute;blicos",
+	  "public_theme_doc_squelette" => "<b>Elecci&oacute;n del esqueleto:</b><br />
+	  Cada vez que seleccionar&aacute;s un esqueleto (m&aacute;s exactamente una distribuci&oacute;n de 
+	  esqueletos) la lista de ropas disponibles se actualiza. El cuadradito indica el estado de la
+	  distribuci&oacute;n de esqueletos: estable, test, experimental ...<br />
+	  Para mayores detalles acerca de una distribuci&oacute;n pincha en la flecha negra.
+	  ",
+	  "public_theme_doc_habillage" => "<b>Elecci&oacute;n de la piel:</b><br />
+	  Las 'pieles' permiten modificar los colores y el aspecto gr&aacute;fico de una distribuci&oacute;n 
+	  de esqueletos. Se trata de CSS y/o de im&aacute;genes, ect. <br /> 
+	  Una distribuci&oacute;n de esqueletos siempre contiene una presentaci&oacute;n gr&aacute;fica
+      por omisi&oacute;n, que corresponde a la piel denominada <b>Original</b>.
+	  ",
+	  // Q
+
+	  // R
+
+	  // S
+	  "save_habillage" => "Guardar la piel",
+	  "save_public_directories" => "Guardar las carpetas ",
+	  "save_squelette" => "Guardar es esqueleto",
+	  "save_switcher_options" => "Guardar las opciones del alternador",
+	  "squelettes_public_dir" => "Carpetas para los esqueletos p&uacute;blicos",
+	  "switcher_activated" => "Activar el alternador de temas",
+	  "switcher_admin_only" => "S&oacute;lo para los administratdores",
+	  "switcher_style" => "Style du switcher",
+
+	  // T
+	  "to_be_done" => "&iexcl;a&uacute;n por hacer!",
+	  "themes_switcher" => "Alternador de temas",
+
+	  // U
+	  "update_habillage_to" => "Actualizaci&oacute;n de la piel por: ",
+	  "update_squelette_to" => "Actualizaci&oacute;n del esqueleto por: ",
+
+	  // V
+
+	  // W
+
+	  // X
+
+	  // Y
+	  "yes" => "S&iacute;",
+
+	  // Z
+
+);
+
+?>
Index: /plugins/sktheme/1_9_2/lang/sktheme_fr.php
===================================================================
--- /plugins/sktheme/1_9_2/lang/sktheme_fr.php	(revision 5)
+++ /plugins/sktheme/1_9_2/lang/sktheme_fr.php	(revision 5)
@@ -0,0 +1,140 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$GLOBALS[$GLOBALS['idx_lang']] = 
+    array(
+	  // A
+	  "available_habillage_list" => "Liste des habillages disponibles",
+	  "available_squelette_list" => "Liste des squelettes disponibles",
+	  
+	  // B
+
+	  // C
+	  "configuration" => "Configuration avanc&eacute;e",
+	  "config_doc_directories" => "<b>R&eacute;pertoires</b>:<br /> 
+	  Il est possible de red&eacute;finir les r&eacute;pertoires de stockage 
+	  de vos <i>'squelettes'</i> et de vos <i>'habillages'</i>, par 
+	  d&eacute;faut il s'agit du r&eacute;pertoire <i>'themes'</i>, les r&eacute;pertoires sont toujours 
+	  relatifs &agrave; la racine de votre site SPIP 
+	  ",
+	  "config_doc_switcher" => "<b>Switcher</b>:<br />
+	  Le 'switcher' de th&egrave;mes permet de faire appara&icirc;tre une liste de
+	  s&eacute;lection de th&egrave;mes dans l'espace public et ainsi tester
+	  les diff&eacute;rents th&egrave;mes plus rapidement. Il est possible
+	  de ne donner cette possibilit&eacute; qu'aux administrateurs<br />
+	  De plus vous pouvez changer le style de votre s&eacute;lecteur de
+	  th&egrave;mes ici.
+	  <br>
+	  <br>
+	  Il existe &eacute;galement une balise <br />
+	  <b><small>#SKTHEME_HABILLAGES_SWITCHER</small></b><br />
+	  qu'il est possible d'int&eacute;grer &agrave; vos squelettes pour disposer
+	  cette fois d'un s&eacute;lecteur d'habillage correspondant &agrave; votre
+	  choix de squelette. Une fois encore vous pouvez en modifier le style si besoin.
+	  ",
+	  // D
+	  "documentation" => "Documentation",
+	  "extra_documentation" => "Extra Documentation",
+
+	  // E
+
+	  // F
+
+	  // G
+
+	  // H
+	  "habillages_public_dir" => "R&eacute;pertoires pour les habillages publics",
+
+	  // I
+
+	  // J
+
+	  // K
+
+	  // L
+
+	  // M
+	  "main_config_title" => "Configuration",
+	  "manage_theme" => "Gestion des th&egrave;mes",
+
+	  // N
+	  "no" => "Non",
+	  "no_available_habillage" => "Aucun habillage disponible",
+	  "no_available_squelette" => "Aucun squelette disponible",
+
+	  // O
+	  "original" => "Original",
+
+	  // P
+	  "private_choice" => "Choix th&egrave;me priv&eacute;",
+	  "private_themes_config" => "Configuration pour les th&egrave;mes priv&eacute;s",
+	  "private_theme_choice" => "Choix du th&egrave;me de l'espace priv&eacute;",
+	  "public_choice" => "Choix th&egrave;me public",
+	  "public_theme_choice" => "Choix du th&egrave;me de l'espace public",
+	  "public_themes_config" => "Configuration pour les th&egrave;mes publics",
+	  "public_theme_doc_squelette" => "<b>Choix du squelette :</b><br />
+	  Chaque fois que vous s&eacute;lectionnez un squelette (plus exactement une
+	  distribution de squelettes) la liste des habillages disponibles est mise &agrave; 
+	  jour. Le petit carr&eacute;s indique l'&eacute;tat de
+	  la distribution de squelette, stable, test, experimental ...<br />
+	  Pour plus de d&eacute;tail sur une distribution cliquez sur la
+	  fl&egrave;che noire.
+	  ",
+	  "public_theme_doc_habillage" => "<b>Choix de l'habillage :</b><br />
+	  Les habillages permettent de modifier les couleurs et l'aspect
+	  graphique d'une distribution de squelettes. Il s'agit de CSS et/ou d'images
+	  etc ...<br /> 
+	  Une distribution de squelette contient toujours une
+	  pr&eacute;sentation graphique par d&eacute;faut, ceci correspond
+	  &agrave; l'habillage nomm&eacute; <b>Original</b>.
+	  ",
+	  // Q
+
+	  // R
+
+	  // S
+	  "save_habillage" => "Enregister l'habillage",
+	  "save_public_directories" => "Enregistrer les r&eacute;pertoires",
+	  "save_squelette" => "Enregister le squelette",
+	  "save_switcher_options" => "Enregistrer les options du switcher",
+	  "squelettes_public_dir" => "R&eacute;pertoires pour les squelettes publics",
+	  "switcher_activated" => "Activer le switcher de th&egrave;me",
+	  "switcher_admin_only" => "Seulement pour les administrateurs",
+	  "switcher_style" => "Style du switcher",
+
+	  // T
+	  "to_be_done" => "&agrave; faire !",
+	  "themes_switcher" => "Switcher de th&egrave;me",
+
+	  // U
+	  "update_habillage_to" => "Mise &agrave; jour de l'habillage par : ",
+	  "update_squelette_to" => "Mise &agrave; jour du squelette par : ",
+
+	  // V
+
+	  // W
+
+	  // X
+
+	  // Y
+	  "yes" => "Oui",
+
+	  // Z
+
+);
+
+?>
Index: /plugins/sktheme/1_9_2/plugin.xml
===================================================================
--- /plugins/sktheme/1_9_2/plugin.xml	(revision 5)
+++ /plugins/sktheme/1_9_2/plugin.xml	(revision 5)
@@ -0,0 +1,38 @@
+<plugin>
+ <nom>SkTheme (SPIP 1.9.2)</nom>
+ <version>0.6</version>
+ <etat>stable</etat>
+ <auteur>Skedus
+<multi>
+_ &copy; September 2006 - distributed under GNU/GPL licence.
+[fr]_ &copy; Septembre 2006 - distribu&#233; sous license GNU/GPL.
+</multi>
+</auteur>
+<description>
+<multi>
+Manage theme for SPIP
+_ WATCH OUT: You need to desactivate switcher plugin (quite incompatible because using same process - this means i copied it inside this plugin and i would like to thank  its authors Philippe Drouot and Fil for this nice switcher plugin)
+_ Activate this plugin and manage themes in the {{Configuration}} menu.
+[fr]
+Gestion des th&#232;mes de SPIP
+_ ATTENTION: D&#233;sactivez le plugin switcher (ils sont quelque peu incompatibles, car il est monstreusement copi&#233; dans ce plugin, merci aux auteurs Philippe Drouot et Fil)
+_ Activez ce plugin et g&#233;rez les th&#232;mes dans le menu {{Configuration}}.
+</multi>
+</description>
+	<lien>http://skedus.free.fr/spip/spip.php?article8</lien> <!-- URI de documentation -->
+ <prefix>sktheme</prefix>
+ <options>sktheme_options.php</options>
+ <pipeline>
+    <nom>ajouter_boutons</nom>
+    <inclure>sktheme_fonctions.php</inclure>
+ </pipeline>
+ <pipeline>
+    <nom>affichage_final</nom>
+    <action>affichage_final</action>
+    <inclure>sktheme_fonctions.php</inclure>
+ </pipeline>
+ <pipeline>
+   <nom>insert_head</nom>
+      <inclure>sktheme_head.php</inclure>
+ </pipeline>
+ </plugin>
Index: /plugins/sktheme/1_9_2/sktheme_fonctions.php
===================================================================
--- /plugins/sktheme/1_9_2/sktheme_fonctions.php	(revision 5)
+++ /plugins/sktheme/1_9_2/sktheme_fonctions.php	(revision 5)
@@ -0,0 +1,89 @@
+<?php
+  // ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+
+$p=explode(basename(_DIR_PLUGINS)."/",str_replace('\\','/',realpath(dirname(__FILE__))));
+define('_DIR_PLUGIN_SKTHEME',(_DIR_PLUGINS.end($p)));
+
+include_spip('inc/sktheme_list');
+
+// Add private area button
+function sktheme_ajouter_boutons($boutons_admin) {
+  // administrator only
+  if ($GLOBALS['connect_statut'] == "0minirezo" && $GLOBALS["connect_toutes_rubriques"]) {
+    
+    // See button in the 'configuration' 
+    $boutons_admin['configuration']->sousmenu["sktheme_public_choice"]= 
+       new Bouton("../"._DIR_PLUGIN_SKTHEME."/img_pack/sktheme_icon.png",  // icon
+		  _L("sktheme:manage_theme"));                                     // title
+  }
+  return $boutons_admin;
+}
+
+
+//
+// Include Philippe Drouot switcher functionnality
+// Based on Fil contrib
+function sktheme_affichage_final($texte){
+	
+  global $html;
+  
+  $sktheme_list = sktheme_list();
+   
+  // Insertion du Javascript de rechargement de page
+  // Always include this script used for #SKTHEME_HABILLAGES_SWITCHER and #SKTHEME_THEMES_SWITCHER
+  $code = '<script type="text/javascript">
+		//<![CDATA[
+		function sktheme_gotof(url) {
+		window.location=url;
+		}//]]>
+		</script>';	  
+  
+  if (isset($GLOBALS['meta']['sktheme_switcher_activated']) 
+      AND ($GLOBALS['meta']['sktheme_switcher_activated']=="yes")) {
+    if ($html) {
+		
+      // Doit-on afficher le selecteur de squelette ? (Fonctionnalite restreinte aux seuls administrateurs ?)
+      $afficherSelecteur=TRUE;
+      if (isset($GLOBALS['meta']['sktheme_switcher_admin_only']) 
+	  AND ($GLOBALS['meta']['sktheme_switcher_admin_only']=="yes") 
+	  AND (!isset($_COOKIE['spip_admin']))) $afficherSelecteur=FALSE;
+		
+      if ($afficherSelecteur) {
+			
+			
+	// Insertion du selecteur de squelettes			
+	$code.='<div id="sktheme_switcher" style="top: 0;left: 20px; position: absolute; background-color: transparent;z-index: 100;">';
+	$code.='<form action="" method="post">';
+	$code.='<fieldset style="margin:0;padding:0;border:0">';
+	$code.='<select name="selecteurTheme" style="'.$GLOBALS['meta']['sktheme_theme_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">';
+	$code.='<option selected="selected" value="">Themes</option>';
+	foreach( $sktheme_list as $value )	$code.='<option value="'.parametre_url(self(),'var_sktheme',$value).'">&nbsp;-> '.$value.'</option>';
+	$code.='</select>';
+	$code.='</fieldset>';
+	$code.='</form>';
+	$code.='</div>';
+      }
+
+			
+    }
+  } 
+	// On rajoute le code du selecteur de squelettes avant la balise </body>  
+	$texte=eregi_replace("</body>","$code</body>",$texte);
+	return($texte);
+}
+
+?>
Index: /plugins/sktheme/1_9_2/sktheme_head.php
===================================================================
--- /plugins/sktheme/1_9_2/sktheme_head.php	(revision 5)
+++ /plugins/sktheme/1_9_2/sktheme_head.php	(revision 5)
@@ -0,0 +1,23 @@
+<?php
+
+
+
+function sktheme_insert_head($flux){
+  
+  if ($GLOBALS['meta']['sktheme_switcher_activated']) {
+
+    $flux .='
+	<style type="text/css" media="print">
+/* <![CDATA[ */
+	#sktheme_switcher { display: none; }
+/* ]]> */
+	</style>
+';
+
+    return $flux;
+  
+  }  
+}
+
+
+?>
Index: /plugins/sktheme/1_9_2/sktheme_options.php
===================================================================
--- /plugins/sktheme/1_9_2/sktheme_options.php	(revision 5)
+++ /plugins/sktheme/1_9_2/sktheme_options.php	(revision 5)
@@ -0,0 +1,90 @@
+<?php
+// ---------------------------------------------------------------------
+  //
+  // Sktheme : manage themes under SPIP (squelettes + habillages)
+  //
+  // Copyright (c) 2006 - Skedus
+  //
+  // This program is free software; you can redistribute it and/or modify
+  // it under the terms of the GNU General Public License as published by
+  // the Free Software Foundation; either version 2 of the License, or
+  // (at your option) any later version.
+  //
+  // You should have received a copy of the GNU General Public License
+  // along with this program; 
+  //
+  // ---------------------------------------------------------------------
+  // cache desactivation
+  $_SERVER['REQUEST_METHOD']='POST';
+
+include_spip("inc/meta");
+include_spip('inc/sktheme_balises');
+
+// Set a default configuration - each values can be modify 
+// in the private area
+if (!isset($GLOBALS['meta']['sktheme_squelettes_public_dir'])){
+  ecrire_meta('sktheme_squelettes_public_dir',"themes");
+  ecrire_meta('sktheme_habillages_public_dir',"themes");
+  ecrire_meta('sktheme_squelette_public_name',"dist");
+  ecrire_meta('sktheme_habillage_public_name',"");
+  ecrire_meta('sktheme_theme_switcher_style',"font-size: 10px;background-color: #FFF;color: #0C479D;border-top: 1px solid #CECECE; border-bottom: 2px solid #4A4A4A; border-left: 1px solid #CECECE; border-right: 1px solid #CECECE;margin:2px .5em;");
+  ecrire_meta('sktheme_habillage_switcher_style',"font-size: 10px;background-color: #FFF;color: #0C479D;border-top: 1px solid #CECECE; border-bottom: 2px solid #4A4A4A; border-left: 1px solid #CECECE; border-right: 1px solid #CECECE;margin:2px .5em;");
+  ecrire_meta('sktheme_switcher_activated',"no");
+  ecrire_meta('sktheme_switcher_admin_only',"yes");
+  ecrire_metas();
+} 
+
+// Set default user choice
+$s_dir = $GLOBALS['meta']['sktheme_squelettes_public_dir'].'/'.$GLOBALS['meta']['sktheme_squelette_public_name'];
+$h_dir = $GLOBALS['meta']['sktheme_habillages_public_dir'].'/'.$GLOBALS['meta']['sktheme_habillage_public_name'];
+
+//
+// SWITCHER THEME
+//
+// Contrib de Fil : voir http://trac.rezo.net/trac/spip-zone/browser/_contribs_/switcher/switcher.php
+// --------------------------------------------------------------------------------------------------
+// Ask sktheme 
+if (isset($_GET['var_sktheme'])) {
+  
+  // sktheme format : 
+  // for theme           = squelette_name::habillage_name
+  // for habillage only  = __current::habillage_name
+  // 
+  list($squelette,$habillage)= split ("::", $_GET['sktheme']);
+    
+  // For habillage only
+  if ($squelette == "__current") {
+    $squelette = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  }
+    
+  $s_dir = $GLOBALS['meta']['sktheme_squelettes_public_dir'].'/'.$squelette;
+  $h_dir = $GLOBALS['meta']['sktheme_habillages_public_dir'].'/'.$habillage;
+  if (is_dir(_DIR_RACINE.$s_dir)) {
+    // theme exist put a cookie
+    setcookie('spip_sktheme', $_COOKIE['spip_sktheme'] = $_GET['var_sktheme'], NULL, '/');
+  } else {
+    // not valid remove cookie
+    setcookie('spip_sktheme', $_COOKIE['spip_sktheme'] = '', -24*3600, '/');
+  }
+}
+
+if (isset($_COOKIE['spip_sktheme'])) {
+  list($squelette,$habillage)= split ("::", $_COOKIE['spip_sktheme']);
+  // For habillage only
+  if ($squelette == "__current") {
+    $squelette = $GLOBALS['meta']['sktheme_squelette_public_name'];
+  }
+  $s_dir_new = $GLOBALS['meta']['sktheme_squelettes_public_dir'].'/'.$squelette;
+  $h_dir_new = $GLOBALS['meta']['sktheme_habillages_public_dir'].'/'.$habillage;
+  
+  if (is_dir(_DIR_RACINE.$s_dir_new)) {
+    $s_dir = $s_dir_new;
+  }
+  if (is_dir(_DIR_RACINE.$h_dir_new)) {
+    $h_dir = $h_dir_new;
+  }
+} 
+
+// So set only the 'dossier_squelettes' to the corresponding user choice
+$dossier_squelettes = $h_dir.':'.$s_dir;
+?>
