Index: /extensions/titlesimple/en_UK/description.txt
===================================================================
--- /extensions/titlesimple/en_UK/description.txt	(revision 7557)
+++ /extensions/titlesimple/en_UK/description.txt	(revision 7557)
@@ -0,0 +1,4 @@
+Replaces the entire contents of the <title> by describing the category or image if it exists.
+Ability to customize the <title> the rest of the site ($conf ['titlesimple'])
+Ability to customize the <title> the homepage ($conf ['titlesimple_accueil'])
+With the plugin, by default there is more than the title of the gallery in the <title>
Index: /extensions/titlesimple/en_UK/index.php
===================================================================
--- /extensions/titlesimple/en_UK/index.php	(revision 7557)
+++ /extensions/titlesimple/en_UK/index.php	(revision 7557)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/titlesimple/fr_FR/description.txt
===================================================================
--- /extensions/titlesimple/fr_FR/description.txt	(revision 7557)
+++ /extensions/titlesimple/fr_FR/description.txt	(revision 7557)
@@ -0,0 +1,4 @@
+Remplace tout le contenue de la balise <title> par la description de la catégorie ou de l'images s'il existe.
+Possibilité de personnaliser la balise <title> du reste du site ($conf['titlesimple'])
+Possibilité de personnaliser la balise <title> de la page d'accueil ($conf['titlesimple_accueil'])
+Avec le plugin, par défaut il n'y a plus que le titre de la galerie dans la balise <title>
Index: /extensions/titlesimple/fr_FR/index.php
===================================================================
--- /extensions/titlesimple/fr_FR/index.php	(revision 7557)
+++ /extensions/titlesimple/fr_FR/index.php	(revision 7557)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/titlesimple/index.php
===================================================================
--- /extensions/titlesimple/index.php	(revision 7557)
+++ /extensions/titlesimple/index.php	(revision 7557)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2009 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/titlesimple/main.inc.php
===================================================================
--- /extensions/titlesimple/main.inc.php	(revision 7557)
+++ /extensions/titlesimple/main.inc.php	(revision 7557)
@@ -0,0 +1,101 @@
+<?php
+/*
+Plugin Name: Title Simple
+Version: auto
+Description: Replace the contents of the title tag
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=459
+Author: ddtddt
+Author URI: http://piwigo.org/
+*/
+
+add_event_handler('loc_begin_page_header', 'Change_Title', 55 );
+add_event_handler('loc_begin_page_header', 'Title', 60 );
+add_event_handler('loc_begin_page_header', 'Titleacc', 65 );
+add_event_handler('loc_begin_page_header', 'Titlecat', 70 );
+add_event_handler('loc_begin_page_header', 'Titleimg', 75 );
+
+function Change_Title()
+ {
+	global $template;
+	$template->set_prefilter('header', 'titleb');
+ }
+
+function titleb($content, &$smarty)
+ {
+  $search = '#<title>.*?</title>#';
+  
+  $replacement = '<title>{$PERSO_TITLE}</title>';
+
+  return preg_replace($search, $replacement, $content);
+ }
+
+function Title()
+ {
+	global $template, $page, $conf;
+
+		$titleindex = & $conf['titlesimple'];		
+		 if (!empty($titleindex))
+			{
+				$template->assign('PERSO_TITLE', $titleindex);
+			}
+		 else
+			{
+				$titleindex = & $conf['gallery_title'];		
+				$template->assign('PERSO_TITLE', $titleindex);
+			}
+
+ } 
+
+function Titleacc()
+ {
+	global $template, $page, $conf;
+	  if (isset($page['section']) and $page['section'] == 'categories' and empty($page['category']['id']))
+		{
+		$titleindex = & $conf['titlesimple_accueil'];		
+		 if (!empty($titleindex))
+			{
+				$template->assign('PERSO_TITLE', $titleindex);
+			}
+		}
+ }
+
+function Titlecat()
+ {
+	global $template, $page;
+		 if (!empty($page['category']['id']) )   
+				{
+    $query = '
+    select id,comment
+      FROM ' . CATEGORIES_TABLE . '
+      WHERE id = \''.$page['category']['id'].'\'
+      ;';
+    $result = pwg_query($query);
+    $row = mysql_fetch_array($result);
+		if (!empty($row['comment']))
+			{
+				$template->assign('PERSO_TITLE', $row['comment']);
+			}
+				}
+ }
+
+function Titleimg()
+ {
+		global $template, $page;
+
+			  if ( !empty($page['image_id']) )   
+				{
+    $query = '
+    select id,comment
+      FROM ' . IMAGES_TABLE . '
+      WHERE id = \''.$page['image_id'].'\'
+      ;';
+    $result = pwg_query($query);
+    $row = mysql_fetch_array($result);
+		if (!empty($row['comment']))
+			{
+				$template->assign('PERSO_TITLE', $row['comment']);
+			}
+				}
+ }
+
+?>
