Index: /extensions/sobre/admin/admin.inc.php
===================================================================
--- /extensions/sobre/admin/admin.inc.php	(revision 5544)
+++ /extensions/sobre/admin/admin.inc.php	(revision 5544)
@@ -0,0 +1,39 @@
+<?php
+
+load_language('theme.lang', PHPWG_THEMES_PATH.'sobre/');
+
+$options = array(
+  'home',
+  'categories',
+  'picture',
+  'other',
+);
+
+if (isset($_POST['submit']))
+{
+  foreach ($options as $option)
+  {
+    $_POST['sbre'][$option] = empty($_POST['sbre'][$option]) ? false : true;
+  }
+
+  $query = '
+UPDATE '.CONFIG_TABLE.'
+SET value = "'.addslashes(serialize($_POST['sbre'])).'"
+WHERE param = "Sobre"
+;';
+  pwg_query($query);
+
+  array_push($page['infos'], l10n('Information data registered in database'));
+
+  load_conf_from_db();
+}
+
+$template->set_filenames(array(
+    'theme_admin_content' => dirname(__FILE__) . '/admin.tpl'));
+
+$template->assign('sbre', unserialize($conf['Sobre']));
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content');
+
+
+?>
Index: /extensions/sobre/admin/admin.tpl
===================================================================
--- /extensions/sobre/admin/admin.tpl	(revision 5544)
+++ /extensions/sobre/admin/admin.tpl	(revision 5544)
@@ -0,0 +1,30 @@
+<div class="titrePage">
+  <h2>Sobre</h2>
+</div>
+
+<form method="post" class="properties" action="" ENCTYPE="multipart/form-data" name="form" class="properties">
+<div id="configContent">
+  <fieldset id="mainConfCheck">
+    <legend></legend>
+      <ul>
+        <li>
+          <span class="property">{'Display page banner on home page'|@translate}</span>
+          <input type="checkbox" name="sbre[home]" value="true" {if $sbre.home}checked="checked"{/if}>
+        </li>
+        <li>
+          <span class="property">{'Display page banner on categories pages'|@translate}</span>
+          <input type="checkbox" name="sbre[categories]" value="true" {if $sbre.categories}checked="checked"{/if}>
+        </li>
+        <li>
+          <span class="property">{'Display page banner on picture page'|@translate}</span>
+          <input type="checkbox" name="sbre[picture]" value="true" {if $sbre.picture}checked="checked"{/if}>
+        </li>
+        <li>
+          <span class="property">{'Display page banner on other pages'|@translate}</span>
+          <input type="checkbox" name="sbre[other]" value="true" {if $sbre.other}checked="checked"{/if}>
+        </li>
+      </ul>
+  </fieldset>
+</div>
+<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
+</form>
Index: /extensions/sobre/admin/index.php
===================================================================
--- /extensions/sobre/admin/index.php	(revision 5544)
+++ /extensions/sobre/admin/index.php	(revision 5544)
@@ -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/sobre/admin/maintain.inc.php
===================================================================
--- /extensions/sobre/admin/maintain.inc.php	(revision 5544)
+++ /extensions/sobre/admin/maintain.inc.php	(revision 5544)
@@ -0,0 +1,32 @@
+<?php
+
+function theme_activate($id, $version, &$errors)
+{
+  global $prefixeTable, $conf;
+
+  if (!isset($conf['Sobre']))
+  {
+    $config = array(
+      'home'       => true,
+      'categories' => true,
+      'picture'    => false,
+      'other'      => true,
+      );
+      
+    $query = '
+INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
+VALUES ("Sobre" , "'.addslashes(serialize($config)).'" , "Sobre parameters");';
+
+    pwg_query($query);
+  }
+}
+
+function theme_deactivate()
+{
+  global $prefixeTable;
+
+  $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Sobre" LIMIT 1;';
+  pwg_query($query);
+}
+
+?>
Index: /extensions/sobre/language/en_UK/theme.lang.php
===================================================================
--- /extensions/sobre/language/en_UK/theme.lang.php	(revision 5543)
+++ /extensions/sobre/language/en_UK/theme.lang.php	(revision 5544)
@@ -1,5 +1,9 @@
 <?php
 
-$lang['Theme: Black & White'] = 'Thème Black & White By <a href="http://www.julien-moreau.fr/" title="Gotcha">Gotcha</a>.';
+$lang['Display page banner on home page'] = 'Display page banner on home page';
+$lang['Display page banner on categories pages'] = 'Display page banner on categories pages';
+$lang['Display page banner on picture page'] = 'Display page banner on picture page';
+$lang['Display page banner on other pages'] = 'Display page banner on other pages';
+$lang['Theme by'] = 'Thème Black & White By <a href="http://www.julien-moreau.fr/" title="Gotcha">Gotcha</a>.';
 
 ?>
Index: /extensions/sobre/language/fr_FR/theme.lang.php
===================================================================
--- /extensions/sobre/language/fr_FR/theme.lang.php	(revision 5543)
+++ /extensions/sobre/language/fr_FR/theme.lang.php	(revision 5544)
@@ -1,5 +1,8 @@
 <?php
-
-$lang['Theme: Black & White'] = 'Thème Black & White par <a href="http://www.julien-moreau.fr/" title="Gotcha">Gotcha</a>.';
+$lang['Display page banner on home page'] = 'Afficher la bannière sur la page d\'accueil';
+$lang['Display page banner on categories pages'] = 'Afficher la bannière sur la page des catégories';
+$lang['Display page banner on picture page'] = 'Afficher la bannière sur la page des photos';
+$lang['Display page banner on other pages'] = 'Afficher la bannière sur les autres pages';
+$lang['Theme by'] = 'Thème Sobre par <a href="http://www.julien-moreau.fr/" title="Gotcha">Gotcha</a>.';
 
 ?>
Index: /extensions/sobre/local_head.tpl
===================================================================
--- /extensions/sobre/local_head.tpl	(revision 5544)
+++ /extensions/sobre/local_head.tpl	(revision 5544)
@@ -0,0 +1,8 @@
+{if (!$display_sbre_banner)}
+<style type="text/css">
+#{$BODY_ID} #theHeader {ldelim}
+	background: transparent no-repeat center bottom;
+}
+#{$BODY_ID} #theHeader h1 {ldelim} display: none; }
+</style>
+{/if}
Index: /extensions/sobre/theme.css
===================================================================
--- /extensions/sobre/theme.css	(revision 5543)
+++ /extensions/sobre/theme.css	(revision 5544)
@@ -1,2 +1,4 @@
+/* The header */
+#theHeader p {display:none;}
 
 /* text color */
Index: /extensions/sobre/themeconf.inc.php
===================================================================
--- /extensions/sobre/themeconf.inc.php	(revision 5543)
+++ /extensions/sobre/themeconf.inc.php	(revision 5544)
@@ -11,7 +11,32 @@
 
 $themeconf = array(
+  'parent' => 'default',
   'name'  => 'sobre',
-  'parent' => 'default',
+  'local_head'  => 'local_head.tpl',
 );
 
+add_event_handler('loc_begin_page_header', 'set_sbre_header');
+
+function set_sbre_header()
+{
+  global $page, $conf, $template;
+
+  $config = unserialize($conf['Sobre']);
+
+  if (isset($page['body_id']) and $page['body_id'] == 'theCategoryPage')
+  {
+    $header = isset($page['category']) ? $config['categories'] : $config['home'];
+  }
+  elseif (isset($page['body_id']) and $page['body_id'] == 'thePicturePage')
+  {
+    $header = $config['picture'];
+  }
+  else
+  {
+    $header = $config['other'];
+  }
+
+  $template->assign('display_sbre_banner', $header);
+}
+
 ?>
