Index: extensions/LLGBO2/main.inc.php
===================================================================
--- extensions/LLGBO2/main.inc.php	(revision 4869)
+++ extensions/LLGBO2/main.inc.php	(revision 6234)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Look_like_gbo2 
-Version:  2.0.O
+Version:  2.1.a
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
 Author: Ex-Ftb  
@@ -8,18 +8,6 @@
 Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery 
 Add a border around  picture ......
- */
- /* 2.0.d  fix notice when HD picture is desactivate*/
- /* 2.0.e  fix notice with redirec.tpl     */ 
- /* 2.0.f  Tooltip and frame  define by plugin vs Css*/
- /* 2.0.g  always display metadata + maintain IPTC */ 
- /* 2.0.h new languages PL, ES, HU */ 
- /* 2.0.i Manage tab for tooltip and frame settings */
- /* 2.0.J  add sample display and fix bug in admin with chrome */
- /* 2.0.K fix warning du to language file */
-  /* 2.0.L  Avoid problem with Gally */
-  /* 2.0.M	 -  fix bug on image alt  attribute 
-		- fix bug on active -> erase the paramater when it's not mandatory. */
-  /* 2.0.N -  fix bug  no navigation on picture, whit out frame  */ 
-  /* 2.0.O -  compliant with extended description  */ 
+  2.1.a compliant 2.1 Piwigo */
+
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 /* création d'une instance de la classe   */
@@ -27,5 +15,5 @@
 global $conf; 
 
-define ('LLGBO_INFO_VERSION','2.0.O');
+define ('LLGBO_INFO_VERSION','2.1.a');
 if (!defined('LLGBO_PATH'))
 {define('LLGBO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');}
@@ -35,5 +23,4 @@
  $conf['LLGBO_FRAME'] = explode (",",$conf['LLGBOFRAME']); 
  $conf['LLGBO_HEADER'] = explode (",",$conf['LLGBOHEADER']);   
- 
 /////////////////////////////////////////////////////
 /*  PLUGIN CLASS  */
@@ -58,5 +45,6 @@
 	If ($conf['LLGBO_SETTINGS'][10]  == 'true' )  //always display metadata
 	{if ( pwg_get_session_var('show_metadata') == null )
-		{  pwg_set_session_var('show_metadata', 1 );}}
+		{  pwg_set_session_var('show_metadata', 1 );
+		 }}
 }
 //------------------------------------------------------------- 
@@ -110,8 +98,7 @@
 {$template->append('head_elements',"\n".' <STYLE type="text/css">#theHeader{display: none}</STYLE>');}
 }	
-//
-If ($conf['LLGBO_SETTINGS'] [9]  == 'true' )
-{$template->append('head_elements',"\n".' <STYLE type="text/css">.navThumb{display: none} </STYLE>');}
  
+
+  
 }  // end header 
  
@@ -120,5 +107,6 @@
 //-------------------------------------------------------------	
 function  DisplayGboLook()
-{ global $template,$conf;
+{ global $template,$conf,$lang;
+    $meta = "";
 	$u_metadata = $template->get_template_vars('U_METADATA');
 	$swt =   ' swttips="';	
@@ -128,9 +116,15 @@
 		{foreach($metadata[0] as $cle =>$tableau)
 			 { if(is_array($tableau))
-			 {foreach($tableau as $cle=>$valeur)
-			{   $swt= $swt.$cle.' : '.$valeur.'<br>'; }
+			 {   foreach($tableau as $cle=>$valeur)
+				{   $swt= $swt.$cle.' : '.$valeur.'<br>';
+					$meta = 1;}
 			}	}
+			if  ( pwg_get_session_var('show_metadata') == 1 )
+			{  	$lang['picture_show_metadata'] =  'EXIF Metadata';
+  			    if ($meta  != 1 ) {$lang['picture_show_metadata'] =  'No Metadata';}}
+			
 			$template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
-	 	$template->Clear_assign('metadata');
+			$template->Clear_assign('metadata');
+			
 	} // hide original metadata
 		}
@@ -186,6 +180,7 @@
  	}	
 ///// YOGA or SIMPLE /////////////////////	
-$themeconf = $template->get_template_vars('themeconf');
-$tpl_name =  $themeconf['template'];
+$tpl_name = "";
+$currenttheme = $template->get_template_vars('themes');
+$tpl_id =  $currenttheme[0]['id'];
 /////////////////////////////////////////////
 // AN OTHER PLUGIN IS WORKING -> GO BACK
@@ -196,6 +191,9 @@
 /////////////////////////////////////////////////////////////////	
 if ($ThePicture['is_picture'] <> 1 )  	{  return $content;  ; }	
-//
-if ( strtoupper($tpl_name) == 'GALLY') { 
+//echo  $tpl_id;
+
+$template->assign('GALLY',''); 
+if (( strpos(strtoupper($tpl_id) , 'GALLY') === true) )
+ { 	$template->assign('GALLY','ok'); 
 					return $content;  ; }	// Not compliant with Gally
 /////////////////////////////////////////////////////////////////	
@@ -203,8 +201,6 @@
 			{$linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH;
 			$template->append('head_elements',$linkcss.'css/gbolook.css">');
-if ( strtoupper($tpl_name) == 'SIMPLE') { 			
-		  	 $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>');
+			  }
 //----------------------------------------------------	 
 //-------      Usemap   values         -------------	 
@@ -236,5 +232,6 @@
 //----------------------------------------------------	 
 $alt = $conf['allow_html_descriptions'] ? $ThePicture['name'] : strip_tags($ThePicture['name']);
-/* 
+
+/* */
 $related_cats =   $template->get_template_vars('related_categories');
 if (isset($related_cats))
@@ -243,6 +240,5 @@
 	$related_cat = str_replace($conf['level_separator'],"-",$related_cat);
 	} 
-$alt= $related_cat.' '.$alt;  
-*/ 
+ $alt = $alt.' - ['.$related_cat.']';
 //-----------------------------------------------------------------
 $template->assign( array(
@@ -259,5 +255,17 @@
 		 'high', array(
 			        'U_HIGH' => $ThePicture['high_url'] ,
-			        'UUID'   => $uuid,      ));} 
+			        'UUID'   => $uuid,      ));
+		// compliance HD LIGHTBOX	
+		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>'  );} 
+           else
+           {$template->assign('HDHREF','href="javascript:phpWGOpenWindow('."'".$ThePicture['high_url']."','".$uuid."','"."scrollbars=yes,toolbar=no,status=no,resizable=yes'".')"');}		   
+			
+} 
 
 If (($conf['LLGBO_SETTINGS'] [5]  == 'true' )  /* title on frame */ and ($conf['LLGBO_SETTINGS'] [0]  == 'true' )) // display frame
@@ -266,5 +274,4 @@
 		
 // compatibility with extended description
-$ThePicture = $template->get_template_vars('current');
 $comment = $template->get_template_vars('COMMENT_IMG');
 if (!isset($comment) )
@@ -297,6 +304,6 @@
 {$template->clear_assign('FRAME_BEGIN') ;}
 
-$template->set_filenames( array('gbo_content'=> dirname(__FILE__).'/template/picture_content.tpl') );
-return $template->parse( 'gbo_content', true);
+$template->set_filenames( array('default_content'=> dirname(__FILE__).'/template/picture_content.tpl') );
+return $template->parse( 'default_content', true);
 } //end --> MyPictureOptions
 } // End class
