Index: extensions/LLGBO2/main.inc.php
===================================================================
--- extensions/LLGBO2/main.inc.php	(revision 4604)
+++ extensions/LLGBO2/main.inc.php	(revision 4713)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Look_like_gbo2 
-Version:  2.0.K
+Version:  2.0.L
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
 Author: Ex-Ftb  
@@ -17,4 +17,5 @@
  /* 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 */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 /* création d'une instance de la classe   */
@@ -22,5 +23,5 @@
 global $conf; 
 
-define ('LLGBO_INFO_VERSION','2.0.K');
+define ('LLGBO_INFO_VERSION','2.0.L');
 if (!defined('LLGBO_PATH'))
 {define('LLGBO_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');}
@@ -31,5 +32,6 @@
  $conf['LLGBO_HEADER'] = explode (",",$conf['LLGBOHEADER']);   
 /////////////////////////////////////////////////////
-/*  plugin Class  */
+/*  PLUGIN CLASS  */
+/////////////////////////////////////////////////////
 class look_like_gbo
 {/* Set the administration panel of the plugin */
@@ -41,6 +43,7 @@
     return $menu;  }
 
-
-/* always display metadata */
+//-------------------------------------------------------------
+/*       ALWAYS      DISPLAY      METADATA */
+//-------------------------------------------------------------
 function AutoDisplayMetadata()
 {global $conf;
@@ -52,6 +55,7 @@
 		{  pwg_set_session_var('show_metadata', 1 );}}
 }
- 
- // reset nofollow, noindex
+//------------------------------------------------------------- 
+// RESET NOFOLLOW, NOINDEX
+//-------------------------------------------------------------
 function MyBeginheader()
 { global $page,$conf;
@@ -59,5 +63,7 @@
 	{ unset ($page['meta_robots']);}
 }
-//   manage H E A D E R 
+//-------------------------------------------------------------
+//      MANAGE               H E A D E R 
+//-------------------------------------------------------------
 function Myheader()
 {global $template,$conf;
@@ -104,6 +110,8 @@
  
 }  // end header 
-
-//* improve functionnalities --> picture.tpl
+ 
+//------------------------------------------------------------- 
+//* IMPROVE FUNCTIONNALITIES --> PICTURE.TPL
+//-------------------------------------------------------------	
 function  DisplayGboLook()
 { global $template,$conf;
@@ -119,13 +127,14 @@
 			}	}
 			$template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
-	 	$template->clear_assign('metadata');
+	 	$template->Clear_assign('metadata');
 	} // hide original metadata
 		}
 		
 } 
-
-/*  ------   Manage picture page----------------    */ 
+//-----------------------------------------------------------------
+/*  ------   MANAGE PICTURE PAGE----------------    */ 
+//-----------------------------------------------------------------
 function MyPictureOptions($content )
-{global $template,$conf,$user;	
+{global $template,$conf,$user,$lang;	
 $sweetcss = ' <! --- LLGBO tooltip css-->
 <style type="text/css"> 
@@ -135,5 +144,7 @@
 div#toolTip p.title {color:'.$conf['LLGBO_TOOLTIP'][4].';text-align:center;padding:0 0 3px 0;}
 </style>';
-// -----------  add JS tooltip in footer ----------------------
+//-----------------------------------------------------------------
+// -----------  add JS tooltip in footer --------------------
+//-----------------------------------------------------------------
  If (($conf['LLGBO'][1]  == 'true' ) /*  tooltip  */  or  ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  /* exif under bt */ 
  or  ($conf['LLGBO_SETTINGS'] [4]  === 'true' ) /* usemap and Display Thumb  */)
@@ -141,8 +152,8 @@
 		  $linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH;
 	      $sweetcss =  $sweetcss."\n".$javacss.'js/sweettitlesn.js"></script>'."\n"; 
-		 //  $template->append('head_elements',$sweetcss); 
-		   $template->append('footer_elements',$sweetcss); }
-
+		  $template->append('footer_elements',$sweetcss); }
+//-----------------------------------------------------------------
 // Navigation improvement are always available
+//-----------------------------------------------------------------
 $ThePicture = $template->get_template_vars('current');
 $next  = $template->get_template_vars('next');
@@ -154,4 +165,7 @@
 $prevthumb_title = $prev['TITLE'];	
 $usemap ='';
+//----------------------------------------------------	 
+//-------      Tooltip                        -------------	 
+//----------------------------------------------------	 
 If ($conf['LLGBO_SETTINGS'][1]  == 'true' )/*  tooltip  */ 
 	{ $nextthumb_title = $next['TITLE'];
@@ -166,19 +180,30 @@
 									'U_IMG' =>  $last['U_IMG']));}
  	}	
+///// YOGA or SIMPLE /////////////////////	
+$themeconf = $template->get_template_vars('themeconf');
+$tpl_name =  $themeconf['template'];
 /////////////////////////////////////////////
-// an other plugin is working -> go back
+// AN OTHER PLUGIN IS WORKING -> GO BACK
+//   - - - - - - - - - - - - - - - - - - - -
 if ( !empty($content) )   {  return $content;  }	
 //////////////////////////////////////////////////////////////////////
 // frame and navigation on picture  are only available on picture extension
 /////////////////////////////////////////////////////////////////	
-if ($ThePicture['is_picture'] <> 1 )  	{  return  ; }	
+if ($ThePicture['is_picture'] <> 1 )  	{  return $content;  ; }	
+if ( strtoupper($tpl_name) == 'GALLY') { 
+ return $content;  ; }	// Not compliant with Gally
 /////////////////////////////////////////////////////////////////	
 If (($conf['LLGBO_SETTINGS'] [1]  == 'true' )/*  tooltip display  */  or ($conf['LLGBO_SETTINGS'] [0] == 'true') /*  frame  */ 	)
 			{$linkcss = '<link rel="stylesheet" type="text/css" href="'.LLGBO_PATH;
-			$template->append('head_elements',$linkcss.'css/gbolook.css">');}
-
+			$template->append('head_elements',$linkcss.'css/gbolook.css">');
+		  	 $template->append('head_elements',"\n".' <STYLE type="text/css">#theImage{margin:auto;overflow: hidden;z-index:1}
+  			 </STYLE>');
+			  }
+//----------------------------------------------------	 
+//-------      Usemap   values         -------------	 
+//----------------------------------------------------	 
 If ($conf['LLGBO_SETTINGS'] [3]  == 'true' )  // usemap
  { 	$usemap = '" usemap="#prevnext' ;
-	$imgw = $ThePicture['scaled_width'];
+  	$imgw = $ThePicture['scaled_width'];
 		$imgh = $ThePicture['scaled_height'];	
 		$template->assign(array(
@@ -198,6 +223,20 @@
 			 'PREVTHUMB'  =>  $swtimg.$prev['THUMB_SRC'].'>"',
 			 'PREVTHUMBTITLE'  =>  $prevthumb_title));} 
-}  // end usemap		
-$alt = $conf['allow_html_descriptions'] ? $ThePicture['name'] : strip_tags($ThePicture['name']);
+}  // end usemap
+
+//----------------------------------------------------	 
+//                  improve alt
+//----------------------------------------------------	 
+$alt="";
+/*
+$related_cats =   $template->get_template_vars('related_categories');
+if (isset($related_cats))
+	{$related_cat = strip_tags($related_cats[0]);
+	$related_cat = str_replace('&nbsp;'," ",$related_cat);
+	$related_cat = str_replace($conf['level_separator'],"-",$related_cat);
+	}
+$alt1 = $conf['allow_html_descriptions'] ? $ThePicture['name'] : strip_tags($ThePicture['name']);
+$alt= $related_cat.' - '.$alt1; */
+//-----------------------------------------------------------------
 $template->assign( array(
 	   'SRC_IMG' => $ThePicture['image_url'],
@@ -218,6 +257,7 @@
 	 { $template->assign('SHOW_PICTURE_NAME_ON_TITLE', false);	
 		$template->assign('TITLE_FRAME_COLOR', $conf['LLGBO_FRAME'][0]);		 } 
-	 
- /* HTML  frame  */
+//----------------------------------------------------	 
+/*              HTML  frame                          */
+//----------------------------------------------------	 
 If (($conf['LLGBO_SETTINGS'] [0] == 'true') )
 	{   $bds = 0; 
@@ -240,5 +280,6 @@
 		{$template->assign( array( 'TITLE_FRAME' => $ThePicture['name'] )); }	
 	}	// end frame
-	else  // no frame
+	else 
+	// no frame
 {$template->clear_assign('FRAME_BEGIN') ;}
 
