Index: /extensions/LLGBO2/include/manage_picture_content.php
===================================================================
--- /extensions/LLGBO2/include/manage_picture_content.php	(revision 16144)
+++ /extensions/LLGBO2/include/manage_picture_content.php	(revision 16145)
@@ -41,14 +41,16 @@
 	$csstheme = 'default';
 	$themeconf = $template->get_template_vars('themeconf');
-	 if (( strpos(strtoupper($themeconf['name']) , 'STRIPPED') === 0) ) 
-						{  $csstheme = 'stripped';}
 		$frame_width = $frame_width + ( 2* $lastbrdpx);				 
 		$frame_height = $frame_height + ( 2* $lastbrdpx); 
 		$frame_size = 'style="border:0 ;width:'.$frame_width.'px; height:'.$frame_height.'px;"';
+		$themestyle = $themeconf['parent'];
+		If ($themestyle == 'default')
+		   { $themestyle = $themeconf['id'];}
+		// print_r($themestyle);
 		 $template->append('llgbo', array(
 			 'FRAME_SIZE' => $frame_size,
 			 'FRAME_BEGIN' => $frame_begin,
 			  'FRAME_END' => $frame_end,
-			  'GBOCSS' => LLGBO_PATH."css/llgbo_content_".$csstheme.".css" ), true); 
+			  'GBOCSS' => LLGBO_PATH."css/llgbo_content_".$themestyle.".css" ), true); 
 
 			 
Index: tensions/LLGBO2/js/addevent.js
===================================================================
--- /extensions/LLGBO2/js/addevent.js	(revision 16144)
+++ 	(revision )
@@ -1,39 +1,0 @@
-Array.prototype.inArray = function (value) {
-	var i;
-	for (i=0; i < this.length; i++) {
-		if (this[i] === value) {
-			return true;}
-	}
-	return false;
-};
-
-function addEvent( obj, type, fn ) {
-	if (obj.addEventListener) {
-		obj.addEventListener( type, fn, false );
-		EventCache.add(obj, type, fn);}
-	else if (obj.attachEvent) {
-		obj["e"+type+fn] = fn;
-		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
-		obj.attachEvent( "on"+type, obj[type+fn] );
-		EventCache.add(obj, type, fn);}
-	else {obj["on"+type] = obj["e"+type+fn];}
-}
-	
-var EventCache = function(){
-	var listEvents = [];
-	return {
-		listEvents : listEvents,
-		add : function(node, sEventName, fHandler){
-			listEvents.push(arguments);
-		},
-		flush : function(){
-			var i, it;
-			for(i = listEvents.length - 1; i >= 0; i = i - 1){
-				it = listEvents[i];
-				if(it[0].removeEventListener){
-					it[0].removeEventListener(it[1], it[2], it[3]);};
-				if(it[1].substring(0, 2) != "on"){it[1] = "on" + it[1];};
-				if(it[0].detachEvent){it[0].detachEvent(it[1], it[2]);};
-				it[0][it[1]] = null;};
-		}	};}();
-addEvent(window,'unload',EventCache.flush);
Index: tensions/LLGBO2/js/addevent_comment.js
===================================================================
--- /extensions/LLGBO2/js/addevent_comment.js	(revision 16144)
+++ 	(revision )
@@ -1,41 +1,0 @@
-Array.prototype.inArray = function (value) {
-	var i;
-	for (i=0; i < this.length; i++) {
-		if (this[i] === value) {
-			return true;}
-	}
-	return false;
-};
-
-function addEvent2( obj, type, fn ) {
-	if (obj.addEventListener) {
-		obj.addEventListener( type, fn, false );
-		EventCache.add(obj, type, fn);}
-	else if (obj.attachEvent) {
-		obj["e"+type+fn] = fn;
-		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
-		obj.attachEvent( "on"+type, obj[type+fn] );
-		EventCache.add(obj, type, fn);}
-	else {
-		obj["on"+type] = obj["e"+type+fn];
-	}
-}
-	
-var EventCache = function(){
-	var listEvents = [];
-	return {
-		listEvents : listEvents,
-		add : function(node, sEventName, fHandler){
-			listEvents.push(arguments);
-		},
-		flush : function(){
-			var i, it;
-			for(i = listEvents.length - 1; i >= 0; i = i - 1){
-				it = listEvents[i];
-				if(it[0].removeEventListener){
-					it[0].removeEventListener(it[1], it[2], it[3]);};
-				if(it[1].substring(0, 2) != "on"){it[1] = "on" + it[1];};
-				if(it[0].detachEvent){it[0].detachEvent(it[1], it[2]);};
-				it[0][it[1]] = null;};
-		}	};}();
-addEvent2(window,'unload',EventCache.flush);
Index: /extensions/LLGBO2/js/jquery_llgbotip.js
===================================================================
--- /extensions/LLGBO2/js/jquery_llgbotip.js	(revision 16144)
+++ /extensions/LLGBO2/js/jquery_llgbotip.js	(revision 16145)
@@ -1,86 +1,84 @@
 jQuery(document).ready(function(jQuery){  
-	/* CONFIG */		
-		// these 2 variables determine popup's gap from the cursor		
-	var	xGap = 10;
-	var	yGap = 10;
-	var	MyTT = "";
-	var	MainTitle ="";
+/* CONFIG */		
+// these 2 variables determine popup's gap from the cursor		
+var	xGap = 10;
+var	yGap = 10;
+var	MainTitle ="";
+	
+var	maxTop = 0;
+var	maxLeft =0;   
+/* END CONFIG */	
+jQuery("#theMainImage").mouseover(function(){
+//  tooltip IMG title remove	 
+	MainTitle = this.title;
+	this.title =""; 
+	});	
+jQuery("#theMainImage").mouseout(function(){
+//   tooltip IMG  title restaure	 
+	this.title = MainTitle; 
+	});	
 		
-	var	maxTop = 0;
-	var	maxLeft =0;
-        
-	/* END CONFIG */	
-	jQuery("#theMainImage").mouseover(function(){
-  //  tooltip IMG title remove	 
-		MainTitle = this.title;
-		this.title =""; 
-		});	
-	jQuery("#theMainImage").mouseout(function(){
-  //   tooltip IMG  title restaure	 
-		this.title = MainTitle ; 
-		});	
-		
-	jQuery("area,a").mouseover(function(e){	
-			MainTitle = jQuery("#theMainImage").attr("title");
-	        jQuery("#theMainImage").attr("title",""); // for IE
-      		this.t = this.title;
-		 // llgbo conf
-		var val = this.title.split("||",15);
-		if (val[0].length<1) { return; }
-			maxLeft =  jQuery(window).width();
-			maxTop =  jQuery(window).height();
-				//
-			this.activate ='ok';
-	 		this.title = "";
-			this.tt = "<p id='title'>"+val[0]+"</p>";
-			var pid = "dflt";
-			if (this.className != "navThumb") // no picture for navthumb
-				{for (var i=1; i<val.length; i++) { 
-				if ( val[i].toLowerCase().indexOf("<img") == 0) 
-					{ pid = "pict";}
-					this.tt += "<p id="+pid+">"+ val[i]+"</p>";}
-					}		
-			jQuery("body").append("<div id='toolTip'>"+this.tt+"</div>"); 
-		
-		    MyTT = jQuery("#toolTip");
-			if (this.id == "Rules")
-					{ MyTT.css( {'border-color' : '#c92'});}
-		    if (this.id == "RulesEx")
-				{ MyTT.css( {'border-color' : '#d3fed2'})
-				jQuery("#toolTip #title").css( {'color' : '#d3fed2'}); }
-		
-			updateXY(e);
-			 MyTT.css("opacity", 0.25)
-				.show; 
-			 MyTT.fadeTo(1500,.95);
-				});			
- 
-	jQuery("area,a").mouseout(function(e){	
-		if (this.activate =='ok') // mouseout without mouseover we keep the right title
-			{ this.title = this.t;	 
-				jQuery("#toolTip")
-				.fadeOut("slow")
-				.remove();
-				 jQuery("#theMainImage").attr("title",MainTitle); // for IE 
-				 }
+jQuery("area,a").mouseover(function(e){	
+	MainTitle = jQuery("#theMainImage").attr("title");
+	jQuery("#theMainImage").attr("title",""); // for IE
+	this.t = this.title;
+ // llgbo conf
+	var val = this.title.split("||",15);
+	if (val[0].length<1) { return; }
+	maxLeft =  jQuery(window).width();
+	maxTop =  jQuery(window).height();
+		//
+	this.activate ='ok';
+	this.title = "";
+	this.tt = "<p id='title'>"+val[0]+"</p>";
+	var pid = "dflt";
+	if (this.className != "navThumb") // no picture for navthumb
+		{for (var i=1; i<val.length; i++) { 
+		if ( val[i].toLowerCase().indexOf("<img") == 0) 
+			{ pid = "pict";}
+			this.tt += "<p id="+pid+">"+ val[i]+"</p>";}
+			}		
+	jQuery("body").append("<div id='toolTip'>"+this.tt+"</div>"); 
+
+	var MyTT = jQuery("#toolTip");
+	if (this.id == "Rules")
+			{ MyTT.css( {'border-color':'#c92'});}
+	if (this.id == "RulesEx")
+		{ MyTT.css( {'border-color':'#d3fed2'})
+		jQuery("#toolTip #title").css({'color':'#d3fed2'});}
+
+	updateXY(e);
+	 MyTT.css("opacity", 0.25)
+		.show; 
+	 MyTT.fadeTo(1200,.95);
+});			
+
+jQuery("area,a").mouseout(function(e){	
+	if (this.activate =='ok') // mouseout without mouseover we keep the right title
+	{ this.title = this.t;	 
+	jQuery("#toolTip")
+	.fadeOut("slow")
+	.remove();
+	 jQuery("#theMainImage").attr("title",MainTitle); // for IE 
+	 }
  });	
-	jQuery("area,a").mousemove(function(e){
-		updateXY(e);
-	});	
-	    var updateXY = function(e) {
-			var xLeft,yCord,xCord;
-            MyTT = jQuery("#toolTip");
-			var wT = MyTT.width() + 6 /* border */+ xGap;
-			var hT = MyTT.height() + 6 /* border */+ yGap; 
-			
-			if ( e.pageX < (maxLeft/2) )  // piwigo left 
-				{xCord = wT *-1;}
-				else {
-			 xCord =( maxLeft < (e.pageX + wT )) ?	xCord = wT * -1 : xCord = xGap;}	
-			 xLeft = (e.pageX + xCord < 3 ) ? xLeft = e.pageX + xGap : xLeft = e.pageX + xCord;
-			 yCord =( maxTop < (e.pageY + hT )) ?	yCord = hT * -1 : yCord = yGap;
-				MyTT
-					.css("top",(e.pageY + yCord) + "px")
-					.css("left",(xLeft) + "px");
-			}
+jQuery("area,a").mousemove(function(e){
+	updateXY(e);
+});	
+var updateXY = function(e) {
+	var xLeft,yCord,xCord;
+	var MyTT = jQuery("#toolTip");
+	var wT = MyTT.width() + 6 /* border */+ xGap;
+	var hT = MyTT.height() + 6 /* border */+ yGap; 
+	
+	if ( e.pageX < (maxLeft/2) )  // piwigo left 
+		{xCord = wT *-1;}
+		else {
+	 xCord =( maxLeft < (e.pageX + wT )) ?	xCord = wT * -1 : xCord = xGap;}	
+	 xLeft = (e.pageX + xCord < 3 ) ? xLeft = e.pageX + xGap : xLeft = e.pageX + xCord;
+	 yCord =( maxTop < (e.pageY + hT )) ?	yCord = hT * -1 : yCord = yGap;
+	MyTT
+		.css("top",(e.pageY + yCord) + "px")
+		.css("left",(xLeft) + "px");
+	}
 });
Index: /extensions/LLGBO2/main.inc.php
===================================================================
--- /extensions/LLGBO2/main.inc.php	(revision 16144)
+++ /extensions/LLGBO2/main.inc.php	(revision 16145)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Look_like_gbo2 
-Version:  2.4.B
+Version:  2.4.D
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
 Author: GBo 
@@ -8,11 +8,13 @@
 Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery 
 Add a border around  picture ......
-	2.4.A Compliance Piwigo 2.4 + jquery
-	2.4.B Compliance with Theme Stripped and plugin Piwishak  
+	2.4.A Beta1 Compliance Piwigo 2.4 + jquery
+	2.4.B beta 2 Compliance with Theme Stripped and plugin Piwishak  
+	2.4.C First version for official Piwigo 2.4
+	2.4.D Compliance with Theme Simple
  */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
 global $conf; 
-define ('LLGBO_INFO_VERSION','2.4.B');
+define ('LLGBO_INFO_VERSION','2.4.D');
 if (!defined('LLGBO_PATH'))
 {define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');}
@@ -117,5 +119,5 @@
 // -----------  add CSS tooltip in footer --------------------
 //-----------------------------------------------------------------
- If (($conf['LLGBO'][1]  == 'true' ) /*  tooltip  */  
+ If ((($conf['LLGBO_SETTINGS'][1]  == 'true' ) /*  tooltip  */  
  or  ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  /* exif under bt */ )    
 	{	$template->append('footer_elements',$sweetcss);
@@ -143,8 +145,9 @@
 // ------------------------
   //  End frame  
-  $search = '{$ALT_IMG}{/if}">';
+  $search = '{foreach from=$current.unique_derivatives';
+  $replacement =  "\n".'{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->"."\n".$search;
  if (( strpos(strtoupper($themeconf['name']) , 'STRIPPED') === 0) ) 
-	{$search = 'class="hideTabs">';}
-  $replacement =  $search."\n".'{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->";
+	{$search = 'class="hideTabs">';
+  $replacement =  $search."\n".'{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->";}
   return str_replace($search, $replacement, $content);
 }
Index: tensions/LLGBO2/template/picture_content.tpl
===================================================================
--- /extensions/LLGBO2/template/picture_content.tpl	(revision 16144)
+++ 	(revision )
@@ -1,69 +1,0 @@
-
-<!-- LLGBO2 picture_content -->
-{if !isset($FRAME_BEGIN)}
-	{if isset($high) and !isset($USEMAP) }
-		<a href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
-	{/if}
-		<img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG|@strip_tags:false}" 	 {$MAP_TO_USED} id="theMainImage"
-			{if isset($COMMENT_IMG)}
-				title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}" 
-			{/if} 
-			>
-	{if isset($high) and !isset($USEMAP) }
-	 </a>
-	{/if}
-{/if} 
-{if isset($USEMAP) }
-		<!--  navigation on picture  -->
-		<map id="prevnext" name="prevnext">  
-		{if isset($previous)}
-		<area shape="rect" coords="{$LEFT_X1},{$LEFT_Y1},{$LEFT_X2},{$LEFT_Y2}" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$PREVTHUMBTITLE}" {if isset($PREVTHUMB)}{$PREVTHUMB} {/if} alt="" rel="prev"> 
-		{/if}   
-		<area shape="rect" coords="{$UP_X1},{$UP_Y1},{$UP_X2},{$UP_Y2}" href="{$U_UP}" title="{'Thumbnails'|@translate}" alt="" rel="up" >
-		{if isset($next) }
-		<area shape="rect" coords="{$RIGHT_X1},{$RIGHT_Y1},{$RIGHT_X2},{$RIGHT_Y2}" href="{$next.U_IMG}" title="{'Next'|@translate} : {$NEXTTHUMBTITLE}" {if isset($NEXTTHUMB)}{$NEXTTHUMB} {/if} alt="" rel="next">
-		{/if}
-		{if isset($high) } 
-			<area shape="rect" coords="{$HIGH_X1},{$HIGH_Y1},{$HIGH_X2},{$HIGH_Y2}"
-			{$HDHREF}
-			>
-		{/if}	
-		    
-		</map>
-{/if}
-{if  isset($FRAME_BEGIN)}
-	{if isset($TITLE_FRAME)}
-	 <span  id="gboh2" style ="background:transparent;z-index:3;color:{$TITLE_FRAME_COLOR}">{$TITLE_FRAME}</span>
-	{/if}
-	<div  id="gbo" {$FRAME_SIZE}>
-	{$FRAME_BEGIN}
-			{if isset($high) and !isset($USEMAP)  }	 
-				<a href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
-			{/if}
-		   <img    src="{$SRC_IMG}" align="center" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}" {$MAP_TO_USED} id="theMainImage"
-			
-			{if isset($COMMENT_IMG)}
-				title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}" 
-			{/if} 
-			>
-			{if isset($high) and !isset($USEMAP) }
-			</a>
-			{/if}
-			
-	{$FRAME_END}
-</div> <!-- end GBO -->
-{/if}
-	{if isset($high) and !isset($USEMAP) } 
-		<!-- HihgDef and navigation on picture off   -->
-			<a  id="gboahigh" href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
-			<p id="gbophigh">{'Click on the photo to see it in high definition'|@translate}</p></a>
-	 {/if}
-{if  isset($LLGBOCSS)}	 
- {combine_css  path=$LLGBO_PATH|@cat:"css/gbolook.css"} 
- {/if}
-{if  isset($LLGBOTOOLTIP)}	 
- {combine_script id='llgoSwtTooltip'   path=$LLGBO_PATH|@cat:"js/sweettitlesn1_comment.js"}
-{/if}
-{if isset($high)}
-{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
-{/if}
