Index: /extensions/floPure/header.tpl
===================================================================
--- /extensions/floPure/header.tpl	(revision 3579)
+++ /extensions/floPure/header.tpl	(revision 3580)
@@ -76,62 +76,15 @@
 if (is_admin())
 {
-	global $template, $user, $page;
+	global $template, $page;
 	$header_msgs = array();
-	include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-	//include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
 	include_once(PHPWG_ROOT_PATH.'template/floPure/tools/version.conf.php');
 	include_once(PHPWG_ROOT_PATH.'template/floPure/tools/floPure.class.php');
 	load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
 	$floPure = new floPure();
-
-    // Retrieve PEM versions
-    $version = PHPWG_VERSION;
-    $versions_to_check = array();
-    $url = PEM_URL . '/api/get_version_list.php?category_id=12&format=php';
-    if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
-    {
-      if (!preg_match('/^\d+\.\d+\.\d+/', $version))
-      {
-        $version = $pem_versions[0]['name'];
-      }
-      $branch = substr($version, 0, strrpos($version, '.'));
-      foreach ($pem_versions as $pem_version)
-      {
-        if (strpos($pem_version['name'], $branch) === 0)
-        {
-          $versions_to_check[] = $pem_version['id'];
-        }
-      }
-    }
-	
-	// Retrieve PEM template infos
-    $url = PEM_URL . '/api/get_revision_list.php?format=php&last_revision_only=true';
-    $url .= '&version=' . implode(',', $versions_to_check);
-    //$url .= '&lang=' . substr($user['language'], 0, 2);
-	$url .= '&extension_include=135';
-    fetchRemote($url, $result);
-      $pem_res = @unserialize($result);
-	  foreach($pem_res as $pem_floPure)
-	  {
-      if (!is_array($pem_floPure))
-      {
-		$template->assign(
-			array(
-			  'erreur' => 'erreur url : '.$url,
-			)
-		  );
-      }
-
-
-		if (!$floPure->floPure_version_compare($floPure_conf['version'], $pem_floPure['revision_name']))
-		{
-			  $header_msgs[]=l10n('floPure_update_needed');
-		}
-	  }
-	if (count($header_msgs) > 0)
+	if( $floPure->is_not_up_to_date($floPure_conf['version'], '135') )
 	{
-	  $template->assign('header_msgs', $header_msgs);
-	  $header_msgs=array();
+		$template->append('header_msgs', l10n('floPure_update_needed'));
 	}
+	$floPure->theme_version_search(PHPWG_ROOT_PATH.'template/floPure/theme');
 
 	
@@ -141,4 +94,8 @@
 {$erreur}
 {$test}
+{$URL}
+	{foreach from=$test_a item=test_b}
+	{$test_b.A} / {$test_b.B}<br />
+	{/foreach}
 
 {if not empty($header_msgs)}
Index: /extensions/floPure/theme/autumn/themeconf.inc.php
===================================================================
--- /extensions/floPure/theme/autumn/themeconf.inc.php	(revision 3579)
+++ /extensions/floPure/theme/autumn/themeconf.inc.php	(revision 3580)
@@ -8,4 +8,6 @@
   'mime_icon_dir' => 'template/floPure/icon/mimetypes/',
   'local_head' => '<!-- no theme specific head content -->',
+  'eid' => '233',
+  'version' => '1.0.0',
 );
 ?>
Index: /extensions/floPure/theme/clear_blue/themeconf.inc.php
===================================================================
--- /extensions/floPure/theme/clear_blue/themeconf.inc.php	(revision 3579)
+++ /extensions/floPure/theme/clear_blue/themeconf.inc.php	(revision 3580)
@@ -8,4 +8,6 @@
   'mime_icon_dir' => 'template/floPure/icon/mimetypes/',
   'local_head' => '<!-- no theme specific head content -->',
+  'eid' => '143',
+  'version' => '2.0.0',
 );
 ?>
Index: /extensions/floPure/tools/floPure.class.php
===================================================================
--- /extensions/floPure/tools/floPure.class.php	(revision 3579)
+++ /extensions/floPure/tools/floPure.class.php	(revision 3580)
@@ -11,4 +11,103 @@
     return version_compare($array[0], $array[1], '>=');
   }
+  function theme_version_search($dir)
+  {
+	global $template, $page;
+	load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
+	$header_msgs = array();
+	$dh = opendir ($dir);
+	while (($file = readdir ($dh)) !== false ) {
+		if ($file !== '.' && $file !== '..' && $file !== '.svn') { // enleve svn
+			$path =$dir.'/'.$file;
+			if (is_dir($path)) {
+				$this->theme_version_search($path);
+			}
+			else
+			{
+			  $page = explode('.', $file);
+			  $nb = count($page);
+			  $nom_fichier = $page[0];
+			  for ($i = 1; $i < $nb-1; $i++){
+			   $nom_fichier .= '.'.$page[$i];
+			  }
+			  if(isset($page[1])){
+			   $ext_fichier = $page[$nb-1];
+			  }
+			  else {
+			   $ext_fichier = '';
+			  }
+			  if($nom_fichier == 'themeconf.inc' and $ext_fichier == 'php') {
+				  include($path);
+				  if (isset($themeconf['eid']))
+				  {
+					  if($this->is_not_up_to_date($themeconf['version'],$themeconf['eid']) )
+					  {
+						  
+						  $msg=l10n('theme_update_needed_1').$themeconf['theme'].l10n('theme_update_needed_2').$themeconf['eid'].l10n('theme_update_needed_3').$themeconf['theme'].l10n('theme_update_needed_4');
+						  $template->append('header_msgs', $msg);
+					  }
+				  }
+					  
+			  }
+			}
+		}
+	}
+	closedir ($dh); // on ferme le repertoire courant
+  }
+  function is_not_up_to_date($v_local, $eid)
+  {
+  
+	global $template, $user, $page;
+	include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+	load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/');
+
+    // Retrieve PEM versions
+    $version = PHPWG_VERSION;
+    $versions_to_check = array();
+    $url = PEM_URL . '/api/get_version_list.php?category_id=12&format=php';
+    if (fetchRemote($url, $result) and $pem_versions = @unserialize($result))
+    {
+      if (!preg_match('/^\d+\.\d+\.\d+/', $version))
+      {
+        $version = $pem_versions[0]['name'];
+      }
+      $branch = substr($version, 0, strrpos($version, '.'));
+      foreach ($pem_versions as $pem_version)
+      {
+        if (strpos($pem_version['name'], $branch) === 0)
+        {
+          $versions_to_check[] = $pem_version['id'];
+        }
+      }
+    }
+	
+	// Retrieve PEM template infos
+    $url = PEM_URL . '/api/get_revision_list.php?format=php&last_revision_only=true';
+    $url .= '&version=' . implode(',', $versions_to_check);
+    //$url .= '&lang=' . substr($user['language'], 0, 2);
+	$url .= '&extension_include='.$eid;
+    fetchRemote($url, $result);
+      $pem_res = @unserialize($result);
+	  foreach($pem_res as $pem_floPure)
+	  {
+      if (!is_array($pem_floPure))
+      {
+		$template->assign(
+			array(
+			  'erreur' => 'erreur url : '.$url,
+			)
+		  );
+      }
+		if (!$this->floPure_version_compare($v_local, $pem_floPure['revision_name']))
+		{
+			  return true;
+		}
+		else
+		{
+			return false;
+		}
+	  }
+  }
+
 }
 ?>
Index: /extensions/floPure/tools/language/en_UK/template.lang.php
===================================================================
--- /extensions/floPure/tools/language/en_UK/template.lang.php	(revision 3579)
+++ /extensions/floPure/tools/language/en_UK/template.lang.php	(revision 3580)
@@ -2,4 +2,7 @@
 
 $lang['floPure_update_needed'] = 'Your version of floPure is not up to date : <a href="http://fr.piwigo.org/ext/extension_view.php?eid=135" title="go to the page of the template" target="_blank" >click here to download the last revision of the template floPure</a>';
-
+	$lang['theme_update_needed_1'] = 'Le thème ';
+	$lang['theme_update_needed_2'] = ' n\'est pas à jour : <a href="http://fr.piwigo.org/ext/extension_view.php?eid=';
+	$lang['theme_update_needed_3'] = '" title="aller à la mise à jour" target="_blank" >cliquez ici pour accéder à la dernière révision du thème ';
+	$lang['theme_update_needed_4'] = '</a>';
 ?>
Index: /extensions/floPure/tools/language/fr_FR/template.lang.php
===================================================================
--- /extensions/floPure/tools/language/fr_FR/template.lang.php	(revision 3579)
+++ /extensions/floPure/tools/language/fr_FR/template.lang.php	(revision 3580)
@@ -2,4 +2,8 @@
 
 $lang['floPure_update_needed'] = 'Votre version de floPure n\'est pas à jour : <a href="http://fr.piwigo.org/ext/extension_view.php?eid=135" title="aller à la mise à jour" target="_blank" >cliquez ici pour accéder à la dernière révision du template floPure</a>';
+	$lang['theme_update_needed_1'] = 'Le thème ';
+	$lang['theme_update_needed_2'] = ' n\'est pas à jour : <a href="http://fr.piwigo.org/ext/extension_view.php?eid=';
+	$lang['theme_update_needed_3'] = '" title="aller à la mise à jour" target="_blank" >cliquez ici pour accéder à la dernière révision du thème ';
+	$lang['theme_update_needed_4'] = '</a>';
 
 ?>
Index: /extensions/floPure/tools/version.conf.php
===================================================================
--- /extensions/floPure/tools/version.conf.php	(revision 3579)
+++ /extensions/floPure/tools/version.conf.php	(revision 3580)
@@ -2,5 +2,5 @@
 $floPure_conf = array(
   'name' => 'floPure',
-  'version' => '2.1.0',
+  'version' => '2.0.1',
 );
 
