Index: /extensions/LLGBO2/main.inc.php
===================================================================
--- /extensions/LLGBO2/main.inc.php	(revision 6703)
+++ /extensions/LLGBO2/main.inc.php	(revision 6704)
@@ -2,7 +2,7 @@
 /*
 Plugin Name: Look_like_gbo2 
-Version:  2.1.f
+Version:  2.1.g
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
-Author: Ex-Ftb  
+Author: Gbo 
 Author URI: http://www.photos.bouteyron.fr/
 Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery 
@@ -13,5 +13,7 @@
   2.1.d bug Css with IE6 & IE8 
   2.1.e fix bug   $conf['question_mark_in_urls'] 
-  2.1.f fix bug   with metatda and video */
+  2.1.f fix bug   with metatda and video  
+  2.1.g fix bug   with metatda  + improve header message
+   */
 
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
@@ -20,5 +22,5 @@
 global $conf; 
 
-define ('LLGBO_INFO_VERSION','2.1.f');
+define ('LLGBO_INFO_VERSION','2.1.g');
 if (!defined('LLGBO_PATH'))
 {define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');}
@@ -110,5 +112,5 @@
 	 }
  if ($no_header == true)
-{$template->append('head_elements',"\n".' <STYLE type="text/css">#theHeader{display: none}</STYLE>');}
+{$template->append('head_elements','<!-- llgbo -->'."\n".'<STYLE type="text/css">'."\n".'#theHeader{display: none}'."\n".'header_msgs {position:static}'."\n".'</STYLE>');}
 }	
  
@@ -124,6 +126,7 @@
 $ThePicture = $template->get_template_vars('current'); 
 // 2.1.f fix notice with video
+
 if ($ThePicture['is_picture'] <> 1 )  
-	{  $lang['Show file metadata'] =  'No Metadata';
+	{ $lang['Show file metadata'] =  'No Metadata'; 
 		return;}
 // ---------------------------		
@@ -133,20 +136,26 @@
 	 If ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  // exif under bt
 		{  $metadata = $template->get_template_vars('metadata');
-		if(is_array($metadata))
-		{foreach($metadata[0] as $cle =>$tableau)
-			 { if(is_array($tableau))
-			 {   foreach($tableau as $cle=>$valeur)
-				{   $swt= $swt.$cle.' : '.$valeur.'<br>';
-					$meta = 1;}
-			}	}
-			if  ( pwg_get_session_var('show_metadata') == 1 )
-			{  	$lang['Show file metadata'] =  'EXIF Metadata';
-  			    if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}}
-			
-			$template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
-			$template->Clear_assign('metadata');
-			
-	} // hide original metadata
-		}
+		if (is_array($metadata)) 
+		  { 
+		  if (isset($metadata[0]) and is_array($metadata[0]))
+			{ 
+			foreach($metadata[0] as $cle =>$tableau)
+				 { if(is_array($tableau))
+				 {   foreach($tableau as $cle=>$valeur)
+					{   $swt= $swt.$cle.' : '.$valeur.'<br>';
+						$meta = 1;}
+				}	}
+				if  ( pwg_get_session_var('show_metadata') == 1 )
+				{  	$lang['Show file metadata'] =  'EXIF Metadata';
+				     if (isset($metadata[0] ['TITLE'])) // advanced meta
+					{$lang['Show file metadata']	= $metadata [0] ['TITLE'];}
+					if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}
+				}
+				
+				$template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
+				 $template->Clear_assign('metadata');// hide original metadata	
+			} 
+		  }  
+		} 
 		
 } 
@@ -218,5 +227,5 @@
 			{ $linkcss = '<link rel="stylesheet" type="text/css" href="'.$llgbo_path;
 			$template->append('head_elements',$linkcss.'css/gbolook.css">');
-		  	 $template->append('head_elements',"\n".' <STYLE type="text/css">#theImage{margin:auto;overflow: hidden;}</STYLE>');
+		  	 $template->append('head_elements',"\n".'<STYLE type="text/css">#theImage{margin:auto;overflow: hidden;}</STYLE>');
 			  }
 //----------------------------------------------------	 
@@ -276,9 +285,5 @@
 		If ($conf['LLGBO_SETTINGS'] [9]  == 'true' )
 			{$template->assign('HDHREF', ' href="'.$ThePicture['high_url'].'"'.' title= " HD --> '.$ThePicture['name'].'"');
-			  $template->append('head_elements', "\n".'<script type="text/javascript">
-				window.onload = function() {
-			Shadowbox.setup(document.getElementById("prevnext").getElementsByTagName("area")[3]);
-					}
-			</script>'  );} 
+			  $template->append('head_elements', "\n".'<script type="text/javascript">'."\n".'window.onload = function() {'."\n".'Shadowbox.setup(document.getElementById("prevnext").getElementsByTagName("area")[3]);}'."\n".'</script>'  );} 
            else
            {$template->assign('HDHREF','title="'.$lang['Click on the picture to see it in high definition'].'" href="javascript:phpWGOpenWindow('."'".$ThePicture['high_url']."','".$uuid."','"."scrollbars=yes,toolbar=no,status=no,resizable=yes'".')"');}		   
