Index: /extensions/photoWidget/CHANGELOG
===================================================================
--- /extensions/photoWidget/CHANGELOG	(revision 5611)
+++ /extensions/photoWidget/CHANGELOG	(revision 5611)
@@ -0,0 +1,3 @@
+photoWidget 0.1.0 - 2010-04-03
+================================
+* First public release
Index: /extensions/photoWidget/COPYING
===================================================================
--- /extensions/photoWidget/COPYING	(revision 5611)
+++ /extensions/photoWidget/COPYING	(revision 5611)
@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General
+Public License instead of this License.
Index: /extensions/photoWidget/CREDITS
===================================================================
--- /extensions/photoWidget/CREDITS	(revision 5611)
+++ /extensions/photoWidget/CREDITS	(revision 5611)
@@ -0,0 +1,3 @@
+Merci à Roy Tanck (http://www.roytanck.com/) pour son animation flash.
+
+Thanks to Roy Tanck (http://www.roytanck.com/) for it's marvelous flash movie.
Index: /extensions/photoWidget/MANIFEST
===================================================================
--- /extensions/photoWidget/MANIFEST	(revision 5611)
+++ /extensions/photoWidget/MANIFEST	(revision 5611)
@@ -0,0 +1,38 @@
+pwgPhotoWidget/CREDITS
+pwgPhotoWidget/MANIFEST
+pwgPhotoWidget/maintain.inc.php
+pwgPhotoWidget/rsync_exclude.txt
+pwgPhotoWidget/template/animation.tpl
+pwgPhotoWidget/template/liste.xml
+pwgPhotoWidget/template/admin.tpl
+pwgPhotoWidget/js/colorpicker.js
+pwgPhotoWidget/main.inc.php
+pwgPhotoWidget/default_values.inc.php
+pwgPhotoWidget/language/fr_FR/description.txt
+pwgPhotoWidget/language/fr_FR/plugin.lang.php
+pwgPhotoWidget/language/templates/plugin.lang.php
+pwgPhotoWidget/language/en_UK/plugin.lang.php
+pwgPhotoWidget/CHANGELOG
+pwgPhotoWidget/modele
+pwgPhotoWidget/include/photoWidgetConfig.class.php
+pwgPhotoWidget/include/photoWidgetContent.class.php
+pwgPhotoWidget/swf/photowidget.swf
+pwgPhotoWidget/admin.php
+pwgPhotoWidget/Makefile
+pwgPhotoWidget/COPYING
+pwgPhotoWidget/css/admin.css
+pwgPhotoWidget/css/imgs/colorpicker_hex.png
+pwgPhotoWidget/css/imgs/colorpicker_hsb_b.png
+pwgPhotoWidget/css/imgs/colorpicker_rgb_g.png
+pwgPhotoWidget/css/imgs/colorpicker_overlay.png
+pwgPhotoWidget/css/imgs/colorpicker_rgb_b.png
+pwgPhotoWidget/css/imgs/colorpicker_submit.png
+pwgPhotoWidget/css/imgs/colorpicker_select.gif
+pwgPhotoWidget/css/imgs/colorpicker_hsb_h.png
+pwgPhotoWidget/css/imgs/colorpicker_indic.gif
+pwgPhotoWidget/css/imgs/colorpicker_rgb_r.png
+pwgPhotoWidget/css/imgs/colorpicker_hsb_s.png
+pwgPhotoWidget/css/imgs/colorpicker_background.png
+pwgPhotoWidget/css/colorpicker.css
+pwgPhotoWidget/init.php
+pwgPhotoWidget/public.php
Index: /extensions/photoWidget/admin.php
===================================================================
--- /extensions/photoWidget/admin.php	(revision 5611)
+++ /extensions/photoWidget/admin.php	(revision 5611)
@@ -0,0 +1,86 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+load_language('plugin.lang', PW_PLUGIN_LANG);
+
+$me = get_plugin_data($plugin_id);
+$save_config = false;
+
+if (!empty($_POST['submit'])) {
+  if (isset($_POST['pw_all_categories']) && $_POST['pw_all_categories']!=$me->pw_all_categories) {
+    $me->pw_all_categories = $_POST['pw_all_categories'];
+    array_push($GLOBALS['page']['infos'],
+               l10n('You choose that mode for').' '.l10n('all categories'));
+    $save_config = true;
+  } else {
+    if (!empty($_POST['pw_categories']) && $_POST['pw_categories']!=$me->pw_categories) {
+      $me->pw_categories = $_POST['pw_categories'];
+      array_push($GLOBALS['page']['infos'],
+                 l10n('You choose that mode for').' '.
+                 l10n_dec('one category',
+                          'severals categories',
+                          count($_POST['pw_categories'])));
+      $save_config = true;
+    }
+  }
+    if (!empty($_POST['pw_width']) && intval($_POST['pw_width'])!=$me->pw_width) {
+    $me->pw_width = intval($_POST['pw_width']);
+    array_push($GLOBALS['page']['infos'], l10n('Width has been updated'));
+    $save_config = true;
+  }
+  if (!empty($_POST['pw_height']) && intval($_POST['pw_height'])!=$me->pw_height) {
+    $me->pw_height = intval($_POST['pw_height']);
+    array_push($GLOBALS['page']['infos'], l10n('Height has been updated'));
+    $save_config = true;
+  }
+  if (!empty($_POST['pw_bgcolor']) && trim($_POST['pw_bgcolor'])!=$me->pw_bgcolor) {
+    $me->pw_bgcolor = $_POST['pw_bgcolor'];
+    array_push($GLOBALS['page']['infos'], l10n('Background color of animation has been updated'));
+    $save_config = true;
+  }
+
+  if ($save_config) {
+    $me->save_config();
+  }
+}
+
+$query = '
+SELECT id,name
+  FROM '.CATEGORIES_TABLE;
+
+$all_categories = simple_hash_from_query($query, 'id', 'name');
+
+$GLOBALS['template']->set_filenames(array('plugin_admin_content' => PW_TEMPLATE . '/admin.tpl'));
+$GLOBALS['template']->assign('PW_CAT_CHOICES', array(1 => l10n('Yes'), 0 => l10n('No')));
+$GLOBALS['template']->assign('ALL_CATEGORIES', $all_categories); 
+$GLOBALS['template']->assign('PW_CATEGORIES', $me->pw_categories);
+$GLOBALS['template']->assign('PW_ALL_CATEGORIES', $me->pw_all_categories);
+$GLOBALS['template']->assign('PWG_PHOTO_WIDGET_PLUGIN_CSS', PW_CSS);
+$GLOBALS['template']->assign('PWG_PHOTO_WIDGET_PLUGIN_JS', PW_JS);
+$GLOBALS['template']->assign('PW_BGCOLOR', $me->pw_bgcolor);
+$GLOBALS['template']->assign('PW_WIDTH', $me->pw_width); 
+$GLOBALS['template']->assign('PW_HEIGHT', $me->pw_height); 
+$GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: /extensions/photoWidget/css/admin.css
===================================================================
--- /extensions/photoWidget/css/admin.css	(revision 5611)
+++ /extensions/photoWidget/css/admin.css	(revision 5611)
@@ -0,0 +1,42 @@
+form fieldset {
+  text-align: left;
+}
+
+form p.field, p {
+  text-align: left;
+  margin-left: 20px;
+}
+
+p.field { 
+  clear: both;
+  padding: 1em 0;
+}
+
+p.field label, p.field span {
+  float: left;
+  width: 14em;
+}
+
+p.radio label { 
+  width: 4em;
+}
+
+p.field input {
+  float: left;
+}
+
+p.pw-categories label {
+  float: left;
+}
+
+p.pw-categories select {
+  float: left;
+}
+
+p.hide { 
+  filter: alpha(opacity=70);
+  opacity: 0.7;
+  -moz-opacity: 0.7;
+  -khtml-opacity: 0.7;
+
+}
Index: /extensions/photoWidget/css/colorpicker.css
===================================================================
--- /extensions/photoWidget/css/colorpicker.css	(revision 5611)
+++ /extensions/photoWidget/css/colorpicker.css	(revision 5611)
@@ -0,0 +1,184 @@
+.colorpicker {
+  width: 356px;
+  height: 176px;
+  overflow: hidden;
+  position: absolute;
+  background: url(imgs/colorpicker_background.png);
+  font-family: Arial, Helvetica, sans-serif;
+  display: none;
+}
+
+.colorpicker_color {
+  width: 150px;
+  height: 150px;
+  left: 14px;
+  top: 13px;
+  position: absolute;
+  background: #f00;
+  overflow: hidden;
+  cursor: crosshair;
+}
+
+.colorpicker_color div {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 150px;
+  height: 150px;
+  background: url(imgs/colorpicker_overlay.png);
+}
+
+.colorpicker_color div div {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 11px;
+  height: 11px;
+  overflow: hidden;
+  background: url(imgs/colorpicker_select.gif);
+  margin: -5px 0 0 -5px;
+}
+
+.colorpicker_hue {
+  position: absolute;
+  top: 13px;
+  left: 171px;
+  width: 35px;
+  height: 150px;
+  cursor: n-resize;
+}
+
+.colorpicker_hue div {
+  position: absolute;
+  width: 35px;
+  height: 9px;
+  overflow: hidden;
+  background: url(imgs/colorpicker_indic.gif) left top;
+  margin: -4px 0 0 0;
+  left: 0px;
+}
+
+.colorpicker_new_color {
+  position: absolute;
+  width: 60px;
+  height: 30px;
+  left: 213px;
+  top: 13px;
+  background: #f00;
+}
+
+.colorpicker_current_color {
+  position: absolute;
+  width: 60px;
+  height: 30px;
+  left: 283px;
+  top: 13px;
+  background: #f00;
+}
+
+.colorpicker input {
+  background-color: transparent;
+  border: 1px solid transparent;
+  position: absolute;
+  font-size: 10px;
+  font-family: Arial, Helvetica, sans-serif;
+  color: #898989;
+  top: 4px;
+  right: 11px;
+  text-align: right;
+  margin: 0;
+  padding: 0;
+  height: 11px;
+}
+
+.colorpicker_hex {
+  position: absolute;
+  width: 72px;
+  height: 22px;
+  background: url(imgs/colorpicker_hex.png) top;
+  left: 212px;
+  top: 142px;
+}
+
+.colorpicker_hex input {
+  right: 6px;
+}
+
+.colorpicker_field {
+  height: 22px;
+  width: 62px;
+  background-position: top;
+  position: absolute;
+}
+
+.colorpicker_field span {
+  position: absolute;
+  width: 12px;
+  height: 22px;
+  overflow: hidden;
+  top: 0;
+  right: 0;
+  cursor: n-resize;
+}
+
+.colorpicker_rgb_r {
+  background-image: url(imgs/colorpicker_rgb_r.png);
+  top: 52px;
+  left: 212px;
+}
+
+.colorpicker_rgb_g {
+  background-image: url(imgs/colorpicker_rgb_g.png);
+  top: 82px;
+  left: 212px;
+}
+
+.colorpicker_rgb_b {
+  background-image: url(imgs/colorpicker_rgb_b.png);
+  top: 112px;
+  left: 212px;
+}
+
+.colorpicker_hsb_h {
+  background-image: url(imgs/colorpicker_hsb_h.png);
+  top: 52px;
+  left: 282px;
+}
+
+.colorpicker_hsb_s {
+  background-image: url(imgs/colorpicker_hsb_s.png);
+  top: 82px;
+  left: 282px;
+}
+
+.colorpicker_hsb_b {
+  background-image: url(imgs/colorpicker_hsb_b.png);
+  top: 112px;
+  left: 282px;
+}
+
+.colorpicker_submit {
+  position: absolute;
+  width: 22px;
+  height: 22px;
+  background: url(imgs/colorpicker_submit.png) top;
+  left: 322px;
+  top: 142px;
+  overflow: hidden;
+}
+
+.colorpicker_focus {
+  background-position: center;
+}
+
+.colorpicker_hex.colorpicker_focus {
+  background-position: bottom;
+}
+
+.colorpicker_submit.colorpicker_focus {
+  background-position: bottom;
+}
+
+.colorpicker_slider {
+  background-position: bottom;
+}
Index: /extensions/photoWidget/default_values.inc.php
===================================================================
--- /extensions/photoWidget/default_values.inc.php	(revision 5611)
+++ /extensions/photoWidget/default_values.inc.php	(revision 5611)
@@ -0,0 +1,26 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$default_values['pw_all_categories'] = 0;
+$default_values['pw_bgcolor'] = '000000'; 
+$default_values['pw_width'] = 600;
+$default_values['pw_height'] = 400;
+?>
Index: /extensions/photoWidget/include/photoWidgetConfig.class.php
===================================================================
--- /extensions/photoWidget/include/photoWidgetConfig.class.php	(revision 5611)
+++ /extensions/photoWidget/include/photoWidgetConfig.class.php	(revision 5611)
@@ -0,0 +1,90 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+class photoWidgetConfig
+{
+  private 
+    $config = array(), 
+    $plugin_dir;
+
+  public function __construct($plugin_dir, $plugin_name) {
+    $this->plugin_dir = $plugin_dir;
+    $this->plugin_name = $plugin_name;
+
+    if (!file_exists($this->get_config_file_dir())) {
+      mkgetdir($this->get_config_file_dir());
+    }
+
+    if (!file_exists($this->get_config_filename())) {
+      $this->save_config();
+    }
+  }
+
+  public function load_config() {
+    $x = file_get_contents($this->get_config_filename());
+    if ($x!==false) {
+      $c = unserialize($x);
+      $this->config = $c;
+    }
+    $this->setDefaults();
+  }
+
+  public function save_config() {
+    file_put_contents($this->get_config_filename(), serialize($this->config));
+  }
+
+  private function get_config_file_dir() {
+    return $GLOBALS['conf']['local_data_dir'].'/plugins/';
+  }
+
+  private function get_config_filename() {
+    return $this->get_config_file_dir().basename($this->plugin_dir).'.dat';
+  }
+
+  public function __set($key, $value) {
+    // need filters ??
+    $this->config[$key] = $value;
+  }
+
+  public function __get($key) {
+    return isset($this->config[$key])?$this->config[$key]:null;
+  }
+
+  public function plugin_admin_menu($menu) {
+    array_push($menu,
+	       array('NAME' => $this->plugin_name,
+		     'URL' => get_admin_plugin_menu_link($this->plugin_dir.'/admin.php')		 
+		     )
+	       );
+    return $menu;
+  }
+
+  private function setDefaults() {
+    include_once $this->plugin_dir.'/default_values.inc.php';
+
+    foreach ($default_values as $key => $value) {
+      if (!isset($this->config[$key])) {
+	$this->config[$key] = $value;
+      }
+    }
+  }
+}
+?>
Index: /extensions/photoWidget/include/photoWidgetContent.class.php
===================================================================
--- /extensions/photoWidget/include/photoWidgetContent.class.php	(revision 5611)
+++ /extensions/photoWidget/include/photoWidgetContent.class.php	(revision 5611)
@@ -0,0 +1,126 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+class photoWidgetContent
+{
+  private $query_string = null;
+  
+  public function __construct($config) {
+    $this->plugin_config = $config;
+
+    $this->fmt_xml = make_index_url() . '/category/%d/pw.xml';
+    $xml_pattern = '`category/(\d*)/pw\.xml$`';
+    
+    if (preg_match($xml_pattern, $_SERVER['QUERY_STRING'], $matches)) {
+      $this->query_string = $matches[1];
+    }
+  }
+
+  public function loc_begin_index() {
+    global $page;
+
+    $this->applicable = false;
+    
+    if (!empty($page['category'])) {
+      if ($this->plugin_config->pw_all_categories==1 or
+          (is_array($this->plugin_config->pw_categories) &&
+           in_array($page['category']['id'], $this->plugin_config->pw_categories)))
+      {
+        $this->applicable = true;
+      }
+    }
+  }
+
+  public function loc_begin_index_thumbnails($images) {
+    global $template, $page;
+    
+    if (!$this->applicable) {
+      return;
+    }
+
+    if ($this->query_string!=null)
+    {
+      foreach ($images as &$image) {
+        $image['url'] = duplicate_picture_url(
+          array('image_id' => $image['id'],
+                'image_file' => $image['file']
+            ),
+          array('start')
+          );
+      }
+      $this->pw_xml($images);
+    }
+
+    $template->set_filename('index_thumbnails', PW_TEMPLATE . '/animation.tpl');
+    $template->assign('PW_XML', sprintf($this->fmt_xml, $page['category']['id']));
+    $template->assign('PW_BGCOLOR', $this->plugin_config->pw_bgcolor);
+    $template->assign('PW_WIDTH', $this->plugin_config->pw_width);
+    $template->assign('PW_HEIGHT', $this->plugin_config->pw_height);
+    $template->assign('PW_SWF_ANIMATION', PW_SWF . '/photowidget.swf');
+  }
+
+  public function loc_begin_index_category_thumbnails($categories) {
+    global $template, $page;
+    
+    if (!$this->applicable) {
+      return;
+    }
+
+    if ($this->query_string!=null)
+    {
+      $image_ids = array();
+      foreach ($categories as $category) {
+        $image_ids[] = $category['representative_picture_id'];
+      }
+      $thumbnail_src_of = array();
+      
+      $query = '
+SELECT id, path, tn_ext
+  FROM '.IMAGES_TABLE.'
+  WHERE id IN ('.implode(',', $image_ids).')
+;';
+      $result = pwg_query($query);
+      while ($row = pwg_db_fetch_assoc($result))
+      {
+        $thumbnail_src_of[$row['id']] = get_thumbnail_url($row);
+      }
+
+      foreach ($categories as &$category) {
+        $category['url'] = make_index_url(array('category' => $category));
+        $category['path'] = $thumbnail_src_of[$category['representative_picture_id']];
+      }
+      $this->pw_xml($categories);
+    }
+    
+    $template->set_filename('index_category_thumbnails', PW_TEMPLATE . '/animation.tpl');
+    $template->assign('PW_XML', sprintf($this->fmt_xml, $page['category']['id']));
+    $template->assign('PW_BGCOLOR', $this->plugin_config->pw_bgcolor);
+    $template->assign('PW_WIDTH', $this->plugin_config->pw_width);
+    $template->assign('PW_HEIGHT', $this->plugin_config->pw_height);
+    $template->assign('PW_SWF_ANIMATION', PW_SWF . '/photowidget.swf');
+  }
+
+  private function pw_xml($images) {
+    include PW_TEMPLATE . '/liste.xml';
+    exit();
+  }
+}
+?>
Index: /extensions/photoWidget/init.php
===================================================================
--- /extensions/photoWidget/init.php	(revision 5611)
+++ /extensions/photoWidget/init.php	(revision 5611)
@@ -0,0 +1,49 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+define('PW_PLUGIN_NAME', 'Photo Widget');
+define('PW_PLUGIN_ROOT', dirname(__FILE__));
+define('PW_PLUGIN_LANG', PW_PLUGIN_ROOT . '/');
+define('PW_TEMPLATE', PW_PLUGIN_ROOT . '/template');
+define('PW_CSS', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/css');
+define('PW_JS', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/js');
+define('PW_SWF', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/swf');
+define('PW_IMGS', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/imgs');
+
+include_once "include/photoWidgetConfig.class.php";
+
+load_language('plugin.lang', PW_PLUGIN_LANG);
+
+$plugin_config = new photoWidgetConfig(PW_PLUGIN_ROOT, PW_PLUGIN_NAME);
+$plugin_config->load_config();
+
+if (defined('IN_ADMIN')) { 
+  add_event_handler('get_admin_plugin_menu_links', array($plugin_config, 'plugin_admin_menu')); 
+} else {
+  include_once PW_PLUGIN_ROOT . '/public.php';
+}
+
+set_plugin_data($plugin['id'], $plugin_config);
+?>
Index: /extensions/photoWidget/js/colorpicker.js
===================================================================
--- /extensions/photoWidget/js/colorpicker.js	(revision 5611)
+++ /extensions/photoWidget/js/colorpicker.js	(revision 5611)
@@ -0,0 +1,484 @@
+/**
+ *
+ * Color picker
+ * Author: Stefan Petre www.eyecon.ro
+ * 
+ * Dual licensed under the MIT and GPL licenses
+ * 
+ */
+(function ($) {
+	var ColorPicker = function () {
+		var
+			ids = {},
+			inAction,
+			charMin = 65,
+			visible,
+			tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
+			defaults = {
+				eventName: 'click',
+				onShow: function () {},
+				onBeforeShow: function(){},
+				onHide: function () {},
+				onChange: function () {},
+				onSubmit: function () {},
+				color: 'ff0000',
+				livePreview: true,
+				flat: false
+			},
+			fillRGBFields = function  (hsb, cal) {
+				var rgb = HSBToRGB(hsb);
+				$(cal).data('colorpicker').fields
+					.eq(1).val(rgb.r).end()
+					.eq(2).val(rgb.g).end()
+					.eq(3).val(rgb.b).end();
+			},
+			fillHSBFields = function  (hsb, cal) {
+				$(cal).data('colorpicker').fields
+					.eq(4).val(hsb.h).end()
+					.eq(5).val(hsb.s).end()
+					.eq(6).val(hsb.b).end();
+			},
+			fillHexFields = function (hsb, cal) {
+				$(cal).data('colorpicker').fields
+					.eq(0).val(HSBToHex(hsb)).end();
+			},
+			setSelector = function (hsb, cal) {
+				$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
+				$(cal).data('colorpicker').selectorIndic.css({
+					left: parseInt(150 * hsb.s/100, 10),
+					top: parseInt(150 * (100-hsb.b)/100, 10)
+				});
+			},
+			setHue = function (hsb, cal) {
+				$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
+			},
+			setCurrentColor = function (hsb, cal) {
+				$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
+			},
+			setNewColor = function (hsb, cal) {
+				$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
+			},
+			keyDown = function (ev) {
+				var pressedKey = ev.charCode || ev.keyCode || -1;
+				if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
+					return false;
+				}
+				var cal = $(this).parent().parent();
+				if (cal.data('colorpicker').livePreview === true) {
+					change.apply(this);
+				}
+			},
+			change = function (ev) {
+				var cal = $(this).parent().parent(), col;
+				if (this.parentNode.className.indexOf('_hex') > 0) {
+					cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
+				} else if (this.parentNode.className.indexOf('_hsb') > 0) {
+					cal.data('colorpicker').color = col = fixHSB({
+						h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
+						s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
+						b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
+					});
+				} else {
+					cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
+						r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
+						g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
+						b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
+					}));
+				}
+				if (ev) {
+					fillRGBFields(col, cal.get(0));
+					fillHexFields(col, cal.get(0));
+					fillHSBFields(col, cal.get(0));
+				}
+				setSelector(col, cal.get(0));
+				setHue(col, cal.get(0));
+				setNewColor(col, cal.get(0));
+				cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
+			},
+			blur = function (ev) {
+				var cal = $(this).parent().parent();
+				cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
+			},
+			focus = function () {
+				charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
+				$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
+				$(this).parent().addClass('colorpicker_focus');
+			},
+			downIncrement = function (ev) {
+				var field = $(this).parent().find('input').focus();
+				var current = {
+					el: $(this).parent().addClass('colorpicker_slider'),
+					max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
+					y: ev.pageY,
+					field: field,
+					val: parseInt(field.val(), 10),
+					preview: $(this).parent().parent().data('colorpicker').livePreview					
+				};
+				$(document).bind('mouseup', current, upIncrement);
+				$(document).bind('mousemove', current, moveIncrement);
+			},
+			moveIncrement = function (ev) {
+				ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
+				if (ev.data.preview) {
+					change.apply(ev.data.field.get(0), [true]);
+				}
+				return false;
+			},
+			upIncrement = function (ev) {
+				change.apply(ev.data.field.get(0), [true]);
+				ev.data.el.removeClass('colorpicker_slider').find('input').focus();
+				$(document).unbind('mouseup', upIncrement);
+				$(document).unbind('mousemove', moveIncrement);
+				return false;
+			},
+			downHue = function (ev) {
+				var current = {
+					cal: $(this).parent(),
+					y: $(this).offset().top
+				};
+				current.preview = current.cal.data('colorpicker').livePreview;
+				$(document).bind('mouseup', current, upHue);
+				$(document).bind('mousemove', current, moveHue);
+			},
+			moveHue = function (ev) {
+				change.apply(
+					ev.data.cal.data('colorpicker')
+						.fields
+						.eq(4)
+						.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
+						.get(0),
+					[ev.data.preview]
+				);
+				return false;
+			},
+			upHue = function (ev) {
+				fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+				fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+				$(document).unbind('mouseup', upHue);
+				$(document).unbind('mousemove', moveHue);
+				return false;
+			},
+			downSelector = function (ev) {
+				var current = {
+					cal: $(this).parent(),
+					pos: $(this).offset()
+				};
+				current.preview = current.cal.data('colorpicker').livePreview;
+				$(document).bind('mouseup', current, upSelector);
+				$(document).bind('mousemove', current, moveSelector);
+			},
+			moveSelector = function (ev) {
+				change.apply(
+					ev.data.cal.data('colorpicker')
+						.fields
+						.eq(6)
+						.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
+						.end()
+						.eq(5)
+						.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
+						.get(0),
+					[ev.data.preview]
+				);
+				return false;
+			},
+			upSelector = function (ev) {
+				fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+				fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+				$(document).unbind('mouseup', upSelector);
+				$(document).unbind('mousemove', moveSelector);
+				return false;
+			},
+			enterSubmit = function (ev) {
+				$(this).addClass('colorpicker_focus');
+			},
+			leaveSubmit = function (ev) {
+				$(this).removeClass('colorpicker_focus');
+			},
+			clickSubmit = function (ev) {
+				var cal = $(this).parent();
+				var col = cal.data('colorpicker').color;
+				cal.data('colorpicker').origColor = col;
+				setCurrentColor(col, cal.get(0));
+				cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
+			},
+			show = function (ev) {
+				var cal = $('#' + $(this).data('colorpickerId'));
+				cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
+				var pos = $(this).offset();
+				var viewPort = getViewport();
+				var top = pos.top + this.offsetHeight;
+				var left = pos.left;
+				if (top + 176 > viewPort.t + viewPort.h) {
+					top -= this.offsetHeight + 176;
+				}
+				if (left + 356 > viewPort.l + viewPort.w) {
+					left -= 356;
+				}
+				cal.css({left: left + 'px', top: top + 'px'});
+				if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
+					cal.show();
+				}
+				$(document).bind('mousedown', {cal: cal}, hide);
+				return false;
+			},
+			hide = function (ev) {
+				if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
+					if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
+						ev.data.cal.hide();
+					}
+					$(document).unbind('mousedown', hide);
+				}
+			},
+			isChildOf = function(parentEl, el, container) {
+				if (parentEl == el) {
+					return true;
+				}
+				if (parentEl.contains) {
+					return parentEl.contains(el);
+				}
+				if ( parentEl.compareDocumentPosition ) {
+					return !!(parentEl.compareDocumentPosition(el) & 16);
+				}
+				var prEl = el.parentNode;
+				while(prEl && prEl != container) {
+					if (prEl == parentEl)
+						return true;
+					prEl = prEl.parentNode;
+				}
+				return false;
+			},
+			getViewport = function () {
+				var m = document.compatMode == 'CSS1Compat';
+				return {
+					l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
+					t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
+					w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
+					h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
+				};
+			},
+			fixHSB = function (hsb) {
+				return {
+					h: Math.min(360, Math.max(0, hsb.h)),
+					s: Math.min(100, Math.max(0, hsb.s)),
+					b: Math.min(100, Math.max(0, hsb.b))
+				};
+			}, 
+			fixRGB = function (rgb) {
+				return {
+					r: Math.min(255, Math.max(0, rgb.r)),
+					g: Math.min(255, Math.max(0, rgb.g)),
+					b: Math.min(255, Math.max(0, rgb.b))
+				};
+			},
+			fixHex = function (hex) {
+				var len = 6 - hex.length;
+				if (len > 0) {
+					var o = [];
+					for (var i=0; i<len; i++) {
+						o.push('0');
+					}
+					o.push(hex);
+					hex = o.join('');
+				}
+				return hex;
+			}, 
+			HexToRGB = function (hex) {
+				var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
+				return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
+			},
+			HexToHSB = function (hex) {
+				return RGBToHSB(HexToRGB(hex));
+			},
+			RGBToHSB = function (rgb) {
+				var hsb = {
+					h: 0,
+					s: 0,
+					b: 0
+				};
+				var min = Math.min(rgb.r, rgb.g, rgb.b);
+				var max = Math.max(rgb.r, rgb.g, rgb.b);
+				var delta = max - min;
+				hsb.b = max;
+				if (max != 0) {
+					
+				}
+				hsb.s = max != 0 ? 255 * delta / max : 0;
+				if (hsb.s != 0) {
+					if (rgb.r == max) {
+						hsb.h = (rgb.g - rgb.b) / delta;
+					} else if (rgb.g == max) {
+						hsb.h = 2 + (rgb.b - rgb.r) / delta;
+					} else {
+						hsb.h = 4 + (rgb.r - rgb.g) / delta;
+					}
+				} else {
+					hsb.h = -1;
+				}
+				hsb.h *= 60;
+				if (hsb.h < 0) {
+					hsb.h += 360;
+				}
+				hsb.s *= 100/255;
+				hsb.b *= 100/255;
+				return hsb;
+			},
+			HSBToRGB = function (hsb) {
+				var rgb = {};
+				var h = Math.round(hsb.h);
+				var s = Math.round(hsb.s*255/100);
+				var v = Math.round(hsb.b*255/100);
+				if(s == 0) {
+					rgb.r = rgb.g = rgb.b = v;
+				} else {
+					var t1 = v;
+					var t2 = (255-s)*v/255;
+					var t3 = (t1-t2)*(h%60)/60;
+					if(h==360) h = 0;
+					if(h<60) {rgb.r=t1;	rgb.b=t2; rgb.g=t2+t3}
+					else if(h<120) {rgb.g=t1; rgb.b=t2;	rgb.r=t1-t3}
+					else if(h<180) {rgb.g=t1; rgb.r=t2;	rgb.b=t2+t3}
+					else if(h<240) {rgb.b=t1; rgb.r=t2;	rgb.g=t1-t3}
+					else if(h<300) {rgb.b=t1; rgb.g=t2;	rgb.r=t2+t3}
+					else if(h<360) {rgb.r=t1; rgb.g=t2;	rgb.b=t1-t3}
+					else {rgb.r=0; rgb.g=0;	rgb.b=0}
+				}
+				return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
+			},
+			RGBToHex = function (rgb) {
+				var hex = [
+					rgb.r.toString(16),
+					rgb.g.toString(16),
+					rgb.b.toString(16)
+				];
+				$.each(hex, function (nr, val) {
+					if (val.length == 1) {
+						hex[nr] = '0' + val;
+					}
+				});
+				return hex.join('');
+			},
+			HSBToHex = function (hsb) {
+				return RGBToHex(HSBToRGB(hsb));
+			},
+			restoreOriginal = function () {
+				var cal = $(this).parent();
+				var col = cal.data('colorpicker').origColor;
+				cal.data('colorpicker').color = col;
+				fillRGBFields(col, cal.get(0));
+				fillHexFields(col, cal.get(0));
+				fillHSBFields(col, cal.get(0));
+				setSelector(col, cal.get(0));
+				setHue(col, cal.get(0));
+				setNewColor(col, cal.get(0));
+			};
+		return {
+			init: function (opt) {
+				opt = $.extend({}, defaults, opt||{});
+				if (typeof opt.color == 'string') {
+					opt.color = HexToHSB(opt.color);
+				} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
+					opt.color = RGBToHSB(opt.color);
+				} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
+					opt.color = fixHSB(opt.color);
+				} else {
+					return this;
+				}
+				return this.each(function () {
+					if (!$(this).data('colorpickerId')) {
+						var options = $.extend({}, opt);
+						options.origColor = opt.color;
+						var id = 'collorpicker_' + parseInt(Math.random() * 1000);
+						$(this).data('colorpickerId', id);
+						var cal = $(tpl).attr('id', id);
+						if (options.flat) {
+							cal.appendTo(this).show();
+						} else {
+							cal.appendTo(document.body);
+						}
+						options.fields = cal
+											.find('input')
+												.bind('keyup', keyDown)
+												.bind('change', change)
+												.bind('blur', blur)
+												.bind('focus', focus);
+						cal
+							.find('span').bind('mousedown', downIncrement).end()
+							.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
+						options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
+						options.selectorIndic = options.selector.find('div div');
+						options.el = this;
+						options.hue = cal.find('div.colorpicker_hue div');
+						cal.find('div.colorpicker_hue').bind('mousedown', downHue);
+						options.newColor = cal.find('div.colorpicker_new_color');
+						options.currentColor = cal.find('div.colorpicker_current_color');
+						cal.data('colorpicker', options);
+						cal.find('div.colorpicker_submit')
+							.bind('mouseenter', enterSubmit)
+							.bind('mouseleave', leaveSubmit)
+							.bind('click', clickSubmit);
+						fillRGBFields(options.color, cal.get(0));
+						fillHSBFields(options.color, cal.get(0));
+						fillHexFields(options.color, cal.get(0));
+						setHue(options.color, cal.get(0));
+						setSelector(options.color, cal.get(0));
+						setCurrentColor(options.color, cal.get(0));
+						setNewColor(options.color, cal.get(0));
+						if (options.flat) {
+							cal.css({
+								position: 'relative',
+								display: 'block'
+							});
+						} else {
+							$(this).bind(options.eventName, show);
+						}
+					}
+				});
+			},
+			showPicker: function() {
+				return this.each( function () {
+					if ($(this).data('colorpickerId')) {
+						show.apply(this);
+					}
+				});
+			},
+			hidePicker: function() {
+				return this.each( function () {
+					if ($(this).data('colorpickerId')) {
+						$('#' + $(this).data('colorpickerId')).hide();
+					}
+				});
+			},
+			setColor: function(col) {
+				if (typeof col == 'string') {
+					col = HexToHSB(col);
+				} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
+					col = RGBToHSB(col);
+				} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
+					col = fixHSB(col);
+				} else {
+					return this;
+				}
+				return this.each(function(){
+					if ($(this).data('colorpickerId')) {
+						var cal = $('#' + $(this).data('colorpickerId'));
+						cal.data('colorpicker').color = col;
+						cal.data('colorpicker').origColor = col;
+						fillRGBFields(col, cal.get(0));
+						fillHSBFields(col, cal.get(0));
+						fillHexFields(col, cal.get(0));
+						setHue(col, cal.get(0));
+						setSelector(col, cal.get(0));
+						setCurrentColor(col, cal.get(0));
+						setNewColor(col, cal.get(0));
+					}
+				});
+			}
+		};
+	}();
+	$.fn.extend({
+		ColorPicker: ColorPicker.init,
+		ColorPickerHide: ColorPicker.hidePicker,
+		ColorPickerShow: ColorPicker.showPicker,
+		ColorPickerSetColor: ColorPicker.setColor
+	});
+})(jQuery)
Index: /extensions/photoWidget/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/photoWidget/language/en_UK/plugin.lang.php	(revision 5611)
+++ /extensions/photoWidget/language/en_UK/plugin.lang.php	(revision 5611)
@@ -0,0 +1,23 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Vous can choose that mode for displaying one, severals or all categories'] = 'Vous can choose that mode for displaying one, severals or all categories';
+?>
Index: /extensions/photoWidget/language/fr_FR/description.txt
===================================================================
--- /extensions/photoWidget/language/fr_FR/description.txt	(revision 5611)
+++ /extensions/photoWidget/language/fr_FR/description.txt	(revision 5611)
@@ -0,0 +1,1 @@
+Ce plugin permet d'afficher les imagettes sous la forme d'une animation flash en 3D.
Index: /extensions/photoWidget/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/photoWidget/language/fr_FR/plugin.lang.php	(revision 5611)
+++ /extensions/photoWidget/language/fr_FR/plugin.lang.php	(revision 5611)
@@ -0,0 +1,36 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'] = 'Ce plugin affiche les imagettes sous la forme d\'une animation flash en 3D.';
+$lang['Vous can choose that mode for displaying one, severals or all categories'] = 'Vous pouvez choisir ce mode d\'affichage pour une, plusieurs ou toutes les catégories';
+$lang['All categories'] = 'Toutes les catégories';
+$lang['Animation size'] = 'Taille de l\'animation';
+$lang['Animation background color'] = 'Couleur de fond de l\'animation';
+$lang['Color'] = 'Couleur';
+$lang['You choose that mode for'] = 'Vous avez choisi ce mode d\'affichage pour';
+$lang['one category'] = 'une catégorie';
+$lang['all categories'] = 'toutes les catégories';
+$lang['severals categories'] = 'plusieurs catégories';
+$lang['Width has been updated'] = 'La largeur a été mise à jour';
+$lang['Height has been updated'] = 'La hauteur a été mise à jour';
+$lang['Background color of animation has been updated'] = 'La couleur de fond a été mise à jour';
+$lang['This widget requires Flash Player 9 or better'] = 'Ce mode d\'affichage nécessite flash 9 au minimum'; 
+?>
Index: /extensions/photoWidget/language/templates/plugin.lang.php
===================================================================
--- /extensions/photoWidget/language/templates/plugin.lang.php	(revision 5611)
+++ /extensions/photoWidget/language/templates/plugin.lang.php	(revision 5611)
@@ -0,0 +1,36 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'] = '';
+$lang['Vous can choose that mode for displaying one, severals or all categories'] = '';
+$lang['All categories'] = '';
+$lang['Animation size'] = '';
+$lang['Animation background color'] = '';
+$lang['Color'] = '';
+$lang['You choose that mode for'] = '';
+$lang['one category'] = '';
+$lang['all categories'] = '';
+$lang['severals categories'] = '';
+$lang['Width has been updated'] = '';
+$lang['Height has been updated'] = '';
+$lang['Background color of animation has been updated'] = '';
+$lang['This widget requires Flash Player 9 or better'] = '';
+?>
Index: /extensions/photoWidget/main.inc.php
===================================================================
--- /extensions/photoWidget/main.inc.php	(revision 5611)
+++ /extensions/photoWidget/main.inc.php	(revision 5611)
@@ -0,0 +1,36 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: photoWidget
+Version: 0.0.1
+Description: add an amazing 3D animation for pictures
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=370
+Author: nikrou
+Author URI: http://www.nikrou.net/
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+include_once(dirname(__FILE__).'/init.php');
+?>
Index: /extensions/photoWidget/maintain.inc.php
===================================================================
--- /extensions/photoWidget/maintain.inc.php	(revision 5611)
+++ /extensions/photoWidget/maintain.inc.php	(revision 5611)
@@ -0,0 +1,37 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+function plugin_install($plugin_id, $plugin_version, &$errors) {
+}
+
+function plugin_activate($plugin_id, $plugin_version, &$errors) {
+}
+
+function plugin_deactivate($plugin_id) { 
+}
+
+function plugin_uninstall($plugin_id) {
+}
+?>
Index: /extensions/photoWidget/public.php
===================================================================
--- /extensions/photoWidget/public.php	(revision 5611)
+++ /extensions/photoWidget/public.php	(revision 5611)
@@ -0,0 +1,34 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | photoWidget  - a plugin for Piwigo                                    |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+include_once PW_PLUGIN_ROOT . "/include/photoWidgetContent.class.php";
+
+$public_content = new photoWidgetContent($plugin_config);
+
+add_event_handler('loc_begin_index_category_thumbnails', 
+		  array($public_content, 'loc_begin_index_category_thumbnails')
+  );
+
+add_event_handler('loc_begin_index_thumbnails', 
+		  array($public_content, 'loc_begin_index_thumbnails')
+  );
+add_event_handler('loc_begin_index', array($public_content, 'loc_begin_index'));
+?>
Index: /extensions/photoWidget/template/admin.tpl
===================================================================
--- /extensions/photoWidget/template/admin.tpl	(revision 5611)
+++ /extensions/photoWidget/template/admin.tpl	(revision 5611)
@@ -0,0 +1,82 @@
+{html_head} 
+<link rel="stylesheet" type="text/css" href="{$PWG_PHOTO_WIDGET_PLUGIN_CSS}/admin.css">
+<link rel="stylesheet" type="text/css" href="{$PWG_PHOTO_WIDGET_PLUGIN_CSS}/colorpicker.css">
+{known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"}
+{known_script id="colorpicker" src="$PWG_PHOTO_WIDGET_PLUGIN_JS/colorpicker.js"}
+{literal}
+<script type="text/javascript">
+$(function() {
+$('input.pwg-picker')
+  .each(function() {
+      if ($(this).val() !== undefined) {
+        $(this).css('background-color', '#'+$(this).val());
+      }
+    })
+  .ColorPicker({
+    onSubmit: function(hsb, hex, rgb, el) {
+        $(el).val(hex);
+        $(el).ColorPickerHide();
+        $(el).css('background-color', '#'+hex);
+      },
+    onBeforeShow: function () {
+        $(this).ColorPickerSetColor(this.value);
+      }
+})
+.bind('keyup', function(){
+	$(this).ColorPickerSetColor(this.value);
+});
+});
+</script>
+{/literal}
+{/html_head}
+
+<div class="titrePage">
+  <h2>{'Photo Widget Plugin'|@translate}</h2>
+</div>
+
+<p>
+{'That plugin display pictures using a flash movie that rotates them in 3D. It works like regulars categories but in a more amazing and exciting way.'|@translate}
+</p>
+
+<p>
+{'Vous can choose that mode for displaying one, severals or all categories'|@translate}
+<p>
+
+<form method="post" action="" class="general">
+<fieldset>
+  <legend>{'Main configuration'|translate}</legend>
+  <p class="field radio"><span>{'All categories'|translate} ?</span>
+    {html_radios name='pw_all_categories options=$PW_CAT_CHOICES selected=$PW_ALL_CATEGORIES}
+  </p>
+
+  <p class="field pw-categories">
+    <label>{'Applicable categorie(s)'|translate}</label>
+    <select name="pw_categories[]" multiple="multiple" size="{$pw_categories|@count|@max:3}">
+      <option value=""></option>
+      {html_options options=$ALL_CATEGORIES selected=$PW_CATEGORIES}
+    </select>
+  </p>
+</fieldset>
+<fieldset>
+  <legend>{'Animation size'|@translate}</legend>
+  <p class="field">
+    <label>{'Width'|@translate}
+      <input type="text" name="pw_width" value="{$PW_WIDTH}">
+    </label>
+  </p>
+  <p class="field">
+    <label>{'Height'|@translate}
+      <input type="text" name="pw_height" value="{$PW_HEIGHT}">
+    </label>
+  </p>
+</fieldset>
+<fieldset>
+  <legend>{'Animation background color'|@translate}</legend>
+  <div id="picker" style="float: right;"></div>
+  <p class="field">
+    <label>{'Color'|@translate}</label>
+    <input class="pwg-picker" type="text" name="pw_bgcolor" value="{$PW_BGCOLOR}">
+  </p>
+</fieldset>
+<p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
+</form>
Index: /extensions/photoWidget/template/animation.tpl
===================================================================
--- /extensions/photoWidget/template/animation.tpl	(revision 5611)
+++ /extensions/photoWidget/template/animation.tpl	(revision 5611)
@@ -0,0 +1,10 @@
+<div id="photoWidget">
+  <object type="application/x-shockwave-flash" data="{$PW_SWF_ANIMATION}" 
+          width="{$PW_WIDTH}px" height="{$PW_HEIGHT}px">
+    <param name="movie" value="{$PW_SWF_ANIMATION}">
+    <param name="bgcolor" value="#{$PW_BGCOLOR}">
+    <param name="AllowScriptAccess" value="always">
+    <param name="flashvars" value="feed={$PW_XML}">
+    <p>{'This widget requires Flash Player 9 or better'|@translate}</p>
+  </object>
+</div>
Index: /extensions/photoWidget/template/liste.xml
===================================================================
--- /extensions/photoWidget/template/liste.xml	(revision 5611)
+++ /extensions/photoWidget/template/liste.xml	(revision 5611)
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<images>
+  <?php
+    foreach ($images as $id => $image) {
+    printf('<image href="%s">%s</image>', $image['url'], $image['path']);
+    }
+  ?>
+</images>
