Index: /extensions/add_index/admin/index.php
===================================================================
--- /extensions/add_index/admin/index.php	(revision 5361)
+++ /extensions/add_index/admin/index.php	(revision 5361)
@@ -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/add_index/admin/main_page.php
===================================================================
--- /extensions/add_index/admin/main_page.php	(revision 5361)
+++ /extensions/add_index/admin/main_page.php	(revision 5361)
@@ -0,0 +1,202 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN)))
+{
+  die('Hacking attempt!');
+}
+
+// +-----------------------------------------------------------------------+
+// | include                                                               |
+// +-----------------------------------------------------------------------+
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
+
+// +-----------------------------------------------------------------------+
+// | Check Access and exit when user status is not ok                      |
+// +-----------------------------------------------------------------------+
+check_status(ACCESS_ADMINISTRATOR);
+
+// +-----------------------------------------------------------------------+
+// | Functions                                                             |
+// +-----------------------------------------------------------------------+
+/**
+ * returns an array containing sub-directories
+ * recursive by default
+ *
+ * directories nammed ".svn" are omitted
+ *
+ * @param string $path
+ * @param bool $recursive
+ * @return array
+ */
+function get_add_index_directories($path, $recursive = true)
+{
+  $dirs = array();
+
+  if (is_dir($path))
+  {
+    if ($contents = opendir($path))
+    {
+      while (($node = readdir($contents)) !== false)
+      {
+        if (
+            is_dir($path.'/'.$node)
+            and $node != '.'
+            and $node != '..'
+            and $node != '.svn'
+           )
+        {
+          array_push($dirs, $path.'/'.$node);
+          if ($recursive)
+          {
+            $dirs = array_merge($dirs, get_add_index_directories($path.'/'.$node));
+          }
+        }
+      }
+    }
+  }
+
+  return $dirs;
+}
+
+// +-----------------------------------------------------------------------+
+// | Main                                                                  |
+// +-----------------------------------------------------------------------+
+// Compute values
+$index_file_src=$conf['add_index_source_directory_path'].$conf['add_index_filename'];
+$overwrite_file=isset($_GET['overwrite']);
+$site_id = (isset($_GET['site_id']) and is_numeric($_GET['site_id']) 
+            ? $_GET['site_id'] 
+            : 0);
+
+// Init values
+$add_index_results = array();
+$count_copy = 0;
+$count_skip = 0;
+$count_error = 0;
+
+if (@file_exists($index_file_src))
+{
+  $query = '
+select
+  galleries_url
+from
+  '.SITES_TABLE;
+  if (!empty($site_id))
+  {
+    $query .= '
+where
+  id = '.$site_id;
+  }
+    $query .= '
+order by
+ id';
+
+  $result = pwg_query($query);
+
+  if (mysql_num_rows($result) > 0)
+  {
+    while (list($galleries_url) = mysql_fetch_row($result))
+    {
+      if (!url_is_remote($galleries_url))
+      {
+        //echo $galleries_url.'<BR>';
+        foreach (get_add_index_directories($galleries_url) as $dir_galleries)
+        {
+          $file_dest = str_replace('//', '/', $dir_galleries.'/'.$conf['add_index_filename']);
+          if ($overwrite_file or !@file_exists($file_dest))
+          {
+            if (copy($index_file_src, $file_dest))
+            {
+              array_push($add_index_results,
+                sprintf(l10n('add_index_file_copied'), $file_dest));
+              $count_copy++;
+            }
+            else
+            {
+              array_push($page['errors'],
+                sprintf(l10n('add_index_file_not_copied'), $file_dest));
+              $count_error++;
+            }
+          }
+          else
+          {
+            $count_skip++;
+          }
+        }
+      }
+      else
+      {
+        if (!empty($site_id))
+        {
+          array_push($page['errors'],
+            sprintf(l10n('add_index_not_local_site'), 
+              $galleries_url, $site_id));
+        }
+      }
+    }
+  }
+
+  // Show always an result, defaut (0 copy, $count_copy == $count_skip == 0)
+  if (($count_copy != 0) or ($count_skip == 0))
+  {
+    array_push($add_index_results,
+      l10n_dec('add_index_nb_copied_file', 'add_index_nb_copied_files',
+        $count_copy));
+  }
+  if ($count_skip != 0)
+  {
+    array_push($add_index_results,
+      l10n_dec('add_index_nb_skipped_file', 'add_index_nb_skipped_files',
+        $count_skip));
+  }
+  if ($count_error != 0)
+  {
+    array_push($page['errors'],
+      l10n_dec('add_index_nb_not_copied_file', 'add_index_nb_not_copied_files',
+        $count_error));
+  }
+}
+else
+{
+  array_push($page['errors'],
+    sprintf(l10n('add_index_src_file_dont_exists'), $index_file_src));
+}
+
+// +-----------------------------------------------------------------------+
+// | template initialization                                               |
+// +-----------------------------------------------------------------------+
+$template->set_filenames(array('main_page' => dirname(__FILE__).'/main_page.tpl'));
+
+if (count($add_index_results) != 0)
+{
+  $template->assign('add_index_results', $add_index_results);
+}
+
+// +-----------------------------------------------------------------------+
+// | Sending html code                                                     |
+// +-----------------------------------------------------------------------+
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'main_page');
+
+?>
Index: /extensions/add_index/admin/main_page.tpl
===================================================================
--- /extensions/add_index/admin/main_page.tpl	(revision 5361)
+++ /extensions/add_index/admin/main_page.tpl	(revision 5361)
@@ -0,0 +1,14 @@
+
+<div class="titrePage">
+  <h2>{'Add_Index'|@translate}</h2>
+</div>
+
+{if isset($add_index_results)}
+<div>
+  <ul>
+    {foreach from=$add_index_results item=result}
+    <li>{$result}</li>
+    {/foreach}
+  </ul>
+</div>
+{/if}
Index: /extensions/add_index/index.php
===================================================================
--- /extensions/add_index/index.php	(revision 5361)
+++ /extensions/add_index/index.php	(revision 5361)
@@ -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/add_index/language/de_DE/description.txt
===================================================================
--- /extensions/add_index/language/de_DE/description.txt	(revision 5361)
+++ /extensions/add_index/language/de_DE/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Fügt eine Datei index.php in jeden Unterordner der Galerie hinzu.
Index: /extensions/add_index/language/de_DE/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/de_DE/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/de_DE/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funktionalität von AddIndex-Plugin:</p>
+<ul>
+  <li>
+    <strong>Hinzufügen und überschreiben "Index"-Dateien für alle lokalen Websites:</strong>
+    Überschreiben und kopieren die Datei ./include/index.php auf alle Unter-Verzeichnisse von lokalen Websites Gallerie .
+  </li>
+<ul>
Index: /extensions/add_index/language/de_DE/help/index.php
===================================================================
--- /extensions/add_index/language/de_DE/help/index.php	(revision 5361)
+++ /extensions/add_index/language/de_DE/help/index.php	(revision 5361)
@@ -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/add_index/language/de_DE/help/site_manager.html
===================================================================
--- /extensions/add_index/language/de_DE/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/de_DE/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funktionalität von AddIndex-Plugin:</p>
+<ul>
+  <li>
+    <strong>Hinzufügen "Index"-Dateien für die lokale Website:</strong>
+    Kopieren die Datei ./include/index.php auf alle Unter-Verzeichnisse von ausgewählten lokalen Website.
+  </li>
+<ul>
Index: /extensions/add_index/language/de_DE/index.php
===================================================================
--- /extensions/add_index/language/de_DE/index.php	(revision 5361)
+++ /extensions/add_index/language/de_DE/index.php	(revision 5361)
@@ -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/add_index/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/add_index/language/de_DE/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/de_DE/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Hinzufügen von "Index"-Dateien in jeden Ordner';
+$lang['Advanced_Add_Index'] = 'Hinzufügen und überschreiben von "Index"-Dateien in allen Ordnern';
+$lang['Manager_Add_Index'] = 'Hinzufügen von "Index"-Dateien';
+
+$lang['add_index_file_copied'] = '%s kopiert';
+$lang['add_index_file_not_copied'] = '%s nicht kopiert';
+$lang['add_index_not_local_site'] = '%s [%d] ist eine Remote-Website. Sie ist kompatibel mit den hinzugefügten "Index"-Dateien.';
+$lang['add_index_nb_copied_file'] = '%d Datei kopiert';
+$lang['add_index_nb_copied_files'] = '%d Dateien kopiert';
+$lang['add_index_nb_skipped_file'] = '%d Datei übersprungen';
+$lang['add_index_nb_skipped_files'] = '%d Dateien übersprungen';
+$lang['add_index_nb_not_copied_file'] = '%d Datei nicht kopiert';
+$lang['add_index_nb_not_copied_files'] = '%d Dateien nicht kopiert';
+$lang['add_index_src_file_dont_exists'] = 'Quelldatei %s ist nicht vorhanden, kann nicht kopiert werden';
+
+?>
Index: /extensions/add_index/language/en_UK/description.txt
===================================================================
--- /extensions/add_index/language/en_UK/description.txt	(revision 5361)
+++ /extensions/add_index/language/en_UK/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Add index.php file on all sub-directories of local galleries pictures.
Index: /extensions/add_index/language/en_UK/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/en_UK/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/en_UK/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Functionality of AddIndex plugin:</p>
+<ul>
+  <li>
+    <strong>Add and overwrite "index" files for all local sites:</strong>
+    Overwrite copy the file ./include/index.php to all sub-directories of gallerie local sites.
+  </li>
+<ul>
Index: /extensions/add_index/language/en_UK/help/index.php
===================================================================
--- /extensions/add_index/language/en_UK/help/index.php	(revision 5361)
+++ /extensions/add_index/language/en_UK/help/index.php	(revision 5361)
@@ -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/add_index/language/en_UK/help/site_manager.html
===================================================================
--- /extensions/add_index/language/en_UK/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/en_UK/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Functionality of AddIndex plugin:</p>
+<ul>
+  <li>
+    <strong>Add "index" files for local site:</strong>
+    Copy the file ./include/index.php to all sub-directories of selected local site.
+  </li>
+<ul>
Index: /extensions/add_index/language/en_UK/index.php
===================================================================
--- /extensions/add_index/language/en_UK/index.php	(revision 5361)
+++ /extensions/add_index/language/en_UK/index.php	(revision 5361)
@@ -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/add_index/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/add_index/language/en_UK/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/en_UK/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Add "index" files';
+$lang['Advanced_Add_Index'] = 'Add and overwrite "index" files for all local sites';
+$lang['Manager_Add_Index'] = 'add "index"';
+
+$lang['add_index_file_copied'] = '%s copied';
+$lang['add_index_file_not_copied'] = '%s not copied';
+$lang['add_index_not_local_site'] = '%s [%d] is a remote site, it\`s compatible with add "index" files';
+$lang['add_index_nb_copied_file'] = '%d file copied';
+$lang['add_index_nb_copied_files'] = '%d files copied';
+$lang['add_index_nb_skipped_file'] = '%d file skipped';
+$lang['add_index_nb_skipped_files'] = '%d files skipped';
+$lang['add_index_nb_not_copied_file'] = '%d file not copied';
+$lang['add_index_nb_not_copied_files'] = '%d files not copied';
+$lang['add_index_src_file_dont_exists'] = 'Source file %s don\'t esists, cannot duplicate this file';
+
+?>
Index: /extensions/add_index/language/es_ES/description.txt
===================================================================
--- /extensions/add_index/language/es_ES/description.txt	(revision 5361)
+++ /extensions/add_index/language/es_ES/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Agrega index.php on sub-directorios de galerías de fotos local.
Index: /extensions/add_index/language/es_ES/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/es_ES/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/es_ES/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funcionalidad del plugin AddIndex:</p>
+<ul>
+  <li>
+    <strong>Adición y aplastamiento de los ficheros "index" para todos los sitios locales :</strong>
+    Copia con aplastamiento el fichero ./include/index.php en todos los subficheros de las galerías de los sitios locales.
+  </li>
+</ul>
Index: /extensions/add_index/language/es_ES/help/index.php
===================================================================
--- /extensions/add_index/language/es_ES/help/index.php	(revision 5361)
+++ /extensions/add_index/language/es_ES/help/index.php	(revision 5361)
@@ -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/add_index/language/es_ES/help/site_manager.html
===================================================================
--- /extensions/add_index/language/es_ES/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/es_ES/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funcionalidad del plugin AddIndex:</p>
+<ul>
+  <li>
+    <strong>Adición de los ficheros "index" para el sitio local:</strong>
+    Copia el fichero ./include/index.php en todos los subficheros del sitio seleccionado.
+  </li>
+</ul>
Index: /extensions/add_index/language/es_ES/index.php
===================================================================
--- /extensions/add_index/language/es_ES/index.php	(revision 5361)
+++ /extensions/add_index/language/es_ES/index.php	(revision 5361)
@@ -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/add_index/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/add_index/language/es_ES/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/es_ES/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Adición de los ficheros "index"';
+$lang['Advanced_Add_Index'] = 'Adición y aplastamiento de los ficheros "index" para todos los sitios locales';
+$lang['Manager_Add_Index'] = 'adición de "index"';
+
+$lang['add_index_file_copied'] = '%s copiado';
+$lang['add_index_file_not_copied'] = '%s no copiado';
+$lang['add_index_not_local_site'] = '%s [%d] es un sitio distante, no es compatible con la adición de ficheros "index"';
+$lang['add_index_nb_copied_file'] = '%d fichero copiado';
+$lang['add_index_nb_copied_files'] = '%d ficheros copiados';
+$lang['add_index_nb_skipped_file'] = '%d fichero que debe tratarse';
+$lang['add_index_nb_skipped_files'] = '%d ficheros que deben tratarse';
+$lang['add_index_nb_not_copied_file'] = '%d fichero no copiado';
+$lang['add_index_nb_not_copied_files'] = '%d ficheros no copiados';
+$lang['add_index_src_file_dont_exists'] = 'El fichero fuente no existe, la duplicación de este fichero no es posible';
+
+?>
Index: /extensions/add_index/language/fr_FR/description.txt
===================================================================
--- /extensions/add_index/language/fr_FR/description.txt	(revision 5361)
+++ /extensions/add_index/language/fr_FR/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Ajoute le fichier index.php sur les sous-répertoires de galeries d'images locales.
Index: /extensions/add_index/language/fr_FR/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/fr_FR/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/fr_FR/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Fonctionnalité du plugin AddIndex:</p>
+<ul>
+  <li>
+    <strong>Ajout et écrasement des fichiers "index" pour tous les sites locaux :</strong>
+    Copie avec écrasement le fichier ./include/index.php dans tous les sous-répertoires des galeries des sites locaux.
+  </li>
+</ul>
Index: /extensions/add_index/language/fr_FR/help/index.php
===================================================================
--- /extensions/add_index/language/fr_FR/help/index.php	(revision 5361)
+++ /extensions/add_index/language/fr_FR/help/index.php	(revision 5361)
@@ -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/add_index/language/fr_FR/help/site_manager.html
===================================================================
--- /extensions/add_index/language/fr_FR/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/fr_FR/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Fonctionnalité du plugin AddIndex:</p>
+<ul>
+  <li>
+    <strong>Ajout des fichiers "index" pour le site local :</strong>
+    Copie le fichier ./include/index.php dans tous les sous-répertoires du site sélectionné.
+  </li>
+</ul>
Index: /extensions/add_index/language/fr_FR/index.php
===================================================================
--- /extensions/add_index/language/fr_FR/index.php	(revision 5361)
+++ /extensions/add_index/language/fr_FR/index.php	(revision 5361)
@@ -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/add_index/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/add_index/language/fr_FR/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/fr_FR/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Ajout des fichiers "index"';
+$lang['Advanced_Add_Index'] = 'Ajout et écrasement des fichiers "index" pour tous les sites locaux';
+$lang['Manager_Add_Index'] = 'ajout des "index"';
+
+$lang['add_index_file_copied'] = '%s copié';
+$lang['add_index_file_not_copied'] = '%s non copié';
+$lang['add_index_not_local_site'] = '%s [%d] est un site distant, ce n\'est pas compatible avec l\'ajout de fichiers "index"';
+$lang['add_index_nb_copied_file'] = '%d fichier copié';
+$lang['add_index_nb_copied_files'] = '%d fichiers copiés';
+$lang['add_index_nb_skipped_file'] = '%d fichier à ne pas traiter';
+$lang['add_index_nb_skipped_files'] = '%d fichiers à ne pas traiter';
+$lang['add_index_nb_not_copied_file'] = '%d fichier non copié';
+$lang['add_index_nb_not_copied_files'] = '%d fichiers non copiés';
+$lang['add_index_src_file_dont_exists'] = 'Le fichier source n\'existe pas, la duplication de ce fichier n\'est pas possible';
+
+?>
Index: /extensions/add_index/language/hu_HU/description.txt
===================================================================
--- /extensions/add_index/language/hu_HU/description.txt	(revision 5361)
+++ /extensions/add_index/language/hu_HU/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Hozzáad index.php fájl az összes alkönyvtár a helyi galériák képek.
Index: /extensions/add_index/language/hu_HU/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/hu_HU/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/hu_HU/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>AddIndex bövítmény feladata:</p>
+<ul>
+  <li>
+    <strong>"index" fájl hozzáadása (vagy módosítása) a helyi oldalakhoz:</strong>
+    Felülírja vagy átmásolja az ./include/index.php fájlt az összes alkönyvtárba (Galéria helyi oldalak).
+  </li>
+<ul>
Index: /extensions/add_index/language/hu_HU/help/index.php
===================================================================
--- /extensions/add_index/language/hu_HU/help/index.php	(revision 5361)
+++ /extensions/add_index/language/hu_HU/help/index.php	(revision 5361)
@@ -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/add_index/language/hu_HU/help/site_manager.html
===================================================================
--- /extensions/add_index/language/hu_HU/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/hu_HU/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>AddIndex bövítmény feladata:</p>
+<ul>
+  <li>
+    <strong>"index" fájl hozzáadása helyi oldalakhoz:</strong>
+    Bemásolja az ./include/index.php fájlt az összes alkönyvtárba helyi honlapon.
+  </li>
+<ul>
Index: /extensions/add_index/language/hu_HU/index.php
===================================================================
--- /extensions/add_index/language/hu_HU/index.php	(revision 5361)
+++ /extensions/add_index/language/hu_HU/index.php	(revision 5361)
@@ -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/add_index/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/add_index/language/hu_HU/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/hu_HU/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Add "index" fájl';
+$lang['Advanced_Add_Index'] = 'Hozzáadja vagy felülírja az "index" fájlt a helyi oldalakon';
+$lang['Manager_Add_Index'] = 'add "index"';
+
+$lang['add_index_file_copied'] = '%s másolva';
+$lang['add_index_file_not_copied'] = '%s nincs másolva';
+$lang['add_index_not_local_site'] = '%s [%d] egy távoli fájl, nem kompatibilis add "index" fájl';
+$lang['add_index_nb_copied_file'] = '%d fájl másolva';
+$lang['add_index_nb_copied_files'] = '%d fájl másolva';
+$lang['add_index_nb_skipped_file'] = '%d fájl kihagyva';
+$lang['add_index_nb_skipped_files'] = '%d fájl kihagyva';
+$lang['add_index_nb_not_copied_file'] = '%d fájl nincs másolva';
+$lang['add_index_nb_not_copied_files'] = '%d fájl nincs másolva';
+$lang['add_index_src_file_dont_exists'] = 'A forrás fájl %s nem létezik, nem lehet másolni a fájlt';
+
+?>
Index: /extensions/add_index/language/index.php
===================================================================
--- /extensions/add_index/language/index.php	(revision 5361)
+++ /extensions/add_index/language/index.php	(revision 5361)
@@ -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/add_index/language/it_IT/description.txt
===================================================================
--- /extensions/add_index/language/it_IT/description.txt	(revision 5361)
+++ /extensions/add_index/language/it_IT/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Aggiunge il file index.php sulle sottodirectory della galleria d'immagini locale.
Index: /extensions/add_index/language/it_IT/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/it_IT/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/it_IT/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funzionalità del plugin AddIndex:</p>
+<ul>
+  <li>
+    <strong>Aggiunge e sovrascrive i files "index" per tutti i siti locali:</strong>
+    Copia sovrascrivendo se necessario il file ./include/index.php in tutte le directory dei siti locali.
+  </li>
+<ul>
Index: /extensions/add_index/language/it_IT/help/index.php
===================================================================
--- /extensions/add_index/language/it_IT/help/index.php	(revision 5361)
+++ /extensions/add_index/language/it_IT/help/index.php	(revision 5361)
@@ -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/add_index/language/it_IT/help/site_manager.html
===================================================================
--- /extensions/add_index/language/it_IT/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/it_IT/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funzionalità del plugin AddIndex:</p>
+<ul>
+  <li>
+    <strong>Aggiunge i files "index" per il sito locale:</strong>
+    Copia il file ./include/index.php in tutte le directory del sito selezzionato.
+  </li>
+<ul>
Index: /extensions/add_index/language/it_IT/index.php
===================================================================
--- /extensions/add_index/language/it_IT/index.php	(revision 5361)
+++ /extensions/add_index/language/it_IT/index.php	(revision 5361)
@@ -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/add_index/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/add_index/language/it_IT/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/it_IT/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Aggiunge dei files "index"';
+$lang['Advanced_Add_Index'] = 'Aggiunge e sovrascrive i files "index" per tutti i siti locali';
+$lang['Manager_Add_Index'] = 'Aggiunta dei "index"';
+
+$lang['add_index_file_copied'] = '%s copiati';
+$lang['add_index_file_not_copied'] = '%s non copiati';
+$lang['add_index_not_local_site'] = '%s [%d] è un sito remoto, non è compatibile con l\'aggiunta dei files "index"';
+$lang['add_index_nb_copied_file'] = '%d file copiato';
+$lang['add_index_nb_copied_files'] = '%d files copiati';
+$lang['add_index_nb_skipped_file'] = '%d file non trattato';
+$lang['add_index_nb_skipped_files'] = '%d files non trattati';
+$lang['add_index_nb_not_copied_file'] = '%d file non copiato';
+$lang['add_index_nb_not_copied_files'] = '%d files non copiati';
+$lang['add_index_src_file_dont_exists'] = 'Il file sorgente non esiste, impossibile dupplicarlo';
+
+?>
Index: /extensions/add_index/language/pl_PL/description.txt
===================================================================
--- /extensions/add_index/language/pl_PL/description.txt	(revision 5361)
+++ /extensions/add_index/language/pl_PL/description.txt	(revision 5361)
@@ -0,0 +1,1 @@
+Dodaje plik index.php do wszystkich podkatalogów bieżącej galerii zdjęć.
Index: /extensions/add_index/language/pl_PL/help/advanced_feature.html
===================================================================
--- /extensions/add_index/language/pl_PL/help/advanced_feature.html	(revision 5361)
+++ /extensions/add_index/language/pl_PL/help/advanced_feature.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funkcjonalnoœæ wtyczki AddIndex:</p>
+<ul>
+  <li>
+    <strong>Aby dodaæ i nadpisaæ pliki "index" dla wszystkich stron lokalnych:</strong>
+    Nadpisz kopiê pliku ./include/index.php we wszystkich podkatalogach galerii lokalnej.
+  </li>
+<ul>
Index: /extensions/add_index/language/pl_PL/help/index.php
===================================================================
--- /extensions/add_index/language/pl_PL/help/index.php	(revision 5361)
+++ /extensions/add_index/language/pl_PL/help/index.php	(revision 5361)
@@ -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/add_index/language/pl_PL/help/site_manager.html
===================================================================
--- /extensions/add_index/language/pl_PL/help/site_manager.html	(revision 5361)
+++ /extensions/add_index/language/pl_PL/help/site_manager.html	(revision 5361)
@@ -0,0 +1,7 @@
+<p>Funkcjonalność wtyczki AddIndex:</p>
+<ul>
+  <li>
+    <strong>Aby dodać pliki "index" dla strony lokalnej:</strong>
+    Skopiuj plik ./include/index.php do wszystkich podkatalogów wybranej strony.
+  </li>
+<ul>
Index: /extensions/add_index/language/pl_PL/index.php
===================================================================
--- /extensions/add_index/language/pl_PL/index.php	(revision 5361)
+++ /extensions/add_index/language/pl_PL/index.php	(revision 5361)
@@ -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/add_index/language/pl_PL/plugin.lang.php
===================================================================
--- /extensions/add_index/language/pl_PL/plugin.lang.php	(revision 5361)
+++ /extensions/add_index/language/pl_PL/plugin.lang.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+$lang['Add_Index'] = 'Dodaj pliki "index"';
+$lang['Advanced_Add_Index'] = 'Dodaj i nadpisz wszystkie pliki "index" we wszystkich lokalizacjach';
+$lang['Manager_Add_Index'] = 'dodaj "index"';
+
+$lang['add_index_file_copied'] = 'Skopiowano %s';
+$lang['add_index_file_not_copied'] = 'Nie skopiowano %s';
+$lang['add_index_not_local_site'] = '%s [%d] jest zdalną stroną i jest kompatybilna z plikami "index"';
+$lang['add_index_nb_copied_file'] = 'Skopiowano plik %d';
+$lang['add_index_nb_copied_files'] = 'Skopiowano %d plików';
+$lang['add_index_nb_skipped_file'] = 'Plik %d został pominięty';
+$lang['add_index_nb_skipped_files'] = 'Pominięto %d plików';
+$lang['add_index_nb_not_copied_file'] = 'Plik %d nie został skopiowany';
+$lang['add_index_nb_not_copied_files'] = 'Nie skopiowano %d plików';
+$lang['add_index_src_file_dont_exists'] = 'Plik źródłowy nie istnieje %s \- nie można powielić tego pliku';
+
+?>
Index: /extensions/add_index/main.admin.inc.php
===================================================================
--- /extensions/add_index/main.admin.inc.php	(revision 5361)
+++ /extensions/add_index/main.admin.inc.php	(revision 5361)
@@ -0,0 +1,93 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN)))
+{
+  die('Hacking attempt!');
+}
+
+class AdminAddIndex extends AddIndex
+{
+  function load_params()
+  {
+    global $conf;
+
+    // Name of index file (index.php or index.htm or index.html)
+    if (!isset($conf['add_index_filename']))
+    {
+      $conf['add_index_filename'] = 'index.php';
+    }
+    // Name of index file (index.php or index.htm or index.html)
+    if (!isset($conf['add_index_source_directory_path']))
+    {
+      // Name of the directoty use in order to copy index file
+      $conf['add_index_source_directory_path'] = PHPWG_ROOT_PATH.'include/';
+    }
+  }
+
+  function loading_lang()
+  {
+    load_language('plugin.lang', $this->path);
+  }
+
+  function get_admin_advanced_features_links($advanced_features)
+  {
+    array_push($advanced_features,
+      array
+      (
+        'CAPTION' => l10n('Advanced_Add_Index'),
+        'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/main_page.php').'&amp;overwrite'
+      ));
+
+    return $advanced_features;
+  }
+
+  function get_admins_site_links($site_manager_plugin_links, $site_id, $is_remote)
+  {
+    if (!$is_remote)
+    {
+      array_push($site_manager_plugin_links,
+        array
+        (
+          'U_HREF' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/main_page.php').'&amp;site_id='.$site_id,
+          'U_CAPTION' => l10n('Manager_Add_Index'),
+          'U_HINT' => l10n('Add_Index')
+        ));
+    }
+
+    return $site_manager_plugin_links;
+  }
+}
+
+// Create object
+$add_index = new AdminAddIndex();
+
+// Load Add Index parameters
+$add_index->load_params();
+
+// Add events
+add_event_handler('loading_lang', array(&$add_index, 'loading_lang'));
+add_event_handler('get_admin_advanced_features_links', array(&$add_index, 'get_admin_advanced_features_links'));
+add_event_handler('get_admins_site_links', array(&$add_index, 'get_admins_site_links'), EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
+
+?>
Index: /extensions/add_index/main.base.inc.php
===================================================================
--- /extensions/add_index/main.base.inc.php	(revision 5361)
+++ /extensions/add_index/main.base.inc.php	(revision 5361)
@@ -0,0 +1,39 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+  die('Hacking attempt!');
+}
+
+class AddIndex
+{
+  var $path;
+  
+  function AddIndex()
+  {
+    $this->path = dirname(__FILE__).'/';
+  }
+}
+
+?>
Index: /extensions/add_index/main.inc.php
===================================================================
--- /extensions/add_index/main.inc.php	(revision 5361)
+++ /extensions/add_index/main.inc.php	(revision 5361)
@@ -0,0 +1,53 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 Piwigo 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Add Index
+Version: 2.0.2
+Description: Add index.php file on all sub-directories of local galleries pictures.
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=284
+Author: Piwigo team
+Author URI: http://piwigo.org
+*/
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+  die('Hacking attempt!');
+}
+
+if (in_array(script_basename(), array('popuphelp', 'admin')))
+{
+  if (defined('IN_ADMIN') and IN_ADMIN)
+  {
+    include_once(dirname(__FILE__).'/'.'main.base.inc.php');
+    include_once(dirname(__FILE__).'/'.'main.admin.inc.php');
+  }
+  else
+  {
+    include_once(dirname(__FILE__).'/'.'main.base.inc.php');
+    include_once(dirname(__FILE__).'/'.'main.normal.inc.php');
+  }
+  set_plugin_data($plugin['id'], $add_index);
+}
+
+?>
Index: /extensions/add_index/main.normal.inc.php
===================================================================
--- /extensions/add_index/main.normal.inc.php	(revision 5361)
+++ /extensions/add_index/main.normal.inc.php	(revision 5361)
@@ -0,0 +1,60 @@
+<?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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH'))
+{
+  die('Hacking attempt!');
+}
+
+class NormalAddIndex extends AddIndex
+{
+  function get_popup_help_content($popup_help_content, $page)
+  {
+    if (in_array($page, array('advanced_feature', 'site_manager')))
+    {
+      $help_content =
+        load_language('help/'.$page.'.html', $this->path, array('return'=>true) );
+    }
+    else
+    {
+      $help_content = false;
+    }
+
+    if ($help_content == false)
+    {
+      return $popup_help_content;
+    }
+    else
+    {
+      return $popup_help_content.$help_content;
+    }
+  }
+}
+
+// Create object
+$add_index = new NormalAddIndex();
+
+// Add events
+add_event_handler('get_popup_help_content', array(&$add_index, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+
+?>
