Index: /trunk/admin/cat_list.php
===================================================================
--- /trunk/admin/cat_list.php	(revision 959)
+++ /trunk/admin/cat_list.php	(revision 960)
@@ -299,6 +299,7 @@
 foreach ($categories as $category)
 {
-  $images_folder = PHPWG_ROOT_PATH.'template/';
-  $images_folder.= $user['template'].'/admin/images';
+  // TODO : not used anymore ?
+  //$images_folder = PHPWG_ROOT_PATH.'template/';
+  //$images_folder.= $user['template'].'/admin/images';
   
   $base_url = PHPWG_ROOT_PATH.'admin.php?page=';
Index: /trunk/admin/configuration.php
===================================================================
--- /trunk/admin/configuration.php	(revision 959)
+++ /trunk/admin/configuration.php	(revision 960)
@@ -244,5 +244,5 @@
     $blockname = 'default.template_option';
 
-    foreach (get_templates() as $pwg_template)
+    foreach (get_themes() as $pwg_template)
     {
       if (isset($_POST['submit']))
Index: /trunk/admin/user_list.php
===================================================================
--- /trunk/admin/user_list.php	(revision 959)
+++ /trunk/admin/user_list.php	(revision 960)
@@ -585,5 +585,5 @@
 $blockname = 'template_option';
 
-foreach (get_templates() as $pwg_template)
+foreach (get_themes() as $pwg_template)
 {
   if (isset($_POST['pref_submit']))
Index: /trunk/include/common.inc.php
===================================================================
--- /trunk/include/common.inc.php	(revision 959)
+++ /trunk/include/common.inc.php	(revision 960)
@@ -221,4 +221,10 @@
 }
 
+// include template/theme configuration
+list($user['template'], $user['theme']) = explode('/', $user['template']);
+// TODO : replace initial $user['template'] by $user['layout']
+
+include(PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/'.$user['theme'].'/themeconf.inc.php');
+
 // template instance
 $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']);
Index: /trunk/include/functions.inc.php
===================================================================
--- /trunk/include/functions.inc.php	(revision 959)
+++ /trunk/include/functions.inc.php	(revision 960)
@@ -534,9 +534,23 @@
 
 /**
- * returns available templates
+ * returns available templates/themes
  */
 function get_templates()
 {
-  return get_dirs(PHPWG_ROOT_PATH.'template');
+  return get_dirs(PHPWG_ROOT_PATH.'theme');
+}
+function get_themes()
+{
+  $themes = array();
+
+  foreach (get_dirs(PHPWG_ROOT_PATH.'template') as $template)
+  {
+    foreach (get_dirs(PHPWG_ROOT_PATH.'template/'.$template.'/theme') as $theme)
+    {
+      array_push($themes, $template.'/'.$theme);
+    }
+  }
+
+  return $themes;
 }
 
@@ -566,6 +580,5 @@
   else
   {
-    $src = PHPWG_ROOT_PATH;
-    $src.= 'template/'.$user['template'].'/mimetypes/';
+    $src = get_themeconf('mime_icon_dir');
     $src.= strtolower(get_extension($path)).'.png';
   }
@@ -727,3 +740,17 @@
   return isset($lang[$key]) ? $lang[$key] : $key;
 }
+
+/**
+ * returns the corresponding value from $themeconf if existing. Else, the key is
+ * returned
+ *
+ * @param string key
+ * @return string
+ */
+function get_themeconf($key)
+{
+  global $themeconf;
+
+  return $themeconf[$key];
+}
 ?>
Index: /trunk/include/functions_html.inc.php
===================================================================
--- /trunk/include/functions_html.inc.php	(revision 959)
+++ /trunk/include/functions_html.inc.php	(revision 960)
@@ -44,6 +44,5 @@
   if ( $diff < $user['recent_period'] * $day_in_seconds )
   {
-    $icon_url = './template/'.$user['template'].'/theme/';
-    $icon_url.= 'recent.png';
+    $icon_url = get_themeconf('icon_dir').'/recent.png';
     $title .= $user['recent_period'];
     $title .=  '&nbsp;'.$lang['days'];
Index: /trunk/include/template.php
===================================================================
--- /trunk/include/template.php	(revision 959)
+++ /trunk/include/template.php	(revision 960)
@@ -331,4 +331,6 @@
       // PWG specific : communication between template and $lang
       $code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code);
+      // PWG specific : expand themeconf.inc.php variables
+      $code = preg_replace('/\{themeconf:([^}]+)\}/e', "get_themeconf('$1')", $code);
             
       // replace \ with \\ and then ' with \'.
Index: /trunk/picture.php
===================================================================
--- /trunk/picture.php	(revision 959)
+++ /trunk/picture.php	(revision 960)
@@ -197,5 +197,5 @@
   $file_wo_ext = get_filename_wo_extension($row['file']);
 
-  $icon = PHPWG_ROOT_PATH.'template/'.$user['template'].'/mimetypes/';
+  $icon = get_themeconf('mime_icon_dir');
   $icon.= strtolower(get_extension($row['file'])).'.png';
 
@@ -610,5 +610,5 @@
       'favorite',
       array(
-        'FAVORITE_IMG' => PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/favorite.png',
+        'FAVORITE_IMG' => get_themeconf('icon_dir').'/favorite.png',
         'FAVORITE_HINT' =>$lang['add_favorites_hint'],
         'FAVORITE_ALT' =>$lang['add_favorites_alt'],
@@ -625,5 +625,5 @@
       'favorite',
       array(
-        'FAVORITE_IMG' => PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/del_favorite.png',
+        'FAVORITE_IMG' => get_themeconf('icon_dir').'/del_favorite.png',
         'FAVORITE_HINT' =>$lang['del_favorites_hint'],
         'FAVORITE_ALT' =>$lang['del_favorites_alt'],
Index: /trunk/profile.php
===================================================================
--- /trunk/profile.php	(revision 959)
+++ /trunk/profile.php	(revision 960)
@@ -206,5 +206,5 @@
 $blockname = 'template_option';
 
-foreach (get_templates() as $pwg_template)
+foreach (get_themes() as $pwg_template)
 {
   if (isset($_POST['submit']))
Index: /trunk/template-common/default-layout.css
===================================================================
--- /trunk/template-common/default-layout.css	(revision 960)
+++ /trunk/template-common/default-layout.css	(revision 960)
@@ -0,0 +1,33 @@
+/* $Id$ */
+
+/* Set the width of the menubar for the galery */
+#menubar {
+  width: 18em;
+}
+#content {
+  margin-left: 20em;	/* = #menubar width + 2em */
+}
+
+/* Set the width of the menubar for the admin section */
+BODY#theAdminPage #menubar {
+  width: 12em;
+}
+BODY#theAdminPage #content {
+  margin-left: 14em;
+}
+
+/* Set some sizes according to your maximum thumbnail width adn height */
+#content UL.thumbnails SPAN, #content UL.thumbnails SPAN.wrap2 A {
+  width: 140px;			/* max thumbnail width + 2px */
+}
+#content UL.thumbnails SPAN.wrap2 {
+  height: 140px;		/* max thumbnail height + 2px */
+}
+#content DIV.comment BLOCKQUOTE {
+  margin-left: 150px;		/*maximum thumbnail width + ~10px */
+}
+
+/* display/hide thumbnails legend */
+#content UL.thumbnails SPAN.thumbLegend {
+  display: block;		/* display: none; if you don't want legend */
+}
Index: /trunk/template/yoga/about.tpl
===================================================================
--- /trunk/template/yoga/about.tpl	(revision 959)
+++ /trunk/template/yoga/about.tpl	(revision 960)
@@ -1,7 +1,10 @@
 <div id="content">
-
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li>
+        <a href="{U_HOME}" title="{lang:return to homepage}">
+          <img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/>
+        </a>
+      </li>
     </ul>
     <h2>{lang:About}</h2>
Index: /trunk/template/yoga/category.tpl
===================================================================
--- /trunk/template/yoga/category.tpl	(revision 959)
+++ /trunk/template/yoga/category.tpl	(revision 960)
@@ -105,8 +105,8 @@
       <li>&nbsp;</li>
       <!-- BEGIN caddie -->
-      <li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="./template/yoga/theme/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>
+      <li><a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a></li>
       <!-- END caddie -->
       <!-- BEGIN edit -->
-      <li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="./template/yoga/theme/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
+      <li><a href="{edit.URL}" title="{lang:edit category informations}"><img src="{themeconf:icon_dir}/category_edit.png" class="button" alt="{lang:edit}"/></a></li>
       <!-- END edit -->
     </ul>
Index: /trunk/template/yoga/comments.tpl
===================================================================
--- /trunk/template/yoga/comments.tpl	(revision 959)
+++ /trunk/template/yoga/comments.tpl	(revision 960)
@@ -4,5 +4,5 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:User comments}</h2>
Index: /trunk/template/yoga/content.css
===================================================================
--- /trunk/template/yoga/content.css	(revision 959)
+++ /trunk/template/yoga/content.css	(revision 960)
@@ -1,10 +1,6 @@
 /* $Id$ */
 #content {
-    margin-left: 24em;
     margin-right: 1em;
     margin-bottom: 1em; /* when it's longer than menu bar */
-}
-BODY#theAdminPage #content {
-    margin-left: 14em;
 }
 
@@ -22,31 +18,16 @@
 }
 
-#content H2 {
+#content H2, H3 {
     margin-bottom: 1ex;
 }
 
 #content H3 {
-    margin-bottom: 1ex;
+    text-align: center;
 }
 
 /* Thumbnails customization */
-#content UL.thumbnails SPAN, #content UL.thumbnails SPAN.wrap2 A {
-  width: 140px;			/* max thumbnail width + 2px */
-}
-#content UL.thumbnails SPAN.wrap2 {
-  height: 140px;		/* max thumbnail height + 2px */
-}
-#content UL.thumbnails SPAN.wrap2 {
-  border: 1px solid #aaaaaa;	/* thumbnails border color and style */
-  -moz-border-radius: 4px;	/* round corners with Geko */
-  border-radius: 4px 4px;	/* round corners with CSS3 compliant browsers */
-}
-#content UL.thumbnails SPAN.wrap2:hover {
-  border-color: yellow;		/* thumbnails border color when mouse cursor is over it */
-}
 #content UL.thumbnails SPAN.thumbLegend {
   font-size: 80%;		/* font size */
   height: 3em;			/* max legend height (don't set auto to be Geko friendly)*/
-  display: block;		/* display: none; if you don't want legend */
   overflow: hidden;		/* oversized legend is clipped */
 }
@@ -180,5 +161,7 @@
 
 #content DIV.comment BLOCKQUOTE {
-  margin: 1em 0.5em 0.5em 150px; /* margin-left corresponds to maximum thumbnail width + ~10px */
+  margin-top: 1em;
+  margin-right: 0.5em; 
+  margin-bottom: 150px; 
   padding: 0.5em;
 }
Index: /trunk/template/yoga/default-colors.css
===================================================================
--- /trunk/template/yoga/default-colors.css	(revision 959)
+++ /trunk/template/yoga/default-colors.css	(revision 960)
@@ -1,33 +1,5 @@
-BODY {
-	color:#696969; /* dimgray */
-    /*color:#111111;*/
-    background: #ffffff;
-}
+/* $Id$ */
 
-H1 {
-    color: #696969;
-    background: transparent;
-}
-
-H2 {
-    color: #696969;
-    background: #d3d3d3;
-}
-
-H3 {
-    color: #696969;
-    background: #ffffff;
-}
-
-A {
-    color: #005e89;
-    background: transparent;
-}
-
-A:hover {
-    color: #858460;
-}
-
-
+/* others */
 .pleaseNote {
     background: #9c9c9c;
@@ -37,41 +9,6 @@
 }
 
-#imageHeaderBar {
-    background: #d3d3d3;
-}
-#imageToolBar {
-    background: #eeeeee;
-    border: 1px solid #d3d3d3;
-}
 #imageToolBar * {
     background: inherit;
-}
-
-#imageToolBar A, #imageToolBar A:hover {
-    border-bottom: none;
-}
-#imageToolBar A:hover {
-    background: #d3d3d3;
-}
-
-#theImage IMG {
-    border: 3px solid #d3d3d3;
-}
-A.navThumb, A.navThumb:hover {
-    border-bottom: none;
-}
-
-
-#content {
-    border: 1px solid #d3d3d3;
-    background:#eeeeee;
-}
-
-#content H3 {
-    text-align: center;
-}
-
-#content UL.thumbnail IMG {
-    border: 1px solid #a0a0a0;
 }
 
@@ -84,41 +21,8 @@
 }
 
-
-#menubar DL {
-    border: 1px solid #d3d3d3;
-    background: #eeeeee;
-}
-
-#menubar DT {
-    color: #696969;
-    background: #d3d3d3;
-}
-
-#menubar DD {
-    background:#eeeeee;
-}
-
-/* User comments */
-#content DIV.comment {
-  border: 1px solid gray;
-}
-
-#content DIV.comment  A.illustration IMG {
-  border: 1px solid gray;
-}
-
-#comments DIV.comment BLOCKQUOTE {
-    border: 1px solid #d3d3d3;
-    border-left: 2px solid #696969;
-}
-
 /* Tables & forms */
-.throw {
-	background-color:white;
-}
 input, select, textarea {
 	color:black;
-	background-color: lightgrey;
-        border: 1px solid gray;
+	background-color: #d3d3d3;	/* lightgrey */
 }
 
@@ -130,5 +34,5 @@
   margin: 5px;
   border: 1px solid red;
-  background-image: url(admin/images/errors.png);
+  background-image: url(../../template-common/icons/admin/errors.png);
   background-repeat: no-repeat;
   background-position: top right;
@@ -147,5 +51,5 @@
   text-align: left;
   background-color: palegreen;
-  background-image: url(admin/images/infos.png);
+  background-image: url(../../template-common/icons/admin/infos.png);
   background-repeat: no-repeat;
   background-position: top right;
@@ -153,5 +57,4 @@
   font-weight: bold;
   margin: 5px;
-  border:1px solid gray;
   padding: 10px 50px 10px 10px;
 }
@@ -160,6 +63,2 @@
   font-style: italic;
 }
-
-FIELDSET {
-  border: 1px solid gray;
-}
Index: /trunk/template/yoga/default-layout.css
===================================================================
--- /trunk/template/yoga/default-layout.css	(revision 959)
+++ /trunk/template/yoga/default-layout.css	(revision 960)
@@ -4,4 +4,5 @@
 @import "image.css";
 @import "popuphelp.css";
+@import "../../template-common/default-layout.css";
 
 /* $Id$ */
Index: /trunk/template/yoga/header.tpl
===================================================================
--- /trunk/template/yoga/header.tpl	(revision 959)
+++ /trunk/template/yoga/header.tpl	(revision 960)
@@ -5,17 +5,11 @@
 <meta http-equiv="Content-Type" content="text/html; charset={CONTENT_ENCODING}">
 <!-- BIG FIX ME BELOW (paths) -->
-<link rel="stylesheet" type="text/css" href="template/yoga/default-layout.css">
-<link rel="stylesheet" type="text/css" href="template/yoga/default-colors.css">
+<link rel="stylesheet" type="text/css" href="template/{themeconf:template}/default-layout.css">
 <!-- the next css is used to fix khtml (Konqueror/Safari) issue
-the "text/nonsense" prevents geko based browsers to load it -->
-<link rel="stylesheet" type="text/nonsense" href="template/yoga/fix-khtml.css">
-<link rel="stylesheet" type="text/css" media="print" href="template/yoga/print.css">
-<!-- AN OTHER FIX ME -->
-<style type="text/css">
-.notDoneYet {
-        background: yellow;
-        color: red;
-}
-</style>
+the "text/nonsense" prevents gecko based browsers to load it -->
+<link rel="stylesheet" type="text/nonsense" href="template/{themeconf:template}/fix-khtml.css">
+<link rel="stylesheet" type="text/css" media="print" href="template/{themeconf:template}/print.css">
+<link rel="stylesheet" type="text/css" href="template/{themeconf:template}/default-colors.css">
+<link rel="stylesheet" type="text/css" href="template/{themeconf:template}/theme/{themeconf:theme}/theme.css">
 <!-- BEGIN refresh -->
 <meta http-equiv="refresh" content="{REFRESH_TIME};url={U_REFRESH}">
Index: /trunk/template/yoga/identification.tpl
===================================================================
--- /trunk/template/yoga/identification.tpl	(revision 959)
+++ /trunk/template/yoga/identification.tpl	(revision 960)
@@ -4,7 +4,7 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="template/yoga/theme/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
-      <li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="./template/yoga/theme/register.png" class="button" alt="{lang:register}"/></a></li>
-      <li><a href="{U_HOME}" title="{lang:Go through the gallery as a visitor}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_LOST_PASSWORD}" title="{lang:Forgot your password?}"><img src="{themeconf:icon_dir}/lost_password.png" class="button" alt="{lang:Forgot your password?}"></a></li>
+      <li><a href="{U_REGISTER}" title="{lang:Create a new account}"><img src="{themeconf:icon_dir}/register.png" class="button" alt="{lang:register}"/></a></li>
+      <li><a href="{U_HOME}" title="{lang:Go through the gallery as a visitor}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:Identification}</h2>
@@ -49,6 +49,6 @@
  
   <p>
-    <a href="{U_REGISTER}"><img src="template/yoga/theme/register.png" class="button" alt=""> {L_REGISTER}</a>
-    <a href="{U_LOST_PASSWORD}"><img src="template/yoga/theme/lost_password.png" class="button" alt=""> {lang:Forgot your password?}</a>
+    <a href="{U_REGISTER}"><img src="{themeconf:icon_dir}/register.png" class="button" alt=""> {L_REGISTER}</a>
+    <a href="{U_LOST_PASSWORD}"><img src="{themeconf:icon_dir}/lost_password.png" class="button" alt=""> {lang:Forgot your password?}</a>
   </p>
 
Index: /trunk/template/yoga/menubar.css
===================================================================
--- /trunk/template/yoga/menubar.css	(revision 959)
+++ /trunk/template/yoga/menubar.css	(revision 960)
@@ -1,9 +1,4 @@
 #menubar {
-    /* Do not put font-size: 90% here for it makes it harder to have correct
-       margin for contentarea */
     float: left;
-    left: 0px;
-
-    width: 22em;
     margin: 0 0 10px 1em;
     padding: 0;
@@ -12,8 +7,4 @@
     display: inline;
     text-align: left; /* follow-up of the "be nice to IE5" rule */
-}
-
-BODY#theAdminPage #menubar {
-    width: 12em;
 }
 
@@ -25,9 +16,7 @@
 #menubar DT {
     font-weight: bold; /* default for h2 */
-
     margin: 0;
     padding: 5px 10px;
     font-size: 120%;
-
     text-align: center;
 }
Index: /trunk/template/yoga/notification.tpl
===================================================================
--- /trunk/template/yoga/notification.tpl	(revision 959)
+++ /trunk/template/yoga/notification.tpl	(revision 960)
@@ -3,5 +3,5 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:Notification}</h2>
Index: /trunk/template/yoga/password.tpl
===================================================================
--- /trunk/template/yoga/password.tpl	(revision 959)
+++ /trunk/template/yoga/password.tpl	(revision 960)
@@ -4,5 +4,5 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_HOME}" title="{lang:Go through the gallery as a visitor}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_HOME}" title="{lang:Go through the gallery as a visitor}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:Password forgotten}</h2>
Index: /trunk/template/yoga/picture.tpl
===================================================================
--- /trunk/template/yoga/picture.tpl	(revision 959)
+++ /trunk/template/yoga/picture.tpl	(revision 960)
@@ -15,8 +15,8 @@
 
 <div class="randomButtons">
-  <a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}"><img src="template/yoga/theme/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a>
-  <a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="template/yoga/theme/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a>
+  <a href="{U_SLIDESHOW}" title="{L_SLIDESHOW}"><img src="{themeconf:icon_dir}/slideshow.png" class="button" alt="{L_SLIDESHOW}"></a>
+  <a href="{U_METADATA}" title="{L_PICTURE_METADATA}"><img src="{themeconf:icon_dir}/metadata.png" class="button" alt="{L_PICTURE_METADATA}"></a>
 <!-- BEGIN representative -->
-  <a href="{representative.URL}" title="{lang:set as category representative}"><img src="template/yoga/theme/representative.png" class="button" alt="{lang:representative}" /></a>
+  <a href="{representative.URL}" title="{lang:set as category representative}"><img src="{themeconf:icon_dir}/representative.png" class="button" alt="{lang:representative}" /></a>
 <!-- END representative -->
 <!-- BEGIN favorite -->
@@ -24,11 +24,11 @@
 <!-- END favorite -->
 <!-- BEGIN download -->
-  <a href="{download.U_DOWNLOAD}" title="{L_DOWNLOAD}"><img src="template/yoga/theme/save.png" class="button" alt="{L_DOWNLOAD}"></a>
+  <a href="{download.U_DOWNLOAD}" title="{L_DOWNLOAD}"><img src="{themeconf:icon_dir}/save.png" class="button" alt="{L_DOWNLOAD}"></a>
 <!-- END download -->
 <!-- BEGIN admin -->
-  <a href="{U_ADMIN}" title="{L_ADMIN}"><img src="template/yoga/theme/preferences.png" class="button" alt="{L_ADMIN}"></a>
+  <a href="{U_ADMIN}" title="{L_ADMIN}"><img src="{themeconf:icon_dir}/preferences.png" class="button" alt="{L_ADMIN}"></a>
 <!-- END admin -->
 <!-- BEGIN caddie -->
-  <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="./template/yoga/theme/caddie_add.png" class="button" alt="{lang:caddie}"/></a>
+  <a href="{caddie.URL}" title="{lang:add to caddie}"><img src="{themeconf:icon_dir}/caddie_add.png" class="button" alt="{lang:caddie}"/></a>
 <!-- END caddie -->
 </div>
@@ -36,9 +36,9 @@
 <div class="navButtons">
 <!-- BEGIN next -->
-  <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}"><img src="template/yoga/theme/right.png" class="button" alt="next"></a>
+  <a class="navButton next" href="{next.U_IMG}" title="{L_NEXT_IMG}{next.TITLE_IMG}"><img src="{themeconf:icon_dir}/right.png" class="button" alt="next"></a>
 <!-- END next -->
-  <a class="navButton up" href="{U_UP}" title="{L_UP_HINT}"><img src="template/yoga/theme/up.png" class="button" alt="{L_UP_ALT}"></a>
+  <a class="navButton up" href="{U_UP}" title="{L_UP_HINT}"><img src="{themeconf:icon_dir}/up.png" class="button" alt="{L_UP_ALT}"></a>
 <!-- BEGIN previous -->
-  <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}"><img src="template/yoga/theme/left.png" class="button" alt="previous"></a>
+  <a class="navButton prev" href="{previous.U_IMG}" title="{L_PREV_IMG}{previous.TITLE_IMG}"><img src="{themeconf:icon_dir}/left.png" class="button" alt="previous"></a>
 <!-- END previous -->
 </div>
@@ -165,5 +165,5 @@
   <p class="userCommentDelete">
   <a href="{comments.comment.delete.U_COMMENT_DELETE}" title="{L_DELETE_COMMENT}">
-    <img src="template/yoga/theme/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{L_DELETE}]"/>
+    <img src="{themeconf:icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{L_DELETE}]"/>
   </a>
   </p>
Index: /trunk/template/yoga/popuphelp.tpl
===================================================================
--- /trunk/template/yoga/popuphelp.tpl	(revision 959)
+++ /trunk/template/yoga/popuphelp.tpl	(revision 960)
@@ -3,3 +3,3 @@
 </div> <!-- content -->
 
-<p id="pageBottomActions"><a href="#" onclick="window.close();" title="{lang:Close this window}"><img src="template/yoga/theme/exit.png" class="button" alt="close"></a></p>
+<p id="pageBottomActions"><a href="#" onclick="window.close();" title="{lang:Close this window}"><img src="{themeconf:icon_dir}/exit.png" class="button" alt="close"></a></p>
Index: /trunk/template/yoga/profile.tpl
===================================================================
--- /trunk/template/yoga/profile.tpl	(revision 959)
+++ /trunk/template/yoga/profile.tpl	(revision 960)
@@ -13,5 +13,5 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_RETURN}" title="{lang:return to homepage}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_RETURN}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:Profile}</h2>
Index: /trunk/template/yoga/register.tpl
===================================================================
--- /trunk/template/yoga/register.tpl	(revision 959)
+++ /trunk/template/yoga/register.tpl	(revision 960)
@@ -5,5 +5,5 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:Registration}</h2>
Index: /trunk/template/yoga/search.tpl
===================================================================
--- /trunk/template/yoga/search.tpl	(revision 959)
+++ /trunk/template/yoga/search.tpl	(revision 960)
@@ -3,6 +3,6 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="template/yoga/theme/help.png" class="button" alt="(?)"></a></li>
-      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="./template/yoga/theme/home.png" class="button" alt="{lang:home}"/></a></li>
+      <li><a href="{U_HELP}" onclick="popuphelp(this.href); return false;" title="{lang:Help}"><img src="{themeconf:icon_dir}/help.png" class="button" alt="(?)"></a></li>
+      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="{themeconf:icon_dir}/home.png" class="button" alt="{lang:home}"/></a></li>
     </ul>
     <h2>{lang:Search}</h2>
Index: /trunk/template/yoga/theme/clear/theme.css
===================================================================
--- /trunk/template/yoga/theme/clear/theme.css	(revision 960)
+++ /trunk/template/yoga/theme/clear/theme.css	(revision 960)
@@ -0,0 +1,78 @@
+/* $Id$ */
+
+/* text color */
+BODY, H1, H2, H3, DT {
+  color:#696969;	/* dimgray */
+}
+
+/* backgrounds */
+BODY, H3, .throw {
+  background-color: #ffffff;	/* white */
+}
+
+H2, #menubar DT, #imageHeaderBar, #imageToolBar A:hover {
+  background-color: #d3d3d3;
+}
+
+#menubar DL, #content, #imageToolBar {
+  background-color: #eeeeee;
+}
+
+/* borders */
+#menubar DL, #content, #imageToolBar, #theImage IMG,
+#comments DIV.comment BLOCKQUOTE {
+  border: 1px solid #d3d3d3;
+}
+
+#theImage IMG {
+  border-width: 3px;
+}
+
+#content UL.thumbnail IMG {
+    border: 1px solid #a0a0a0;
+}
+
+FIELDSET, INPUT, SELECT, TEXTAREA,
+#content DIV.comment  A.illustration IMG, #infos {
+  border: 1px solid gray;
+}
+
+#comments DIV.comment BLOCKQUOTE {
+  border-left: 2px solid #696969;
+}
+
+#content UL.thumbnails SPAN.wrap2 {
+  border: 1px solid #aaaaaa;	/* thumbnails border color and style */
+  -moz-border-radius: 4px;	/* round corners with Geko */
+  border-radius: 4px 4px;	/* round corners with CSS3 compliant browsers */
+}
+#content UL.thumbnails SPAN.wrap2:hover {
+  border-color: yellow;		/* thumbnails border color when mouse cursor is over it */
+}
+
+/* links */
+A {
+    color: #005e89;
+    background: transparent;
+}
+
+A:hover {
+    color: #858460;
+}
+
+#imageToolBar A, #imageToolBar A:hover {
+    border-bottom: none;
+}
+
+A.navThumb, A.navThumb:hover {
+    border-bottom: none;
+}
+
+/* others */
+.pleaseNote {
+    background: #9c9c9c;
+    color: #ffff99;
+    padding: 1ex;
+    font-weight: bold;
+}
+
Index: /trunk/template/yoga/theme/clear/themeconf.inc.php
===================================================================
--- /trunk/template/yoga/theme/clear/themeconf.inc.php	(revision 960)
+++ /trunk/template/yoga/theme/clear/themeconf.inc.php	(revision 960)
@@ -0,0 +1,9 @@
+<?php
+$themeconf = array(
+  'template' => 'yoga',
+  'theme' => 'clear',
+  'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon',
+  'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin',
+  'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mymetypes'
+);
+?>
Index: /trunk/template/yoga/theme/dark/theme.css
===================================================================
--- /trunk/template/yoga/theme/dark/theme.css	(revision 960)
+++ /trunk/template/yoga/theme/dark/theme.css	(revision 960)
@@ -0,0 +1,109 @@
+/* $Id$ */
+
+/* text color */
+BODY, H1, H3, DT {
+  color:#e0e0e0;
+}
+
+H2, #menubar DT, .throw {
+    color: #fff48e;
+}
+
+#content .navigationBar {
+    color: #aaaaaa;
+}
+#content .pageNumberSelected {
+    color: #000000;
+}
+
+/* backgrounds */
+BODY {
+  background-color: #000000;
+}
+
+H2, H3, #menubar DT, #imageHeaderBar, #imageToolBar A:hover, .throw {
+  background-color: #3f3f3f;
+}
+
+#menubar DL, #content, #imageToolBar {
+  background-color: #5f5f5f;
+}
+
+H2, #menubar DT, .throw  {
+    background-image: url(images/tableh1_bg.png);
+}
+
+#imageHeaderBar {
+    background-image: url(images/tableh2_bg.png);
+    background-repeat: repeat-x;
+    background-position: center;
+}
+
+/* borders */
+#menubar DL, #content, #imageToolBar, #theImage IMG,
+#comments DIV.comment BLOCKQUOTE {
+  border: 1px solid #000000;
+}
+
+#theImage IMG {
+  border-width: 3px;
+}
+
+#content UL.thumbnail IMG {
+    border: 1px solid #a0a0a0;
+}
+
+FIELDSET, INPUT, SELECT, TEXTAREA,
+#content DIV.comment  A.illustration IMG, #infos {
+  border: 1px solid gray;
+}
+
+#comments DIV.comment BLOCKQUOTE {
+  border-left: 2px solid #696969;
+}
+
+#content UL.thumbnails SPAN.wrap2 {
+  border: 1px solid #aaaaaa;	/* thumbnails border color and style */
+  -moz-border-radius: 4px;	/* round corners with Geko */
+  border-radius: 4px 4px;	/* round corners with CSS3 compliant browsers */
+}
+#content UL.thumbnails SPAN.wrap2:hover {
+  border-color: yellow;		/* thumbnails border color when mouse cursor is over it */
+}
+
+H2, #menubar DT, #imageHeaderBar {
+    border-bottom: 1px solid #000000;
+}
+
+/* links */
+A {
+    color: #FFFFFF;
+}
+
+A:hover {
+    color: #FFF48E;
+}
+
+#imageToolBar A, #imageToolBar A:hover {
+    border-bottom: none;
+}
+
+A.navThumb, A.navThumb:hover {
+    border-bottom: none;
+}
+
+/* others */
+.pleaseNote {
+    background: #9c9c9c;
+    color: #ffff99;
+    padding: 1ex;
+    font-weight: bold;
+}
+#the_page {
+    border: 1px solid #e0e0e0;
+    padding-top: 5px;	
+    padding-bottom:30px;
+    text-align:center;
+    display:block;
+    background:#3f3f3f;
+}
Index: /trunk/template/yoga/theme/dark/themeconf.inc.php
===================================================================
--- /trunk/template/yoga/theme/dark/themeconf.inc.php	(revision 960)
+++ /trunk/template/yoga/theme/dark/themeconf.inc.php	(revision 960)
@@ -0,0 +1,9 @@
+<?php
+$themeconf = array(
+  'template' => 'yoga',
+  'theme' => 'dark',
+  'icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon',
+  'admin_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/admin',
+  'mime_icon_dir' => PHPWG_ROOT_PATH.'template/yoga/icon/mymetypes'
+);
+?>
