Index: /extensions/PersoFavicon/en_UK/description.txt
===================================================================
--- /extensions/PersoFavicon/en_UK/description.txt	(revision 7701)
+++ /extensions/PersoFavicon/en_UK/description.txt	(revision 7701)
@@ -0,0 +1,1 @@
+Replace Piwigo fivicon by the favicon in local directory
Index: /extensions/PersoFavicon/en_UK/index.php
===================================================================
--- /extensions/PersoFavicon/en_UK/index.php	(revision 7701)
+++ /extensions/PersoFavicon/en_UK/index.php	(revision 7701)
@@ -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/PersoFavicon/fr_FR/description.txt
===================================================================
--- /extensions/PersoFavicon/fr_FR/description.txt	(revision 7701)
+++ /extensions/PersoFavicon/fr_FR/description.txt	(revision 7701)
@@ -0,0 +1,1 @@
+Remplace la favicon de Piwigo par celle présente dans votre répertoire local
Index: /extensions/PersoFavicon/fr_FR/index.php
===================================================================
--- /extensions/PersoFavicon/fr_FR/index.php	(revision 7701)
+++ /extensions/PersoFavicon/fr_FR/index.php	(revision 7701)
@@ -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/PersoFavicon/index.php
===================================================================
--- /extensions/PersoFavicon/index.php	(revision 7701)
+++ /extensions/PersoFavicon/index.php	(revision 7701)
@@ -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/PersoFavicon/main.inc.php
===================================================================
--- /extensions/PersoFavicon/main.inc.php	(revision 7701)
+++ /extensions/PersoFavicon/main.inc.php	(revision 7701)
@@ -0,0 +1,29 @@
+<?php
+/*
+Plugin Name: Personal Favicon
+Version: auto
+Description: Replace Piwigo fivicon by the favicon in local directory
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=462
+Author: ddtddt
+Author URI: http://piwigo.org/
+*/
+
+add_event_handler('loc_begin_page_header', 'Change_Favicon', 55 );
+
+
+function Change_Favicon()
+ {
+	global $template;
+	$template->set_prefilter('header', 'Favicon');
+ }
+
+function Favicon($content, &$smarty)
+ {
+  $search = '#<link rel="shortcut icon".*?favicon.ico">#';
+  
+  $replacement = '<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}local/favicon.ico">';
+
+  return preg_replace($search, $replacement, $content);
+ }
+
+?>
