Index: /extensions/LLGBO2/admin/llgbo_admin.php
===================================================================
--- /extensions/LLGBO2/admin/llgbo_admin.php	(revision 16753)
+++ /extensions/LLGBO2/admin/llgbo_admin.php	(revision 16754)
@@ -289,4 +289,6 @@
 		if ($_POST['sample'] == "B_W")
 			{ $llgbo_sample = "#e8cb8b,#fcf6e9,11,#171112,9,#352c2d,1,#fcf6e9,1,#000000,3,#171112,3,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0,#000000,0";}
+		if ($_POST['sample'] == "IVORY")
+			{ $llgbo_sample = "#16195f,#f4f4f4,4,#685008,1,#e0e0df,5,#d6d6d4,1,#cbcbca,1,#c0c0be,1,#b5b5b4,1,#aaaaa8,1,#9e9e9c,1,#929291,1,#868685,1,#7b7b7a,1,#6e6e6d,1,#626261,1,#555555,1,#4a4a4a,1";}
 		if ($_POST['sample'] != "MY_LAST_VALUES")
 		  { $conf['LLGBO_FRAME'] = explode ("," ,$llgbo_sample ); }
Index: /extensions/LLGBO2/admin/llgbo_adminframe.tpl
===================================================================
--- /extensions/LLGBO2/admin/llgbo_adminframe.tpl	(revision 16753)
+++ /extensions/LLGBO2/admin/llgbo_adminframe.tpl	(revision 16754)
@@ -18,4 +18,5 @@
 		<option label="WHITE" value="WHITE">White</option>
 		<option label="B_W" value="B_W">Black&White</option>
+		<option label="IVORY" value="IVORY">Ivory</option>
 		<option label="MY_LAST_VALUES" value="MY_LAST_VALUES"><selected="selected">MyLastValues</option>
 		</select> <input class="submit" type="submit" value="{'previewsamples'|@translate}" name="previewsample"/>
Index: /extensions/LLGBO2/include/manage_picture_content.php
===================================================================
--- /extensions/LLGBO2/include/manage_picture_content.php	(revision 16753)
+++ /extensions/LLGBO2/include/manage_picture_content.php	(revision 16754)
@@ -2,6 +2,7 @@
 $prev = $template->get_template_vars('previous');
 $next  = $template->get_template_vars('next');
-$current  = $template->get_template_vars('current');
+$current = $template->get_template_vars('current');
 $themeconf = $template->get_template_vars('themeconf');
+$slideshow = $template->get_template_vars('U_SLIDESHOW');
 //print_r($next);
 $swtimg =   '||<img src=';	
@@ -14,53 +15,29 @@
  	$template->append('llgbo', array('tooltipCSS'  => $sweetcss), true); 
 	}	
-	
+If (($conf['LLGBO_SETTINGS'] [0] == 'true') and (!isset($slideshow))  ) //Frame
+	{ 	
+	$template->set_prefilter('default_content', 'LLGBO_prefilter_Content_Frame');
+
 //----------------------------------------------------	 
-/*              HTML  frame                          */
-//----------------------------------------------------	 
-If (($conf['LLGBO_SETTINGS'] [0] == 'true') ) //Frame
-	{ 	
-	$template->set_prefilter('default_content', 'LLGBO_prefilter_Frame');
-	// selected picture Size			
-	$deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE);
-	$PictSizeWH  =  $element_info['derivatives'][$deriv_type]->get_size();	
-	$frame_width  = $PictSizeWH[0];
-		$frame_height = $PictSizeWH[1];
-		$lastbrdpx = 0;
-		$frame_begin ='';
+/*       HTML End  frame   on Picture_content       */
+//----------------------------------------------------		
 		$frame_end='';
 		for ($x = 1   ;$x < 32  ; $x =$x +2)
 		{ 	if ((isset($conf['LLGBO_FRAME'][$x+1])) and  ($conf['LLGBO_FRAME'][$x+1] > 0))	// boder value > 0	
-			  { $bordpx= $conf['LLGBO_FRAME'][$x+1]; 
-				$frame_width = $frame_width + ( 2* $lastbrdpx);				 
-				$frame_height = $frame_height + ( 2* $lastbrdpx); 
-			    $bordcolor = $conf['LLGBO_FRAME'][$x];
-			    $frame_begin = '<div   id ="llgboframe'.$x.'" style="border:'.$bordpx.'px solid '.$bordcolor.';width:'.$frame_width.'px; height:'.$frame_height.'px;">'."\n".$frame_begin;
-				$frame_end = $frame_end .'</div>';	
-				$lastbrdpx = $bordpx;}
+			  { 	$frame_end = $frame_end .'</div>';	}
 		}
 	$csstheme = 'default';
 	$themeconf = $template->get_template_vars('themeconf');
-		$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'];
+	//  dedicated Css by parent theme	
+		$themestyle = 'default';
+		if (isset ($themeconf['parent']))
+		{ $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_".$themestyle.".css" ), true); 
 
-			 
-	If (($conf['LLGBO_SETTINGS'] [5]  == 'true' )  /* title on frame */ 
-	and ($conf['LLGBO_SETTINGS'] [0]  == 'true' ) )// frame
-		 {  $template->append('llgbo', array(
-				 'TITLE_FRAME_COLOR' => $conf['LLGBO_FRAME'][0],
-				 'TITLE_FRAME' => $current['name'] ), true);
-			$template->assign('SHOW_PICTURE_NAME_ON_TITLE' , false); 
-	
-			}
 } // end frame
+
 ?>
Index: /extensions/LLGBO2/js/jquery_llgboframeresize.js
===================================================================
--- /extensions/LLGBO2/js/jquery_llgboframeresize.js	(revision 16753)
+++ /extensions/LLGBO2/js/jquery_llgboframeresize.js	(revision 16754)
@@ -1,27 +1,41 @@
 // LLGBO frame resize 
 jQuery(document).ready(function(jQuery){ 
-	jQuery("#theMainImage").load(function(){LlgboFr_Resize();});	
-	jQuery(window).resize(function(){ LlgboFr_Resize(); });
+	 jQuery("#theMainImage").load(function(){LlgboFr_Resize();});	
+	jQuery(window).resize(function(){ LlgboFr_Resize(); }); 
 });
 var LlgboFr_Resize = function () {
-	var MainImg = jQuery("img#theMainImage").get(0);	
-	var nFrH = parseInt(MainImg.height);
-	var nFrW = parseInt(MainImg.width);
-	var FrLstBdr = 0, i = 0;
-	var elGbo = jQuery("div#llgbo");
-	if  (elGbo.get(0)) { 
-		for ( i=1; i<32; i=i+2 )
-			{var Fr = jQuery("div#llgboframe"+(i));
-			 var frbdr = 0;
-			 if (Fr.get(0)) {
-				frbdr = parseInt(Fr.css('border-left-width'));
-				nFrH = nFrH + FrLstBdr ;
-				nFrW = nFrW + FrLstBdr ;
-				Fr.css("height", (nFrH) + "px");
-				Fr.css("width", (nFrW) + "px");}
-				FrLstBdr = (frbdr * 2); 
-			}
-			elGbo.css("width", (nFrW + FrLstBdr) + "px");
-			elGbo.css("height", (nFrH + FrLstBdr) + "px");
+	var elGbo = document.getElementById("llgbo0");
+	 if  (elGbo) { 
+	    var MainImg = document.getElementById("theMainImage"); 
+		var nFrH = parseInt(MainImg.height); 
+		var nFrW = parseInt(MainImg.width);
+		var ReadImgSize = document.getElementById("LLGBO_READIMGREELSIZE");
+		 if (ReadImgSize) {
+		 // Must read via URL the physical size of the img
+			 var x = document.createElement('img');	
+			 x.id = 'NewImgx';
+			 document.getElementsByTagName('body')[0].appendChild(x);
+			 x.style.top = '0';
+			 x.style.visibility = 'hidden';
+			 x.src =  MainImg.src;
+			 nFrH = parseInt(x.height); 
+			 nFrW = parseInt(x.width);
+			document.getElementsByTagName('body')[0].removeChild(x);
 		}
+	
+		var FrLstBdr = 0, i = 0;
+			for ( i=1; i<32; i=i+2 )
+				{var Fr = document.getElementById("llgboframe"+(i));
+				 var frbdr = 0;
+				 if (Fr) {
+					frbdr = parseInt(Fr.style.borderWidth);
+					nFrH = nFrH + FrLstBdr ;
+					nFrW = nFrW + FrLstBdr ;
+					Fr.style.height = nFrH + "px";
+					Fr.style.width = nFrW + "px";}
+					FrLstBdr = (frbdr * 2);  
+				}
+				elGbo.style.width = (nFrW + FrLstBdr) + "px";
+				elGbo.style.height =(nFrH + FrLstBdr) + "px";
+		}		
 }
Index: /extensions/LLGBO2/main.inc.php
===================================================================
--- /extensions/LLGBO2/main.inc.php	(revision 16753)
+++ /extensions/LLGBO2/main.inc.php	(revision 16754)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Look_like_gbo2 
-Version:  2.4.D
+Version:  2.4.F
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
 Author: GBo 
@@ -11,10 +11,11 @@
 	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
+	2.4.D Compliance with Theme Simple + fix bug on option
+	2.4.F Improvement on frame management first size
  */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
 global $conf; 
-define ('LLGBO_INFO_VERSION','2.4.D');
+define ('LLGBO_INFO_VERSION','2.4.F');
 if (!defined('LLGBO_PATH'))
 {define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');}
@@ -68,6 +69,47 @@
 function  llgbo_EndPicture()
 { global $template,$conf;
-$infofile = $template->get_template_vars('INFO_FILE'); 
-
+$infofile = $template->get_template_vars('INFO_FILE');
+$current = $template->get_template_vars('current');
+$slideshow = $template->get_template_vars('U_SLIDESHOW');
+//----------------------------------------------------	 
+/*       HTML End  frame   on Picture.tpl       */
+//----------------------------------------------------	
+If (($conf['LLGBO_SETTINGS'] [0] == 'true') and (!isset($slideshow)) ) //Frame
+	{ $template->set_prefilter('picture', 'LLGBO_prefilter_Picture_Frame');
+		If (isset($conf['LLGBO_SETTINGS'] ['rirs']))
+		{ // Force javascript LlgboFr_Resize  to Read MainImage Reel Size via URL 
+		  // Must be used when html image is already resize by HTML (IE or Chrome)
+		If ($conf['LLGBO_SETTINGS'] ['rirs']  == 'true') // Forcce javascript to read Image reel size
+			{$template->append('llgbo', array('READIMGREELSIZE'  => "ok"), true); }
+			}
+// selected picture Size			
+	$PictSizeWH  =  $current['selected_derivative']->get_size();	
+	$frame_width  = $PictSizeWH[0];
+		$frame_height = $PictSizeWH[1];
+		$lastbrdpx = 0;
+		$frame_begin ='';
+		for ($x = 1   ;$x < 32  ; $x =$x +2)
+		{ 	if ((isset($conf['LLGBO_FRAME'][$x+1])) and  ($conf['LLGBO_FRAME'][$x+1] > 0))	// boder value > 0	
+			  { $bordpx= $conf['LLGBO_FRAME'][$x+1]; 
+				$frame_width = $frame_width + ( 2* $lastbrdpx);				 
+				$frame_height = $frame_height + ( 2* $lastbrdpx); 
+			    $bordcolor = $conf['LLGBO_FRAME'][$x];
+			    $frame_begin = '<div   id="llgboframe'.$x.'" class="llgbo" style="border:'.$bordpx.'px solid '.$bordcolor.';width:'.$frame_width.'px; height:'.$frame_height.'px;">'."\n".$frame_begin;
+				$lastbrdpx = $bordpx;}
+		}
+		$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;"';
+		$template->append('llgbo', array(
+			 'FRAME_SIZE' => $frame_size,
+			 'FRAME_BEGIN' => $frame_begin), true); 
+	If (($conf['LLGBO_SETTINGS'] [5]  == 'true' )  /* title on frame */ 
+	and ($conf['LLGBO_SETTINGS'] [0]  == 'true' ) )// frame
+		 {  $template->append('llgbo', array(
+				 'TITLE_FRAME_COLOR' => $conf['LLGBO_FRAME'][0],
+				 'TITLE_FRAME' => $current['name'] ), true);
+			$template->assign('SHOW_PICTURE_NAME_ON_TITLE' , false); 
+			}
+	}
 // ---- Metadata ----------	
 $pictExt = substr($infofile,-3);
@@ -119,5 +161,5 @@
 // -----------  add CSS tooltip in footer --------------------
 //-----------------------------------------------------------------
- If ((($conf['LLGBO_SETTINGS'][1]  == 'true' ) /*  tooltip  */  
+ If (($conf['LLGBO_SETTINGS'][1]  == 'true' ) /*  tooltip  */  
  or  ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  /* exif under bt */ )    
 	{	$template->append('footer_elements',$sweetcss);
@@ -135,14 +177,7 @@
 } //end --> llgbo_RenderContent
 
-function LLGBO_prefilter_Frame($content, &$smarty)
-{  global $themeconf;
-// ------------------------
-//  begin frame 
- $search = '<img src="';
-  $replacement = '{if isset($llgbo.TITLE_FRAME)}'."\n".'<span  id="llgboh2" style ="background:transparent;z-index:3;color:{$llgbo.TITLE_FRAME_COLOR}">{$llgbo.TITLE_FRAME}</span>';
-  $replacement = $replacement."\n".'{/if}'."\n".'<div  id="llgbo" {$llgbo.FRAME_SIZE}>'."\n".'{$llgbo.FRAME_BEGIN}'."\n".$search;
-  $content = str_replace($search, $replacement, $content);
-// ------------------------
-  //  End frame  
+function LLGBO_prefilter_Content_Frame($content, &$smarty)
+{   //  End frame  picture_content TPL
+  global $themeconf;
   $search = '{foreach from=$current.unique_derivatives';
   $replacement =  "\n".'{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->"."\n".$search;
@@ -151,4 +186,15 @@
   $replacement =  $search."\n".'{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->";}
   return str_replace($search, $replacement, $content);
+}
+
+function LLGBO_prefilter_Picture_Frame($content, &$smarty)
+{
+// ------------------------
+//  begin frame on picture TPL
+ $search = '{$ELEMENT_CONTENT}';
+ $replacement = '{if isset($llgbo.TITLE_FRAME)}'."\n".'<span  id="llgboh2" style ="background:transparent;z-index:3;color:{$llgbo.TITLE_FRAME_COLOR}">{$llgbo.TITLE_FRAME}</span>';
+ $replacement = $replacement."\n".'{/if}'."\n".'<div   id="llgbo0" class="llgbo" {$llgbo.FRAME_SIZE}>'."\n".'{$llgbo.FRAME_BEGIN}'."\n".$search;
+// ------------------------
+  return  str_replace($search, $replacement, $content);
 }
 
Index: /extensions/LLGBO2/samples/cadre data.txt
===================================================================
--- /extensions/LLGBO2/samples/cadre data.txt	(revision 16753)
+++ /extensions/LLGBO2/samples/cadre data.txt	(revision 16754)
@@ -11,4 +11,6 @@
 #9f7a09,#090909,3,#fafafa,1,#0b0b0b,4,#0c0c0c,4,#1f1f20,1,#29292b,1,#343435,1,#3f3f41,1,#4a4a4b,1,#555557,1,#616163,1,#6d6d6e,1,#79797a,1,#848485,1,#919192,1,#9d9d9e,1 
 
+White new
+#16195f,#f4f4f4,4,#685008,1,#e0e0df,5,#d6d6d4,1,#cbcbca,1,#c0c0be,1,#b5b5b4,1,#aaaaa8,1,#9e9e9c,1,#929291,1,#868685,1,#7b7b7a,1,#6e6e6d,1,#626261,1,#555555,1,#4a4a4a,1
 
 tooltip default
Index: /extensions/LLGBO2/template/llgbo_content.tpl
===================================================================
--- /extensions/LLGBO2/template/llgbo_content.tpl	(revision 16753)
+++ /extensions/LLGBO2/template/llgbo_content.tpl	(revision 16754)
@@ -1,20 +1,26 @@
 <!-- LLGBO2 picture_content -->
-{if  isset($llgbo.TOOLTIPCSS)}	 
-		{$llgbo.TOOLTIPCSS} 
-{/if}  
-{if  isset($llgbo.GBOCSS)}	
-	{ if file_exists($llgbo.GBOCSS) } 
-			{combine_css path=$llgbo.GBOCSS order=+10}
-		{else}
-		  {combine_css path=$LLGBO_PATH|@cat:"css/llgbo_content_default.css" order=+10}
-	{/if} 
-{/if}  
-{if  !isset($llgbo.NOJS)}
-		{if  isset($llgbo.TOOLTIP)}	   
-			{combine_script id='llgbojqtooltip' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"}
-		 {/if}
-		 {if  isset($llgbo.FRAME_BEGIN)}	
-			{combine_script id='llgbojqframe' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js" }
-		{/if}
+ {if !isset($U_SLIDESHOW)}
+	{if  isset($llgbo.TOOLTIPCSS)}	 
+			{$llgbo.TOOLTIPCSS} 
+	{/if}  
+	{if  isset($llgbo.GBOCSS)}	
+		{ if file_exists($llgbo.GBOCSS) } 
+				{combine_css path=$llgbo.GBOCSS order=+10}
+			{else}
+			  {combine_css path=$LLGBO_PATH|@cat:"css/llgbo_content_default.css" order=+10}
+		{/if} 
+	{/if}  
+	{if  !isset($llgbo.NOJS)}
+			{if  isset($llgbo.TOOLTIP)}	   
+				{combine_script id='llgbojqtooltip' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"}
+			 {/if}
+			 {if  isset($llgbo.FRAME_BEGIN)}	
+				{combine_script id='llgbojqframe' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js" }
+			{/if}
+	{/if}
+
+	{if  isset($llgbo.READIMGREELSIZE)}	
+	<div id="LLGBO_READIMGREELSIZE" style="visibility:hidden;top:0;"> <!--  if exists Force javascript LlgboFr_Resize  to Read MainImage Reel Size via URL" --></div>
+	{/if}
 {/if}
 
