Index: /extensions/posted_date_changer/change_posted_date.tpl
===================================================================
--- /extensions/posted_date_changer/change_posted_date.tpl	(revision 10356)
+++ /extensions/posted_date_changer/change_posted_date.tpl	(revision 10356)
@@ -0,0 +1,22 @@
+{footer_script}{literal}
+  pwg_initialization_datepicker("#date_available_day", "#date_available_month", "#date_available_year", "#date_available_linked_date", "#date_available_action_set");
+{/literal}{/footer_script}
+
+<div id="set_date_available">
+    <select id="date_available_day" name="date_available_day">
+       <option value="0">--</option>
+      {section name=day start=1 loop=32}
+        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_AVAILABLE_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
+      {/section}
+    </select>
+    <select id="date_available_month" name="date_available_month">
+      {html_options options=$month_list selected=$DATE_AVAILABLE_MONTH}
+    </select>
+    <input id="date_available_year"
+           name="date_available_year"
+           type="text"
+           size="4"
+           maxlength="4"
+           value="{$DATE_AVAILABLE_YEAR}">
+    <input id="date_available_linked_date" name="date_available_linked_date" type="hidden" size="10" disabled="disabled">
+</div>
Index: /extensions/posted_date_changer/language/en_UK/description.txt
===================================================================
--- /extensions/posted_date_changer/language/en_UK/description.txt	(revision 10356)
+++ /extensions/posted_date_changer/language/en_UK/description.txt	(revision 10356)
@@ -0,0 +1,1 @@
+Change the available date of photos in batch manager.
Index: /extensions/posted_date_changer/language/en_UK/index.php
===================================================================
--- /extensions/posted_date_changer/language/en_UK/index.php	(revision 10356)
+++ /extensions/posted_date_changer/language/en_UK/index.php	(revision 10356)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/posted_date_changer/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/posted_date_changer/language/en_UK/plugin.lang.php	(revision 10356)
+++ /extensions/posted_date_changer/language/en_UK/plugin.lang.php	(revision 10356)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Change Posted Date'] = 'Change Posted Date';
+
+?>
Index: /extensions/posted_date_changer/language/fr_FR/description.txt
===================================================================
--- /extensions/posted_date_changer/language/fr_FR/description.txt	(revision 10356)
+++ /extensions/posted_date_changer/language/fr_FR/description.txt	(revision 10356)
@@ -0,0 +1,1 @@
+Permet de changer la date d'ajout des photos dans la gestion par lot.
Index: /extensions/posted_date_changer/language/fr_FR/index.php
===================================================================
--- /extensions/posted_date_changer/language/fr_FR/index.php	(revision 10356)
+++ /extensions/posted_date_changer/language/fr_FR/index.php	(revision 10356)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/posted_date_changer/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/posted_date_changer/language/fr_FR/plugin.lang.php	(revision 10356)
+++ /extensions/posted_date_changer/language/fr_FR/plugin.lang.php	(revision 10356)
@@ -0,0 +1,5 @@
+<?php
+
+$lang['Change Posted Date'] = 'Changer la date d\'ajout';
+
+?>
Index: /extensions/posted_date_changer/language/index.php
===================================================================
--- /extensions/posted_date_changer/language/index.php	(revision 10356)
+++ /extensions/posted_date_changer/language/index.php	(revision 10356)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/posted_date_changer/main.inc.php
===================================================================
--- /extensions/posted_date_changer/main.inc.php	(revision 10356)
+++ /extensions/posted_date_changer/main.inc.php	(revision 10356)
@@ -0,0 +1,74 @@
+<?php
+/*
+Plugin Name: Posted Date Changer
+Version: auto
+Description: Change the posted date of photos in batch manager.
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=528
+Author: P@t
+Author URI: http://www.gauchon.com
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+add_event_handler('loc_end_element_set_global', 'change_posted_date');
+add_event_handler('element_set_global_action', 'change_posted_date_action', 50, 2);
+
+function change_posted_date()
+{
+  global $template;
+
+  load_language('plugin.lang', dirname(__FILE__).'/');
+
+  $template->set_filename('change_posted_date', dirname(__FILE__).'/change_posted_date.tpl');
+
+  $day = empty($_POST['date_available_day']) ? date('j') : $_POST['date_available_day'];
+  $month = empty($_POST['date_available_month']) ? date('n') : $_POST['date_available_month'];
+  $year = empty($_POST['date_available_year']) ? date('Y') : $_POST['date_available_year'];
+
+  $template->assign(array(
+    'DATE_AVAILABLE_DAY'  => (int)$day,
+    'DATE_AVAILABLE_MONTH'=> (int)$month,
+    'DATE_AVAILABLE_YEAR' => (int)$year,
+    )
+  );
+
+  $template->append('element_set_global_plugins_actions', array(
+    'ID' => 'date_available',
+    'NAME' => l10n('Change Posted Date'),
+    'CONTENT' => $template->parse('change_posted_date', true),
+    )
+  );
+}
+
+function change_posted_date_action($action, $collection)
+{
+  if ($action == 'date_available')
+  {
+    $date_available = sprintf(
+      '%u-%u-%u',
+      $_POST['date_available_year'],
+      $_POST['date_available_month'],
+      $_POST['date_available_day']
+      );
+
+    $datas = array();
+    foreach ($collection as $image_id)
+    {
+      array_push(
+        $datas,
+        array(
+          'id' => $image_id,
+          'date_available' => $date_available
+          )
+        );
+    }
+
+    mass_updates(
+      IMAGES_TABLE,
+      array('primary' => array('id'), 'update' => array('date_available')),
+      $datas
+      );
+  }
+}
+
+?>
