Index: /extensions/LLGBO2/admin/llgbo_admin.php
===================================================================
--- /extensions/LLGBO2/admin/llgbo_admin.php	(revision 6240)
+++ /extensions/LLGBO2/admin/llgbo_admin.php	(revision 6241)
@@ -2,5 +2,5 @@
 // +-----------------------------------------------------------------------+
 // | Plugin Name : Look_Like_GBO  2                                                              |
-// | Plugin Version : 2.0                                                                                    |
+// | Plugin Version : 2.1.A                                                                                    |
 // | File Version : 0.1                                                                                       |
 // | Plugin Version author : Ex-FTB                                                               |
@@ -135,10 +135,17 @@
 	if (!isset($_POST['llgbo_maintain_header'])) {$_POST['llgbo_maintain_header'] = '';}
 	if (!isset($_POST['llgbo_allinfo'])) {$_POST['llgbo_allinfo'] = 'false';}
-    $_POST['llgbo_hdlightbox'] = 'false'; 
+    if (!isset($_POST['llgbo_hdShadowbox'])) {$_POST['llgbo_hdShadowbox'] = 'false';} 
 	// compliance HD Shadowbox
-	$query =" SELECT ID FROM  piwigo_plugins where id ="."'HDShadowbox'"."and state ='active'" ;
-   $result = pwg_query($query);
-   while ($row = pwg_db_fetch_assoc($result))
-		{ $_POST['llgbo_hdlightbox'] = 'true';}  
+	  $shadowbowactive = 0;
+	  $query =" SELECT ID FROM  piwigo_plugins where id ="."'HDShadowbox'"."and state ='active'" ;
+      $result = pwg_query($query);
+	  while ($row = pwg_db_fetch_assoc($result))
+		{ $shadowbowactive = 1;}  
+	if ($shadowbowactive == 0)
+		{ if ($_POST['llgbo_hdShadowbox'] != 'false') 
+		{$lang['llgbo_hdShadowbox'] =  ' * * * * '.$lang['llgbo_hdShadowbox'].' * * * * '; }
+		$_POST['llgbo_hdShadowbox'] = 'false';
+		} 
+	
 	if (!isset($_POST['llgbo_always_displayexif'])) {$_POST['llgbo_always_displayexif'] = 'false';} //10	
 	 $param_llgbo = array($_POST['llgbo_frame'],
@@ -147,5 +154,5 @@
 				$_POST['llgbo_title_frame'],			$_POST['llgbo_header'],
 				$_POST['llgbo_maintain_header'],			$_POST['llgbo_allinfo'],
-				$_POST['llgbo_hdlightbox']	,$_POST['llgbo_always_displayexif']
+				$_POST['llgbo_hdShadowbox']	,$_POST['llgbo_always_displayexif']
 			);		 
 	$llgbo_new_value = implode ("," , $param_llgbo);
@@ -181,5 +188,5 @@
 	  {$template->assign(array( 'LLGBO_ALLINFO' => 'true'));}  else {  $template->assign( array( 'LLGBO_ALLINFO' => "false"));} 
 	if ($conf['LLGBO_SETTINGS'][9] == 'true')
-	  {$template->assign(array( 'LLGBO_HDLIGHTBOX' => 'true'));}  else  { $template->assign(array( 'LLGBO_HDLIGHTBOX' => "false"));}
+	  {$template->assign(array( 'LLGBO_HDShadowbox' => 'true'));}  else  { $template->assign(array( 'LLGBO_HDShadowbox' => "false"));}
 	if ($conf['LLGBO_SETTINGS'][10] == 'true')
 	  {$template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => 'true'));}  else  { $template->assign(array( 'LLGBO_ALWAYS_DISPLAYEXIF' => "false"));}
Index: /extensions/LLGBO2/admin/llgbo_adminsettings.tpl
===================================================================
--- /extensions/LLGBO2/admin/llgbo_adminsettings.tpl	(revision 6240)
+++ /extensions/LLGBO2/admin/llgbo_adminsettings.tpl	(revision 6241)
@@ -40,12 +40,15 @@
 		<td class="llgboinput">{html_radios name='llgbo_title_frame' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_TITLE_FRAME}</td>	
 	</tr>
- <!--	<tr>
-		<td class="llgbolabel">{'llgbo_hdlightbox'|@translate}</td>
-		<td class="llgboinput">{html_radios name='llgbo_hdlightbox' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_HDLIGHTBOX}</td>
-	</tr>    --> 
+   
 	<tr>
 		<td class="llgbolabel">{'llgbo_header'|@translate}</td>
 		<td class="llgboinput">{html_radios name='llgbo_header' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_HEADER}</td>	
 	</tr>	
+	<tr>
+	</tr>
+	<tr>
+		<td class="llgbolabel">{'llgbo_hdShadowbox'|@translate}</td>
+		<td class="llgboinput">{html_radios name='llgbo_hdShadowbox' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_HDShadowbox}</td>
+	</tr>   
 </table>
 
Index: /extensions/LLGBO2/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/LLGBO2/language/en_UK/plugin.lang.php	(revision 6240)
+++ /extensions/LLGBO2/language/en_UK/plugin.lang.php	(revision 6241)
@@ -84,4 +84,4 @@
 $lang['Reset_To_Default'] = 'Reset to default values';
 /*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
-/*TODO*/$lang['llgbo_hdlightbox'] ='Compliance HD lightbox and navigation on picture';
+/*TODO*/$lang['llgbo_hdShadowbox'] ='Compliance HD Shadowbox and navigation on picture. <br> HD Shadowbox must be activated!';
 ?>
Index: /extensions/LLGBO2/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/LLGBO2/language/es_ES/plugin.lang.php	(revision 6240)
+++ /extensions/LLGBO2/language/es_ES/plugin.lang.php	(revision 6241)
@@ -90,4 +90,4 @@
 /* TODO */$lang['Reset_To_Default'] = 'Restaurar los valores por defecto';
 /*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
-/*TODO*/$lang['llgbo_hdlightbox'] ='Compliance HD lightbox and navigation on picture';
+/*TODO*/$lang['llgbo_hdShadowbox'] ='Compliance HD Shadowbox and navigation on picture. <br> HD Shadowbox must be activated !';
 ?>
Index: /extensions/LLGBO2/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/LLGBO2/language/fr_FR/plugin.lang.php	(revision 6240)
+++ /extensions/LLGBO2/language/fr_FR/plugin.lang.php	(revision 6241)
@@ -84,4 +84,4 @@
 $lang['Reset_To_Default'] = 'Rétablir les valeurs par défaut';
 $lang['llgo_warning_setting'] = 'Le cadre et la navigation sur image ne sont pas disponibles avec Gally';
-$lang['llgbo_hdlightbox'] ='Compatibilité de HD lightbox avec la navigation sur image ';
+$lang['llgbo_hdShadowbox'] ='Compatibilité de HD Shadowbox avec la navigation sur image. <br> le plugin HD Shadowbox doit être activé! ';
 ?>
Index: /extensions/LLGBO2/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/LLGBO2/language/hu_HU/plugin.lang.php	(revision 6240)
+++ /extensions/LLGBO2/language/hu_HU/plugin.lang.php	(revision 6241)
@@ -83,4 +83,4 @@
 $lang['llgbo_always_displayexif'] = 'Mindig megjelenő METAADATOK (EXIF):' ;
 /*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
-/*TODO*/$lang['llgbo_hdlightbox'] ='Compliance HD lightbox and navigation on picture';
+/*TODO*/$lang['llgbo_hdShadowbox'] ='Compliance HD Shadowbox and navigation on picture. <br> HD Shadowbox must be activated';
 ?>
Index: /extensions/LLGBO2/language/pl_PL/plugin.lang.php
===================================================================
--- /extensions/LLGBO2/language/pl_PL/plugin.lang.php	(revision 6240)
+++ /extensions/LLGBO2/language/pl_PL/plugin.lang.php	(revision 6241)
@@ -84,4 +84,4 @@
 /* TODO */$lang['Reset_To_Default'] = 'Przywróć wartości domyślne';
 /*TODO*/$lang['llgo_warning_setting'] = 'Frame around picture and navigation on picture are not available with Gally';
-/*TODO*/$lang['llgbo_hdlightbox'] ='Compliance HD lightbox and navigation on picture';
+/*TODO*/$lang['llgbo_hdShadowbox'] ='Compliance HD Shadowbox and navigation on picture';
 ?>
Index: /extensions/LLGBO2/main.inc.php
===================================================================
--- /extensions/LLGBO2/main.inc.php	(revision 6240)
+++ /extensions/LLGBO2/main.inc.php	(revision 6241)
@@ -182,5 +182,5 @@
 $tpl_name = "";
 $currenttheme = $template->get_template_vars('themes');
-$tpl_id =  $currenttheme[0]['id'];
+$tpl_name =  $currenttheme[1]['id'];
 /////////////////////////////////////////////
 // AN OTHER PLUGIN IS WORKING -> GO BACK
@@ -191,10 +191,8 @@
 /////////////////////////////////////////////////////////////////	
 if ($ThePicture['is_picture'] <> 1 )  	{  return $content;  ; }	
-//echo  $tpl_id;
-
-$template->assign('GALLY',''); 
-if (( strpos(strtoupper($tpl_id) , 'GALLY') === true) )
- { 	$template->assign('GALLY','ok'); 
-					return $content;  ; }	// Not compliant with Gally
+//echo  strpos(strtoupper($tpl_name) , 'GALLY');
+
+if (( strpos(strtoupper($tpl_name) , 'GALLY') === 0) )
+ { 						return $content;  ; }	// Not compliant with Gally
 /////////////////////////////////////////////////////////////////	
 If (($conf['LLGBO_SETTINGS'] [1]  == 'true' )/*  tooltip display  */  or ($conf['LLGBO_SETTINGS'] [0] == 'true') /*  frame  */ 	)
@@ -233,5 +231,5 @@
 $alt = $conf['allow_html_descriptions'] ? $ThePicture['name'] : strip_tags($ThePicture['name']);
 
-/* */
+/* 
 $related_cats =   $template->get_template_vars('related_categories');
 if (isset($related_cats))
@@ -240,5 +238,5 @@
 	$related_cat = str_replace($conf['level_separator'],"-",$related_cat);
 	} 
- $alt = $alt.' - ['.$related_cat.']';
+ $alt = $alt.' - ['.$related_cat.']';*/
 //-----------------------------------------------------------------
 $template->assign( array(
@@ -256,8 +254,8 @@
 			        'U_HIGH' => $ThePicture['high_url'] ,
 			        'UUID'   => $uuid,      ));
-		// compliance HD LIGHTBOX	
+		// compliance HD Shadowbox	
 		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">
+			  $template->append('head_elements', "\n".'<script type="text/javascript">
 				window.onload = function() {
 			Shadowbox.setup(document.getElementById("prevnext").getElementsByTagName("area")[3]);
