Index: extensions/LLGBO2/admin/llgbo_admin.php
===================================================================
--- extensions/LLGBO2/admin/llgbo_admin.php	(revision 14126)
+++ extensions/LLGBO2/admin/llgbo_admin.php	(revision 14421)
@@ -122,5 +122,6 @@
 	if (!isset($_POST['llgbo_tooltip_disp'])) {$_POST['llgbo_tooltip_disp'] = 'false';}  
 	if (!isset($_POST['llgbo_exifunderbt'])) {$_POST['llgbo_exifunderbt'] = 'false';}  
-	if (!isset($_POST['llgbo_usemap'])) {$_POST['llgbo_usemap'] = 'false';}
+	if (!isset($_POST['llgbo_jquery'])) {$_POST['llgbo_jquery'] = 'false';}
+
 	if (!isset($_POST['llgbo_usemap_thumb'])) {$_POST['llgbo_usemap_thumb'] = 'false';}
 	if (!isset($_POST['llgbo_title_frame'])) {$_POST['llgbo_title_frame'] = 'false';}    
@@ -128,24 +129,13 @@
 	if (!isset($_POST['llgbo_maintain_header'])) {$_POST['llgbo_maintain_header'] = '';}
 	if (!isset($_POST['llgbo_allinfo'])) {$_POST['llgbo_allinfo'] = 'false';}
-    if (!isset($_POST['llgbo_hdShadowbox'])) {$_POST['llgbo_hdShadowbox'] = 'false';} 
-	// compliance HD Shadowbox
-	  $shadowbowactive = 0;
-	  $query =" SELECT ID FROM  ".$prefixeTable."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_free'])) {$_POST['llgbo_free'] = 'false';} 
 	
 	if (!isset($_POST['llgbo_always_displayexif'])) {$_POST['llgbo_always_displayexif'] = 'false';} //10	
 	 $param_llgbo = array($_POST['llgbo_frame'],
 				$_POST['llgbo_tooltip_disp'],             $_POST['llgbo_exifunderbt'],
-				$_POST['llgbo_usemap'],			$_POST['llgbo_usemap_thumb'],
+				$_POST['llgbo_jquery'],			$_POST['llgbo_usemap_thumb'],
 				$_POST['llgbo_title_frame'],			$_POST['llgbo_header'],
 				$_POST['llgbo_maintain_header'],			$_POST['llgbo_allinfo'],
-				$_POST['llgbo_hdShadowbox']	,$_POST['llgbo_always_displayexif']
+				$_POST['llgbo_free']	,$_POST['llgbo_always_displayexif']
 			);		 
 	$llgbo_new_value = implode ("," , $param_llgbo);
@@ -170,5 +160,5 @@
 	  {$template->assign('LLGBO_EXIFUNDERBT' , 'true');}  else  {$template->assign( 'LLGBO_EXIFUNDERBT' , "false");}
 	if ($conf['LLGBO_SETTINGS'][3]  == 'true')
-	  {$template->assign( array( 'LLGBO_USEMAP' => 'true'));}  else  { $template->assign( array( 'LLGBO_USEMAP' => "false"));}
+	  {$template->assign( array( 'LLGBO_JQUERY' => 'true'));}  else  { $template->assign( array( 'LLGBO_JQUERY' => "false"));}
 	if ($conf['LLGBO_SETTINGS'][4]  == 'true')
 	  {$template->assign( array( 'LLGBO_USEMAP_THUMB' => 'true'));}  else  { $template->assign( array( 'LLGBO_USEMAP_THUMB' => "false"));}
@@ -181,5 +171,5 @@
 	  {$template->assign(array( 'LLGBO_ALLINFO' => 'true'));}  else {  $template->assign( array( 'LLGBO_ALLINFO' => "false"));} 
 	if ($conf['LLGBO_SETTINGS'][9] == 'true')
-	  {$template->assign(array( 'LLGBO_HDShadowbox' => 'true'));}  else  { $template->assign(array( 'LLGBO_HDShadowbox' => "false"));}
+	  {$template->assign(array( 'LLGBO_FREE' => 'true'));}  else  { $template->assign(array( 'LLGBO_FREE' => "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 14126)
+++ extensions/LLGBO2/admin/llgbo_adminsettings.tpl	(revision 14421)
@@ -25,12 +25,15 @@
 		<td class="llgboinput">	{html_radios name='llgbo_exifunderbt' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_EXIFUNDERBT}</td>
   </tr>
-  <tr>
+<!--   Now in the Piwigo core 
+ <tr>
 		<td class="llgbolabel">{'llgbo_usemap'|@translate}</td>	
 		<td class="llgboinput">{html_radios name='llgbo_usemap' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_USEMAP}</td>
 	</tr>
+
 	<tr>
 		<td class="llgbolabel">{'llgbo_usemap_thumb'|@translate}</td>
 		<td class="llgboinput">	 {html_radios name='llgbo_usemap_thumb' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_USEMAP_THUMB}</td>	
 	</tr>
+		-->
 	<tr>
 		<td class="llgbolabel">{'llgbo_title_frame'|@translate}</td>
@@ -42,10 +45,18 @@
 		<td class="llgboinput">{html_radios name='llgbo_header' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_HEADER}</td>	
 	</tr>	
-	<tr><td class="llgbolabel"><HR WIDTH=80% ALIGN=LEFT></td> <td></td>
+  <!--   free was removed
+   	<tr><td class="llgbolabel"><HR WIDTH=90% ALIGN=LEFT></td> <td></td>
+	<tr>
+		<td class="llgbolabel">{'llgbo_jquery'|@translate}</td>	
+		<td class="llgboinput">{html_radios name='llgbo_jquery' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_JQUERY}</td>
+	</tr>
+
+	<tr><td class="llgbolabel"><HR WIDTH=90% ALIGN=LEFT></td> <td></td>
 	</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>   
+		<td class="llgbolabel">{'llgbo_free'|@translate}</td>
+		<td class="llgboinput">{html_radios name='llgbo_free' values='true,false'|@explode output='Yes,No'|@explode|translate selected=$LLGBO_FREE}</td>
+	</tr>  
+-->
 </table>
 
Index: extensions/LLGBO2/css/gbolook.css.php
===================================================================
--- extensions/LLGBO2/css/gbolook.css.php	(revision 14421)
+++ extensions/LLGBO2/css/gbolook.css.php	(revision 14421)
@@ -0,0 +1,12 @@
+<?php
+// Css for GBO  you can change the numeric value 
+// the php values are managed on the LLGGO administration tab  
+$gbolook = ' <! --- LLGBO  css-->
+<style type="text/css"> 
+#imageToolBar {border:0;}
+#gbo {margin:auto;}
+#theMainImage,#theImage img  {border:0;margin:0;box-shadow:0;padding:0}
+#gboh2 {position:relative;top:1.2em;font-size:1.1em;}
+ </style>';
+?>
+ 
Index: extensions/LLGBO2/include/manage_header.php
===================================================================
--- extensions/LLGBO2/include/manage_header.php	(revision 14421)
+++ extensions/LLGBO2/include/manage_header.php	(revision 14421)
@@ -0,0 +1,46 @@
+<?php
+if (!isset($page_name)) {$page_name ='index';}
+if ($conf['LLGBO_SETTINGS'] [6] = 'true' ) 
+{$no_header = false;
+
+$input= $_SERVER['PHP_SELF'];
+if ($conf['question_mark_in_urls'] == true)
+ {	foreach($_GET as $cle  =>$valeur) 
+		{$input= $input.$cle ;}
+}
+// print_r($input.'----'.$page_name ); 
+if  ( strpos( $input,'index') == true )
+{ 		
+		if ((strpos( $input,'index.php/') == false )  and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home
+		if ((strpos( $input,'categories') == true ) and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// categories
+		if ((strpos( $input,'category') == true ) and ($conf['LLGBO_HEADER'][1] == 'false')) {$no_header = true; }
+		if ((strpos( $input,'filter=') == true ) and ($conf['LLGBO_HEADER'][2] == 'false')) {$no_header = true; }
+		if ((strpos( $input,'categories/flat') == true ) and ($conf['LLGBO_HEADER'][3] == 'false')) {$no_header = true ;}
+		if ((strpos( $input,'categories/posted-monthly-list') == true ) and ($conf['LLGBO_HEADER'][4] == 'false')) {$no_header = true ;}
+		if ((strpos( $input,'additional_page') == true ) and ($conf['LLGBO_HEADER'][6] == 'false')) {$no_header = true; }
+		if ((strpos( $input,'most_visited') == true ) and ($conf['LLGBO_HEADER'][7] == 'false')) {$no_header = true ;}
+		if ((strpos( $input,'best_rated') == true ) and ($conf['LLGBO_HEADER'][8] == 'false')) {$no_header = true; }
+		if ((strpos( $input,'list') == true ) and ($conf['LLGBO_HEADER'][9] == 'false')) {$no_header = true; }
+		if ((strpos( $input,'recent_pics') == true ) and ($conf['LLGBO_HEADER'][10] == 'false')) {$no_header = true ;}
+		if ((strpos( $input,'tags') == true ) and ($conf['LLGBO_HEADER'][11] == 'false')) {$no_header = true; }
+		if ((strpos( $input,'created-monthly-list') == true ) and ($conf['LLGBO_HEADER'][12] == 'false')) {$no_header = true;}
+		if ((strpos( $input,'favorites') == true ) and ($conf['LLGBO_HEADER'][19] == 'false')) {$no_header = true;}
+		if ((strpos( $input,'recent_cats') == true ) and ($conf['LLGBO_HEADER'][20] == 'false')) {$no_header = true;;} 
+	 
+	}
+	//print_r($_GET.'----'.$page_name ); 
+if  ( strpos( $input,'index') == false )
+	 {if ( $page_name == 'index'   and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home
+	 if ( $page_name == 'picture' and  $conf['LLGBO_HEADER'][5] == 'false')  {$no_header = true;}//picture page
+	 if ( $page_name == 'tags' and  $conf['LLGBO_HEADER'][11] == 'false')  {$no_header = true;}//tags
+	 if ( $page_name == 'search' and  $conf['LLGBO_HEADER'][13] == 'false')  {$no_header = true;}//search	
+	 if ( $page_name == 'comments' and  $conf['LLGBO_HEADER'][14] == 'false')  {$no_header = true;}//comments
+	 if ( $page_name == 'about' and  $conf['LLGBO_HEADER'][15] == 'false')  {$no_header = true;}//about	 
+	 if ( $page_name == 'notification' and  $conf['LLGBO_HEADER'][16] == 'false')  {$no_header = true;}//notification	 
+	 if ( $page_name == 'register' and  $conf['LLGBO_HEADER'][17] == 'false')  {$no_header = true;} //notification	 
+	 if ( $page_name == 'identification' and  $conf['LLGBO_HEADER'][18] == 'false')  {$no_header = true;}//about	 
+	 }
+ if ($no_header == true)
+{$template->append('head_elements','<!-- llgbo -->'."\n".'<STYLE type="text/css">'."\n".'#theHeader{display: none}'."\n".'header_msgs {position:static}'."\n".'</STYLE>');}
+}	
+?>
Index: extensions/LLGBO2/include/manage_picture_content.php
===================================================================
--- extensions/LLGBO2/include/manage_picture_content.php	(revision 14421)
+++ extensions/LLGBO2/include/manage_picture_content.php	(revision 14421)
@@ -0,0 +1,54 @@
+<?php
+$prev = $template->get_template_vars('previous');
+$next  = $template->get_template_vars('next');
+//print_r($next);
+$swtimg =   '||<img src=';	
+//----------------------------------------------------	 
+//-------      Tooltip                   -------------	 
+//----------------------------------------------------	 
+If ($conf['LLGBO_SETTINGS'][1]  == 'true' )//   tooltip  
+{   if (isset($prev)){$template->append('previous',  array('TITLE' =>  $prev['TITLE'].$swtimg.$prev['THUMB_SRC'].'>'),TRUE);}
+	if (isset($next)){$template->append('next',  array('TITLE' =>  $next['TITLE'].$swtimg.$next['THUMB_SRC'].'>'),TRUE);}
+ 	$template->append('llgbo', array('tooltipCSS'  => $sweetcss), true); 
+	}	
+	
+//----------------------------------------------------	 
+/*              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 ='';
+		$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_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,
+			  'FRAME_END' => $frame_end,
+			  'GBOCSS' => $gbolook ), true); 
+
+			 
+	If ($conf['LLGBO_SETTINGS'] [5]  == 'true' )  /* title on frame */ 
+		 {  $template->append('llgbo', array(
+				 'TITLE_FRAME_COLOR' => $conf['LLGBO_FRAME'][0],), 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 14421)
+++ extensions/LLGBO2/js/jquery_llgboframeresize.js	(revision 14421)
@@ -0,0 +1,28 @@
+// LLGBO frame resize 
+jQuery(document).ready(function($){  
+	$("#theMainImage").load(function(){
+ 		var FrmHeight =   parseInt(this.height);
+		var FrmWidth =     parseInt(this.width);
+		var FrmLastBorder = 0; 
+		var gboid = document.getElementById("gbo")
+		if (gboid)
+			{for ( i=1; i<32; i=i+2 )
+				{var tgname = "llgboframe"+(i);
+				var FrmS = document.getElementById(tgname);
+					if (FrmS)	
+						{ 
+						FrmHeight = FrmHeight + (FrmLastBorder * 2);
+						FrmWidth= FrmWidth + (FrmLastBorder * 2);
+						FrmS.style.height = FrmHeight+"px";
+						FrmS.style.width  = FrmWidth+"px";
+						FrmLastBorder = parseInt(FrmS.style.borderWidth);
+						}
+				}
+			FrmHeight = FrmHeight + (FrmLastBorder * 2);
+			FrmWidth = FrmWidth + (FrmLastBorder * 2);
+			gboid.style.height = FrmHeight+"px";
+			gboid.style.width  = FrmWidth+"px";
+			}
+	});	
+});
+
Index: extensions/LLGBO2/js/jquery_llgbotip.js
===================================================================
--- extensions/LLGBO2/js/jquery_llgbotip.js	(revision 14421)
+++ extensions/LLGBO2/js/jquery_llgbotip.js	(revision 14421)
@@ -0,0 +1,86 @@
+jQuery(document).ready(function($){  
+	/* CONFIG */		
+		// these 2 variables determine popup's gap from the cursor		
+		xGap = 10;
+		yGap = 10;
+		MyTT = "";
+		MainTitle ="";
+		
+		maxTop = 0;
+		maxLeft =0;
+        
+	/* END CONFIG */	
+	$("#theMainImage").mouseover(function(){
+  //  tooltip IMG title remove	 
+		MainTitle = this.title;
+		this.title =""; 
+		});	
+	$("#theMainImage").mouseout(function(){
+  //   tooltip IMG  title restaure	 
+		this.title = MainTitle ; 
+		});	
+		
+	$("area,a").mouseover(function(e){	
+			MainTitle = $("#theMainImage").attr("title");
+	        $("#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>";}
+					}		
+			$("body").append("<div id='toolTip'>"+this.tt+"</div>"); 
+		
+		    MyTT = $("#toolTip");
+			if (this.id == "Rules")
+					{ MyTT.css( {'border-color' : '#c92'});}
+		    if (this.id == "RulesEx")
+				{ MyTT.css( {'border-color' : '#d3fed2'})
+				$("#toolTip #title").css( {'color' : '#d3fed2'}); }
+		
+			updateXY(e);
+			 MyTT.css("opacity", 0.25)
+				.show; 
+			 MyTT.fadeTo(1500,.95);
+				});			
+ 
+	$("area,a").mouseout(function(e){	
+		if (this.activate =='ok') // mouseout without mouseover we keep the right title
+			{ this.title = this.t;	 
+				$("#toolTip")
+				.fadeOut("slow")
+				.remove();
+				 $("#theMainImage").attr("title",MainTitle); // for IE 
+				 }
+ });	
+	$("area,a").mousemove(function(e){
+		updateXY(e);
+	});	
+	    var updateXY = function(e) {
+			var xLeft,xCord;
+            MyTT = $("#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/js/sweettitlesn.js
===================================================================
--- extensions/LLGBO2/js/sweettitlesn.js	(revision 14126)
+++ 	(revision )
@@ -1,52 +1,0 @@
-// Author: Dustin Diaz | http://www.dustindiaz.com
-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 );EC.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] );EC.add(obj,type,fn);}
- else{obj["on"+type] = obj["e"+type+fn];}}
- var EC = function(){
- var LE = [];return{
- LE : LE,
- add : function(node,sEventName,fHandler){
- LE.push(arguments);},
- flush : function(){
- var i,it;for(i = LE.length - 1;i >= 0;i = i - 1){
- it = LE[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',EC.flush);
-
-var S ={xCord : 0,yCord : 0,tipElements : ['a','span','area'],obj : Object,x : Object,
- init : function(){if ( !document.getElementById || !document.createElement || !document.getElementsByTagName ){return;}
- var i,j,Over;this.x = document.createElement('div');
- this.x.id = 'toolTip';document.getElementsByTagName('body')[0].appendChild(this.x);this.x.style.top = '0';this.x.style.visibility = 'hidden';var tipLen = this.tipElements.length;for ( i=0;i<tipLen;i++ ){
- var Elms = document.getElementsByTagName(this.tipElements[i]);
-
- var curLen = Elms.length;for ( j=0;j<curLen;j++ ){
- var el= Elms[j];var tv = el.getAttribute('title')
-   if (el.className  != 'navThumb')
- {  
- if (tv != "null" && tv !=null && tv !="") //chrome
-{addEvent2(el,'mouseover',this.tipOver); addEvent2(el,'mousemove',this.tipMouseMove); addEvent2(el,'mouseout',this.tipOut); var sv = el.getAttribute('swttips'); el.setAttribute('Stitle',tv); el.setAttribute('Stip',sv ); el.removeAttribute('title');
- el.removeAttribute('swttips');} el.removeAttribute('alt');} }
- } },
- updateXY : function(e){ if (document.captureEvents){S.xCord = e.pageX;S.yCord = e.pageY;} else if (window.event.clientX){S.xCord = window.event.clientX+document.documentElement.scrollLeft;S.yCord = window.event.clientY+document.documentElement.scrollTop;}},
- tipOut: function(){
- if ( window.tID ){clearTimeout(tID);}
- if ( window.opacityID ){clearTimeout(opacityID);}
- S.x.style.visibility = 'hidden';},
- checkNode : function(){ var trueObj = this.obj;if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ){ return trueObj;} else{return trueObj.parentNode;}},
- tipOver : function(e){S.obj = this;tID = window.setTimeout("S.tipShow()",100); S.updateXY(e);},
- tipMouseMove : function(e){S.updateXY(e);S.tipMove();},
- tipShow : function(){ 
- var Z = this.checkNode(); h1 = "<p class='title'>" + Z.getAttribute('Stitle') + "</p>";
- var St = Z.getAttribute('Stip'); 
- if ((St != null) && (St != "null") && (St !="") ){h1 = h1 +"<p>"+St+"</p>";} 
- this.x.innerHTML = h1;
- S.Move;var T = this.x.style;T.visibility = 'visible';T.opacity = '.1';this.tipFade(10);},
- tipMove: function()
-{var scrX = Number(this.xCord);var scrY = Number(this.yCord);var tp = parseInt(scrY+8);var lt = parseInt(scrX+8);var D = document.documentElement;var T = this.x.style;if ( parseInt(D.clientWidth+D.scrollLeft) < parseInt(this.x.offsetWidth+lt) ){
- T.left = parseInt(lt-(this.x.offsetWidth+3))+'px';} else{T.left = lt+'px';}
- if ( parseInt(D.clientHeight+D.scrollTop) < parseInt(this.x.offsetHeight+tp) ){T.top = parseInt(tp-(this.x.offsetHeight+3))+'px';} else{T.top = tp+'px';}},
- tipFade: function(opac){var passed = parseInt(opac);var newOpac = parseInt(passed+10); T = this.x.style;if ( newOpac < 92 ){T.opacity = '.'+newOpac;T.filter = "alpha(opacity:"+newOpac+")";opacityID = window.setTimeout("S.tipFade('"+newOpac+"')",20);} else{ T.opacity = '.92';T.filter = "alpha(opacity:92)";}}
-};function pageLoader(){ S.init();}
-addEvent2(window,'load',pageLoader);
Index: extensions/LLGBO2/js/sweettitlesn1_comment.js
===================================================================
--- extensions/LLGBO2/js/sweettitlesn1_comment.js	(revision 14126)
+++ 	(revision )
@@ -1,175 +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);
-/*Sweet Titles (c) 2005 http://www.dustindiaz.com
-Revision pour llgbo : 2006*/
-var swtT = { 
-	xCord : 0,								
-	yCord : 0,								
-	tipElements : ['a','area'],
-	forbidenClasses : ['navThumb','markItUpButton'],
-	MainTitle : '',	
-	obj : Object,							
-	x : Object,							
-	init : function() {
-		if ( !document.getElementById ||
-			!document.createElement ||
-			!document.getElementsByTagName ) {return;	}
-		var i,j,Over,c;
-		this.x = document.createElement('div');	
-		this.x.id = 'toolTip';
-		document.getElementsByTagName('body')[0].appendChild(this.x);
-		this.x.style.top = '0';
-		this.x.style.visibility = 'hidden';
-		var tipLen = this.tipElements.length;
-		for ( i=0; i<tipLen; i++ ) {
-			var Elms = document.getElementsByTagName(this.tipElements[i]);
-			var curLen = Elms.length;
-			for ( j=0; j<curLen; j++ ) {
-				var el= Elms[j];
-				var Active = '';
-				var fcLen = this.forbidenClasses.length;
-				for (c=0; c<fcLen; c++) {
-					if ( el.parentNode.className.indexOf(this.forbidenClasses[c]) != -1 ||
-					el.className.indexOf(this.forbidenClasses[c]) != -1) 
-					 { Active = 'No'; }} 
-				
-				//
-				 if (Active != 'No' ) 
-					{ var tv = el.getAttribute('title');
-						if ( tv != null && tv != "null" && tv !="") //chrome
-						 {addEvent2(el,'mouseover',this.tipOver);
-							addEvent2(el,'mousemove',this.tipMouseMove);
-							addEvent2(el,'mouseout',this.tipOut);
-							var sv = el.getAttribute('swttips');
-							el.setAttribute('tiptitle', tv);
-							el.setAttribute('tipswt', sv );
-							el.removeAttribute('swttips');
-							el.removeAttribute('alt');
-							el.removeAttribute('title'); } 
-					}
-}
-		}
-	},
-	updateXY : function(e) {
-		if ( document.captureEvents ) {
-			swtT.xCord = e.pageX;
-			swtT.yCord = e.pageY;
-		} else if ( window.event.clientX ) {
-		var ddE = document.documentElement
-			swtT.xCord = window.event.clientX+ddE.scrollLeft;
-			swtT.yCord = window.event.clientY+ddE.scrollTop;} },
-	tipOut: function() {
-		if ( window.tID ) {
-			clearTimeout(tID);		}
-		if ( window.opacityID ) {
-			clearTimeout(opacityID);}
-		swtT.x.style.visibility = 'hidden';
-		// restore IE Title
-		document.getElementById('theMainImage').setAttribute('title',MainTitle);},
-		
-	checkNode : function() {
-		var trueObj = this.obj;
-		if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) {
-			return trueObj;
-		} else {return trueObj.parentNode;}
-	},
-	tipOver : function(e) {swtT.obj = this;
-	tID = window.setTimeout("swtT.tipShow()",100);
-	 swtT.updateXY(e);
-	 // Erase IE tooltip on title
-	   MainImg = document.getElementById('theMainImage');
-	   MainTitle = MainImg.getAttribute('title');	
-	   MainImg.setAttribute('title',"");
-	},
-	
-	tipMouseMove : function(e) {swtT.updateXY(e); swtT.tipMove();},
-	
-	tipShow : function() {			
-		var anch = this.checkNode();
-		this.x.innerHTML ="";
-	 this.x.innerHTML = "<p class='title'> <span> "+anch.getAttribute('tiptitle')+"</span></p>";
-		sv = anch.getAttribute('tipswt');
-		if ((sv != null) && (sv != "null") && (sv !="")) //chrome
-		{this.x.innerHTML= this.x.innerHTML + "<p>" + anch.getAttribute('tipswt') + "</p>"; }
-		swtT.Move;
-		var T = this.x.style;
-		var scrX = Number(this.xCord);
-		var scrY = Number(this.yCord);
-		var tp = parseInt(scrY+8);
-		var lt = parseInt(scrX+8);
-		var D = document.documentElement;
-	 		if ( parseInt(D.clientWidth+D.scrollLeft) < parseInt(this.x.offsetWidth+lt) ) {
-			T.left = parseInt(lt-(this.x.offsetWidth+3))+'px';
-		} else {
-			T.left = lt+'px';		}
-		if ( parseInt(D.clientHeight+D.scrollTop) < parseInt(this.x.offsetHeight+tp) ) {
-			T.top = parseInt(tp-(this.x.offsetHeight+3))+'px';
-		} else {T.top = tp+'px';		}
-		T.visibility = 'visible';
-		T.opacity = '.1';
-		this.tipFade(10);	},
-	
-	tipMove: function()
-	{ var scrX = Number(this.xCord);
-		var scrY = Number(this.yCord);
-		var tp = parseInt(scrY+8);
-		var lt = parseInt(scrX+8);
-		var D = document.documentElement;
-		var T = this.x.style;
-		if ( parseInt(D.clientWidth+D.scrollLeft) < parseInt(this.x.offsetWidth+lt) ) {
-			T.left = parseInt(lt-(this.x.offsetWidth+3))+'px';
-		} else {
-			T.left = lt+'px';		}
-		if ( parseInt(D.clientHeight+D.scrollTop) < parseInt(this.x.offsetHeight+tp) ) {
-			T.top = parseInt(tp-(this.x.offsetHeight+3))+'px';
-		} else {T.top = tp+'px';		}
-	},
-	tipFade: function(opac) {
-		var passed = parseInt(opac);
-		var newOpac = parseInt(passed+10);
-		 T = this.x.style;
-		if ( newOpac < 92 ) {
-			T.opacity = '.'+newOpac;
-			T.filter = "alpha(opacity:"+newOpac+")";
-			opacityID = window.setTimeout("swtT.tipFade('"+newOpac+"')",20);}
-		else { T.opacity = '.92';
-			T.filter = "alpha(opacity:92)";		}
-	}
-};
-function pageLoader() {	swtT.init();}
-addEvent2(window,'load',pageLoader);
Index: extensions/LLGBO2/js/sweettitlesn_comment.js
===================================================================
--- extensions/LLGBO2/js/sweettitlesn_comment.js	(revision 14126)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
-Sweet Titles (c) Creative Commons 2005
-http://creativecommons.org/licenses/by-sa/2.5/
-Author: Dustin Diaz | http://www.dustindiaz.com
-Revision:ex-ftb 2006*/
-var sweetTitles = { 
-	xCord : 0,								
-	yCord : 0,								
-	tipElements : ['a','img','span','area'],			
-	obj : Object,							
-	x : Object,							
-	init : function() {
-		if ( !document.getElementById ||
-			!document.createElement ||
-			!document.getElementsByTagName ) {return;	}
-		var i,j,Over;
-		this.x = document.createElement('div');	
-		this.x.id = 'toolTip';
-		document.getElementsByTagName('body')[0].appendChild(this.x);
-		this.x.style.top = '0';
-		this.x.style.visibility = 'hidden';
-		var tipLen = this.tipElements.length;
-		for ( i=0; i<tipLen; i++ ) {
-			var Elms = document.getElementsByTagName(this.tipElements[i]);
-			var curLen = Elms.length;
-			for ( j=0; j<curLen; j++ ) {
-				var el= Elms[j];
-				   if (el.className  != 'navThumb') // pas de tooltip sur nav thumb
-					{ var tv = el.getAttribute('title')
-						if ( tv != null && tv != "null" && tv !="")  //chrome
-						 {addEvent(el,'mouseover',this.tipOver);
-							addEvent(el,'mousemove',this.tipMouseMove);
-							addEvent(el,'mouseout',this.tipOut);
-							var sv = el.getAttribute('swttips');
-							el.setAttribute('tiptitle', tv);
-							el.setAttribute('tipswt', sv );
-							el.removeAttribute('title'); 
-							el.removeAttribute('swttips');}
-						el.removeAttribute('alt');}
-					}
-		}
-	},
-
-	updateXY : function(e) {
-		if ( document.captureEvents ) {
-			sweetTitles.xCord = e.pageX;
-			sweetTitles.yCord = e.pageY;
-		} else if ( window.event.clientX ) {
-			sweetTitles.xCord = window.event.clientX+document.documentElement.scrollLeft;
-			sweetTitles.yCord = window.event.clientY+document.documentElement.scrollTop;}
-	},
-	tipOut: function() {
-		if ( window.tID ) {
-			clearTimeout(tID);		}
-		if ( window.opacityID ) {
-			clearTimeout(opacityID);}
-		sweetTitles.x.style.visibility = 'hidden';},
-	checkNode : function() {
-		var trueObj = this.obj;
-		if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) {
-			return trueObj;
-		} else {return trueObj.parentNode;}
-	},
-	tipOver : function(e) {sweetTitles.obj = this;
-	tID = window.setTimeout("sweetTitles.tipShow()",100);
-	 sweetTitles.updateXY(e);},
-	
-	tipMouseMove : function(e) {sweetTitles.updateXY(e); sweetTitles.tipMove();},
-	
-	tipShow : function() {			
-		var anch = this.checkNode();
-		this.x.innerHTML ="";
-	 this.x.innerHTML = "<p class='title'> <span> "+anch.getAttribute('tiptitle')+"</span></p>";
-		sv = anch.getAttribute('tipswt');
-		if (( sv != "null" )&& (sv !="")) // for chrome
-		{this.x.innerHTML= this.x.innerHTML + "<p>" + anch.getAttribute('tipswt') + "</p>"; }
-		sweetTitles.Move;
-		var T = this.x.style;
-		T.visibility = 'visible';
-		T.opacity = '.1';
-		this.tipFade(10);	},
-	
-	tipMove: function()
-	{ var scrX = Number(this.xCord);
-		var scrY = Number(this.yCord);
-		var tp = parseInt(scrY+8);
-		var lt = parseInt(scrX+8);
-		var D = document.documentElement;
-		var T = this.x.style;
-		if ( parseInt(D.clientWidth+D.scrollLeft) < parseInt(this.x.offsetWidth+lt) ) {
-			T.left = parseInt(lt-(this.x.offsetWidth+3))+'px';
-		} else {
-			T.left = lt+'px';		}
-		if ( parseInt(D.clientHeight+D.scrollTop) < parseInt(this.x.offsetHeight+tp) ) {
-			T.top = parseInt(tp-(this.x.offsetHeight+3))+'px';
-		} else {T.top = tp+'px';		}
-	},
-	tipFade: function(opac) {
-		var passed = parseInt(opac);
-		var newOpac = parseInt(passed+10);
-		 T = this.x.style;
-		if ( newOpac < 92 ) {
-			T.opacity = '.'+newOpac;
-			T.filter = "alpha(opacity:"+newOpac+")";
-			opacityID = window.setTimeout("sweetTitles.tipFade('"+newOpac+"')",20);}
-		else { T.opacity = '.92';
-			T.filter = "alpha(opacity:92)";		}
-	}
-};
-function pageLoader() {	sweetTitles.init();}
-addEvent2(window,'load',pageLoader);
Index: extensions/LLGBO2/js/sweettitlesn_commentori.js
===================================================================
--- extensions/LLGBO2/js/sweettitlesn_commentori.js	(revision 14126)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/*
-Sweet Titles (c) Creative Commons 2005
-http://creativecommons.org/licenses/by-sa/2.5/
-Author: Dustin Diaz | http://www.dustindiaz.com
-Revision:ex-ftb 2006*/
-var sweetTitles = { 
-	xCord : 0,								
-	yCord : 0,								
-	tipElements : ['a','img','span','area'],			
-	obj : Object,							
-	x : Object,							
-	init : function() {
-		if ( !document.getElementById ||
-			!document.createElement ||
-			!document.getElementsByTagName ) {return;	}
-		var i,j,Over;
-		this.x = document.createElement('div');	
-		this.x.id = 'toolTip';
-		document.getElementsByTagName('body')[0].appendChild(this.x);
-		this.x.style.top = '0';
-		this.x.style.visibility = 'hidden';
-		var tipLen = this.tipElements.length;
-		for ( i=0; i<tipLen; i++ ) {
-			var Elms = document.getElementsByTagName(this.tipElements[i]);
-			var curLen = Elms.length;
-			for ( j=0; j<curLen; j++ ) {
-				var el= Elms[j];
-				var tv = el.getAttribute('title')
-				if ( tv != null && tv != "null" && tv !="")  //chrome
-				 {addEvent(el,'mouseover',this.tipOver);
-					addEvent(el,'mousemove',this.tipMouseMove);
-					addEvent(el,'mouseout',this.tipOut);
-					var sv = el.getAttribute('swttips');
-					el.setAttribute('tiptitle', tv);
-					el.setAttribute('tipswt', sv );
-					el.removeAttribute('title'); 
-					el.removeAttribute('swttips');}
-				el.removeAttribute('alt');}
-		}
-	},
-
-	updateXY : function(e) {
-		if ( document.captureEvents ) {
-			sweetTitles.xCord = e.pageX;
-			sweetTitles.yCord = e.pageY;
-		} else if ( window.event.clientX ) {
-			sweetTitles.xCord = window.event.clientX+document.documentElement.scrollLeft;
-			sweetTitles.yCord = window.event.clientY+document.documentElement.scrollTop;}
-	},
-	tipOut: function() {
-		if ( window.tID ) {
-			clearTimeout(tID);		}
-		if ( window.opacityID ) {
-			clearTimeout(opacityID);}
-		sweetTitles.x.style.visibility = 'hidden';},
-	checkNode : function() {
-		var trueObj = this.obj;
-		if ( this.tipElements.inArray(trueObj.nodeName.toLowerCase()) ) {
-			return trueObj;
-		} else {return trueObj.parentNode;}
-	},
-	tipOver : function(e) {sweetTitles.obj = this;
-	tID = window.setTimeout("sweetTitles.tipShow()",100);
-	 sweetTitles.updateXY(e);},
-	
-	tipMouseMove : function(e) {sweetTitles.updateXY(e); sweetTitles.tipMove();},
-	
-	tipShow : function() {			
-		var anch = this.checkNode();
-		this.x.innerHTML ="";
-	 this.x.innerHTML = "<p class='title'> <span> "+anch.getAttribute('tiptitle')+"</span></p>";
-		sv = anch.getAttribute('tipswt');
-		if (( sv != "null" )&& (sv !="")) // for chrome
-		{this.x.innerHTML= this.x.innerHTML + "<p>" + anch.getAttribute('tipswt') + "</p>"; }
-		sweetTitles.Move;
-		var T = this.x.style;
-		T.visibility = 'visible';
-		T.opacity = '.1';
-		this.tipFade(10);	},
-	
-	tipMove: function()
-	{ var scrX = Number(this.xCord);
-		var scrY = Number(this.yCord);
-		var tp = parseInt(scrY+8);
-		var lt = parseInt(scrX+8);
-		var D = document.documentElement;
-		var T = this.x.style;
-		if ( parseInt(D.clientWidth+D.scrollLeft) < parseInt(this.x.offsetWidth+lt) ) {
-			T.left = parseInt(lt-(this.x.offsetWidth+3))+'px';
-		} else {
-			T.left = lt+'px';		}
-		if ( parseInt(D.clientHeight+D.scrollTop) < parseInt(this.x.offsetHeight+tp) ) {
-			T.top = parseInt(tp-(this.x.offsetHeight+3))+'px';
-		} else {T.top = tp+'px';		}
-	},
-	tipFade: function(opac) {
-		var passed = parseInt(opac);
-		var newOpac = parseInt(passed+10);
-		 T = this.x.style;
-		if ( newOpac < 92 ) {
-			T.opacity = '.'+newOpac;
-			T.filter = "alpha(opacity:"+newOpac+")";
-			opacityID = window.setTimeout("sweetTitles.tipFade('"+newOpac+"')",20);}
-		else { T.opacity = '.92';
-			T.filter = "alpha(opacity:92)";		}
-	}
-};
-function pageLoader() {	sweetTitles.init();}
-addEvent2(window,'load',pageLoader);
Index: extensions/LLGBO2/main.inc.php
===================================================================
--- extensions/LLGBO2/main.inc.php	(revision 14126)
+++ extensions/LLGBO2/main.inc.php	(revision 14421)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: Look_like_gbo2 
-Version:  2.3.b
+Version:  2.4.A
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
 Author: GBo 
@@ -8,17 +8,10 @@
 Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery 
 Add a border around  picture ......
-  2.2.a compliant 2.2rc Piwigo
-  2.2.b Full compliant 2.2 Piwigo + fix bug in admin
-  2.2.c Fix JS bug with FF4.01 + add language Cz
-  2.2.d fix bug with $high and openwindow
-  2.3.a  new translation
-  2.3.b  No modification on alt_img
+	2.4.A Compliance Piwigo 2.4 + jquery
  */
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-/* création d'une instance de la classe   */
-$obj = new look_like_gbo(); /* class loading */
+
 global $conf; 
-
-define ('LLGBO_INFO_VERSION','2.3.b');
+define ('LLGBO_INFO_VERSION','2.4.A');
 if (!defined('LLGBO_PATH'))
 {define('LLGBO_PATH' ,get_root_url().'plugins/'.basename(dirname(__FILE__)) . '/');}
@@ -27,11 +20,7 @@
  $conf['LLGBO_TOOLTIP'] = explode(",",$conf['LLGBOTOOLTIP']);
  $conf['LLGBO_FRAME'] = explode (",",$conf['LLGBOFRAME']); 
- $conf['LLGBO_HEADER'] = explode (",",$conf['LLGBOHEADER']);   
+ $conf['LLGBO_HEADER'] = explode (",",$conf['LLGBOHEADER']); 
+	
  load_language('plugin.lang', LLGBO_PATH);
-/////////////////////////////////////////////////////
-/*  PLUGIN CLASS  */
-/////////////////////////////////////////////////////
-class look_like_gbo
-{
 
 /* Set the administration panel of the plugin */
@@ -46,20 +35,19 @@
 /*       ALWAYS      DISPLAY      METADATA */
 //-------------------------------------------------------------
-function AutoDisplayMetadata()
-{global $conf;
-	 If ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  // exif under bt
+function llgbo_BeginPicture()
+{global $conf,$template;
+If ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  // exif under bt
 	{$_GET['metadata'] = 'O';}
 	
-	If ($conf['LLGBO_SETTINGS'][10]  == 'true' )  //always display metadata
+If ($conf['LLGBO_SETTINGS'][10]  == 'true' )  //always display metadata
 	{if ( pwg_get_session_var('show_metadata') == null )
 		{  pwg_set_session_var('show_metadata', 1 );
 		 }}
+
 }
-//------------------------------------------------------------- 
-// RESET NOFOLLOW, NOINDEX
-//-------------------------------------------------------------
-function MyBeginheader()
+
+function llgbo_beginheader()
 { global $page,$conf;
-	 If ($conf['LLGBO_SETTINGS'][2]  == 'true' ) // reset nofollow, noindex
+	If ($conf['LLGBO_SETTINGS'][2]  == 'true' ) // reset nofollow, noindex
 	{ unset ($page['meta_robots']);}
 }
@@ -67,284 +55,99 @@
 //      MANAGE               H E A D E R 
 //-------------------------------------------------------------
-function Myheader()
+function llgbo_endHeader()
 {global $template,$conf;
 $page_name = script_basename();
-if (!isset($page_name)) {$page_name ='index';}
-if ($conf['LLGBO_SETTINGS'] [6] = 'true' ) 
-{$no_header = false;
-
-$input= $_SERVER['PHP_SELF'];
-if ($conf['question_mark_in_urls'] == true)
- {	foreach($_GET as $cle  =>$valeur) 
-		{$input= $input.$cle ;}
-}
-// print_r($input.'----'.$page_name ); 
-if  ( strpos( $input,'index') == true )
-{ 		
-		if ((strpos( $input,'index.php/') == false )  and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home
-		if ((strpos( $input,'categories') == true ) and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// categories
-		if ((strpos( $input,'category') == true ) and ($conf['LLGBO_HEADER'][1] == 'false')) {$no_header = true; }
-		if ((strpos( $input,'filter=') == true ) and ($conf['LLGBO_HEADER'][2] == 'false')) {$no_header = true; }
-		if ((strpos( $input,'categories/flat') == true ) and ($conf['LLGBO_HEADER'][3] == 'false')) {$no_header = true ;}
-		if ((strpos( $input,'categories/posted-monthly-list') == true ) and ($conf['LLGBO_HEADER'][4] == 'false')) {$no_header = true ;}
-		if ((strpos( $input,'additional_page') == true ) and ($conf['LLGBO_HEADER'][6] == 'false')) {$no_header = true; }
-		if ((strpos( $input,'most_visited') == true ) and ($conf['LLGBO_HEADER'][7] == 'false')) {$no_header = true ;}
-		if ((strpos( $input,'best_rated') == true ) and ($conf['LLGBO_HEADER'][8] == 'false')) {$no_header = true; }
-		if ((strpos( $input,'list') == true ) and ($conf['LLGBO_HEADER'][9] == 'false')) {$no_header = true; }
-		if ((strpos( $input,'recent_pics') == true ) and ($conf['LLGBO_HEADER'][10] == 'false')) {$no_header = true ;}
-		if ((strpos( $input,'tags') == true ) and ($conf['LLGBO_HEADER'][11] == 'false')) {$no_header = true; }
-		if ((strpos( $input,'created-monthly-list') == true ) and ($conf['LLGBO_HEADER'][12] == 'false')) {$no_header = true;}
-		if ((strpos( $input,'favorites') == true ) and ($conf['LLGBO_HEADER'][19] == 'false')) {$no_header = true;}
-		if ((strpos( $input,'recent_cats') == true ) and ($conf['LLGBO_HEADER'][20] == 'false')) {$no_header = true;;} 
-	 
-	}
-	//print_r($_GET.'----'.$page_name ); 
-if  ( strpos( $input,'index') == false )
-	 {if ( $page_name == 'index'   and ($conf['LLGBO_HEADER'][0] == 'false')) {$no_header = true;}// home
-	 if ( $page_name == 'picture' and  $conf['LLGBO_HEADER'][5] == 'false')  {$no_header = true;}//picture page
-	 if ( $page_name == 'tags' and  $conf['LLGBO_HEADER'][11] == 'false')  {$no_header = true;}//tags
-	 if ( $page_name == 'search' and  $conf['LLGBO_HEADER'][13] == 'false')  {$no_header = true;}//search	
-	 if ( $page_name == 'comments' and  $conf['LLGBO_HEADER'][14] == 'false')  {$no_header = true;}//comments
-	 if ( $page_name == 'about' and  $conf['LLGBO_HEADER'][15] == 'false')  {$no_header = true;}//about	 
-	 if ( $page_name == 'notification' and  $conf['LLGBO_HEADER'][16] == 'false')  {$no_header = true;}//notification	 
-	 if ( $page_name == 'register' and  $conf['LLGBO_HEADER'][17] == 'false')  {$no_header = true;} //notification	 
-	 if ( $page_name == 'identification' and  $conf['LLGBO_HEADER'][18] == 'false')  {$no_header = true;}//about	 
-	 }
- if ($no_header == true)
-{$template->append('head_elements','<!-- llgbo -->'."\n".'<STYLE type="text/css">'."\n".'#theHeader{display: none}'."\n".'header_msgs {position:static}'."\n".'</STYLE>');}
-}	
- 
+include_once(LLGBO_PATH.'include/manage_header.php');
 }  // end header 
- 
 //------------------------------------------------------------- 
 //* IMPROVE FUNCTIONNALITIES --> PICTURE.TPL
 //-------------------------------------------------------------	
-function  DisplayGboLook()
-{ global $template,$conf,$lang;
-$ThePicture = $template->get_template_vars('current'); 
-// 2.1.f fix notice with video
-if ($ThePicture['is_picture'] <> 1 )  
-	{  $lang['Show file metadata'] =  'No Metadata';
-		return;}
-// ---------------------------		
-    $meta = "";
+function  llgbo_EndPicture()
+{ global $template,$conf;
+$infofile = $template->get_template_vars('INFO_FILE'); 
+// ---- Metadata ----------	
+$pictExt = substr($infofile,-3);
+if (!in_array ( $pictExt,$conf['picture_ext']))
+	{$lang['Show file metadata'] =  'No Metadata';}
+	else
+	{$meta = "";
 	$u_metadata = $template->get_template_vars('U_METADATA');
-	$swt =   ' swttips="';	
+ 	$swt = "";
 	 If ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  // exif under bt
 		{  $metadata = $template->get_template_vars('metadata');
-		if(is_array($metadata))
-			{ 	if (isset($metadata[0]) and is_array($metadata[0]))
-				{ foreach($metadata[0] as $cle =>$tableau)
-					 { if(is_array($tableau))
+		if (is_array($metadata)) 
+		  {  if (isset($metadata[0]) and is_array($metadata[0]))
+				{foreach($metadata[0] as $cle =>$tableau)
+					{ if(is_array($tableau))
 					 {   foreach($tableau as $cle=>$valeur)
-						{   $swt= $swt.$cle.' : '.$valeur.'<br>';
-							$meta = 1;}
-					}	}
+						{   $swt= $swt.$cle.' : '.$valeur.'||';
+							$meta = 1;} }	}
 					if  ( pwg_get_session_var('show_metadata') == 1 )
 					{  	$lang['Show file metadata'] =  'EXIF Metadata';
-						if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}}
-					
-					$template->assign( 'U_METADATA', $u_metadata.'"'.$swt);
-				
-				 unset( $metadata[0]); 
-				 $template->Clear_assign('metadata');// hide original metadata	
-				 $template->assign('metadata',$metadata);//  original metadata item > 0	
-				}	
-			} 
-		}
-		
+						 if (isset($metadata[0] ['TITLE'])) // advanced meta
+						{$lang['Show file metadata']	= $metadata [0] ['TITLE'];}
+						if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}
+					}
+					$template->assign( 'U_METADATA', $u_metadata.'" title="'.$lang['Show file metadata']."||".$swt);
+					unset( $metadata[0]); 
+					 $template->Clear_assign('metadata');// hide original metadata	
+					 $template->assign('metadata',$metadata);} //  original metadata item > 0	
+		  }
+		  else
+		  {if  ( pwg_get_session_var('show_metadata') == 1 )
+		  {$lang['Show file metadata'] =  'No Metadata';
+		   $template->assign( 'U_METADATA', $u_metadata.'" title="'.$lang['Show file metadata']);}
+		   }
+		} 
+	}	
+	// Add llgbo requirement to ELEMENT_CONTENT
+	$template->set_filenames( array('llgbo_content'=> dirname(__FILE__).'/template/llgbo_content.tpl') );
+	$template->concat('ELEMENT_CONTENT', $template->parse('llgbo_content', true));
 } 
 //-----------------------------------------------------------------
-/*  ------   MANAGE PICTURE PAGE----------------    */ 
+/*  ------   MANAGE PICTURE PAGE                --------------    */ 
 //-----------------------------------------------------------------
-function MyPictureOptions($content )
+function llgbo_RenderContent($content,$element_info )
 {global $template,$conf,$user,$lang;	
 $template->assign('LLGBO_PATH',LLGBO_PATH);
-$sweetcss = ' <! --- LLGBO tooltip css-->
-<style type="text/css"> 
-div#toolTip {position:absolute;z-index:1000;width:'.$conf['LLGBO_TOOLTIP'][0].'px;background:'.$conf['LLGBO_TOOLTIP'][3].';color:'.$conf['LLGBO_TOOLTIP'][5].';border:'.$conf['LLGBO_TOOLTIP'][1].'px solid '.$conf['LLGBO_TOOLTIP'][2].';padding:5px;min-height:1em;-moz-border-radius:5px} 
-div#toolTip p {margin:0;padding:0;color:'.$conf['LLGBO_TOOLTIP'][5].';font-size:0.8em;font-family:Verdana,Arial,Helvetica,sans-serif;text-align:left}
-div#toolTip p em {display:block;margin-top:3px;font-style:normal;font-weight:bold;text-align:left}
-div#toolTip p.title {color:'.$conf['LLGBO_TOOLTIP'][4].';text-align:center;padding:0 0 3px 0;}
-#theImage{margin:auto;overflow: hidden;}
-</style>';
+include_once(LLGBO_PATH.'/css/sweettitles.css.php');
+include_once(LLGBO_PATH.'/css/gbolook.css.php');
 //-----------------------------------------------------------------
-// -----------  add JS tooltip in footer --------------------
+// -----------  add CSS 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  */)
-	    {  $template->assign('LLGBOTOOLTIP', 1 );    
-		$template->append('footer_elements',$sweetcss);
-	}
-//-----------------------------------------------------------------
-// Navigation improvement are always available
-//-----------------------------------------------------------------
-$ThePicture = $template->get_template_vars('current');
-$next  = $template->get_template_vars('next');
-$prev = $template->get_template_vars('previous');
-$last = $template->get_template_vars('last');
-$first = $template->get_template_vars('first');
-$swtimg =   ' swttips="<center><img src=';	
-$nextthumb_title = $next['TITLE'];
-$prevthumb_title = $prev['TITLE'];	
-$usemap ='';
-//----------------------------------------------------	 
-//-------      Tooltip                        -------------	 
-//----------------------------------------------------	 
-If ($conf['LLGBO_SETTINGS'][1]  == 'true' )/*  tooltip  */ 
-	{ $nextthumb_title = $next['TITLE'];
-	$prevthumb_title = $prev['TITLE'];
-	if (isset($first)){$template->assign('first',  array('TITLE' =>  $first['TITLE'].'"'.$swtimg.$first['THUMB_SRC'].'>',
-										'U_IMG' =>  $first['U_IMG']));}
-	  if (isset($prev)){$template->assign('previous',  array('TITLE' =>  $prev['TITLE'].'"'.$swtimg.$prev['THUMB_SRC'].'>',
-										'U_IMG' =>  $prev['U_IMG'], 'THUMB_SRC' => $prev['THUMB_SRC'])); }
-	  if (isset($next)){$template->assign('next',  array('TITLE' =>  $next['TITLE'].'"'.$swtimg.$next['THUMB_SRC'].'>',
-										'U_IMG' =>  $next['U_IMG'], 'THUMB_SRC' => $next['THUMB_SRC']));}
-	  if (isset($last)){$template->assign('last',  array('TITLE' =>  $last['TITLE'].'"'.$swtimg.$last['THUMB_SRC'].'>',
-									'U_IMG' =>  $last['U_IMG']));}
- 	}	
-///// YOGA or SIMPLE /////////////////////	
-$tpl_name = "";
-$tpl_name =   $user['theme'] ;
-/////////////////////////////////////////////
-// 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 $content;  ; }	
-//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  */ 	)
-			{ $template->assign('LLGBOCSS', 2 );  }
-//----------------------------------------------------	 
-//-------      Usemap   values         -------------	 
-//----------------------------------------------------	 
-If ($conf['LLGBO_SETTINGS'] [3]  == 'true' )  // usemap
- { 	$usemap = '  usemap="#prevnext"' ;
-  	$imgw = $ThePicture['scaled_width'];
-		$imgh = $ThePicture['scaled_height'];	
-		$template->assign(array(
-			/* left --> Prev */	'LEFT_X1'  => 0,  'LEFT_Y1'  => 0, 
-						'LEFT_X2'  => round($imgw * 0.24), 'LEFT_Y2'  => $imgh ,
-			/* up */ 		'UP_X1'  => round($imgw * 0.24) ,  'UP_Y1'  => 0,
-						'UP_X2'  => round($imgw * 0.76), 'UP_Y2'  => round($imgh * 0.50),
-			/* high */ 		'HIGH_X1'  => round($imgw * 0.24) , 'HIGH_Y1'  => round($imgh * 0.50) ,
-						'HIGH_X2'  => round($imgw * 0.76), 'HIGH_Y2'  => $imgh,
-			/* right -> next */	'RIGHT_X1'  => round($imgw * 0.76) , 'RIGHT_Y1'  => 0,
-						'RIGHT_X2'  =>  $imgw  , 'RIGHT_Y2'  => $imgh ));
-		$template->assign( 'USEMAP', 'ok'  );
-								
-	If ($conf['LLGBO_SETTINGS'] [4]  === 'true' )  // usemap and Display Thumb
-			{ $template->assign(array('NEXTTHUMB'  => $swtimg.$next['THUMB_SRC'].'>"',
-			 'NEXTTHUMBTITLE'  => $nextthumb_title,
-			 'PREVTHUMB'  =>  $swtimg.$prev['THUMB_SRC'].'>"',
-			 'PREVTHUMBTITLE'  =>  $prevthumb_title));} 
-}  // end usemap
+ If (($conf['LLGBO'][1]  == 'true' ) /*  tooltip  */  
+ or  ($conf['LLGBO_SETTINGS'] [2]  == 'true' )  /* exif under bt */ )    
+	{	$template->append('footer_elements',$sweetcss);
+	$template->append('llgbo', array( 'TOOLTIP' => 'ok' ), true);}
+	
+/*	 If ($conf['LLGBO_SETTINGS'] [3]  == 'true' )    switch free 	{}  */
 
 //-----------------------------------------------------------------
-$template->assign( array(
-	   'SRC_IMG' => $ThePicture['image_url'],
-	   'WIDTH_IMG' => $ThePicture['scaled_width'],
-	   'HEIGHT_IMG' => $ThePicture['scaled_height'],	   
-	   'ALT_IMG' =>  $ThePicture['file'],
-       'MAP_TO_USED' =>   $usemap  	   
-	   )); 
- 
-If (isset($ThePicture['has_high'])and isset($ThePicture['high_url']))
-		{  $uuid = uniqid(rand());
-		 $template->assign(
-		 'high', array(
-			        'U_HIGH' => $ThePicture['high_url'] ,
-			        'UUID'   => $uuid,      ));
-		// compliance HD Shadowbox	
-		If ($conf['LLGBO_SETTINGS'] [9]  == 'true' )
-			{$nbarea = 3;
-			 if (!isset($next)){$nbarea = 2;}
-			 if (!isset($prev)){$nbarea = 2;}
-			 $template->assign('HDHREF', ' href="'.$ThePicture['high_url'].'" title= "'.$lang['llgbo_dispinshadowbox'].$ThePicture['name'].'"');
-			  $template->append('head_elements', "\n".'<script type="text/javascript">'."\n".'window.onload = function() {'."\n".'Shadowbox.setup(document.getElementById("prevnext").getElementsByTagName("area")['.$nbarea.']);}'."\n".'</script>'  );} 
-           else
-           {$template->assign('HDHREF','title="'.$lang['Click on the photo to see it in high definition'].'" href="javascript:phpWGOpenWindow('."'".$ThePicture['high_url']."','".$uuid."','"."scrollbars=yes,toolbar=no,status=no,resizable=yes'".')"');}		   
-			
-} 
+// AN OTHER PLUGIN IS WORKING -> GO BACK
+if ( !empty($content) )   {  return $content;  }	
+// frame and navigation on picture  are only available on picture extension	
+$pictExt = substr($element_info['file'],-3);
+if (!in_array ( $pictExt,$conf['picture_ext']))	{  return $content;  ; }	
+ include_once(LLGBO_PATH.'include/manage_picture_content.php');
+} //end --> llgbo_RenderContent
 
-If (($conf['LLGBO_SETTINGS'] [5]  == 'true' )  /* title on frame */ and ($conf['LLGBO_SETTINGS'] [0]  == 'true' )) // display frame
-	 { $template->assign('SHOW_PICTURE_NAME_ON_TITLE', false);	
-		$template->assign('TITLE_FRAME_COLOR', $conf['LLGBO_FRAME'][0]);		 } 
-		
-// compatibility with extended description
-$comment = $template->get_template_vars('COMMENT_IMG');
-if (!isset($comment) )
-		{$template->assign( 'COMMENT_IMG' , $ThePicture['comment']);}
-//----------------------------------------------------	 
-/*              HTML  frame                          */
-//----------------------------------------------------	 
-If (($conf['LLGBO_SETTINGS'] [0] == 'true') )
-	{   $bds = 0; 
-		$frame_begin ='';
-		$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	
-			  {$frame_begin = '<div id ="llgboframe'.$x.'" style="border: '.$conf['LLGBO_FRAME'][$x+1].'px solid '.$conf['LLGBO_FRAME'][$x].'">'."\n".$frame_begin;
-				$bds =  $bds + $conf['LLGBO_FRAME'][$x+1]; 	//define border sum	
-				$frame_end = $frame_end .' </div>';
-			}
-		}
-		$frame_width = $ThePicture["scaled_width"] + (2 * $bds);
-		$frame_height = $ThePicture["scaled_height"] + (2 * $bds);
-	$template->assign('FRAME_SIZE','style="width:'.$frame_width .'px; height:'.$frame_height.'px;"');
-	$template->assign('FRAME_BEGIN', $frame_begin);
-	$template->assign('FRAME_END', $frame_end); 
-// title on frame	
-    If ($conf['LLGBO_SETTINGS'] [5]  == 'true' )  // title on frame
-		{$template->assign( array( 'TITLE_FRAME' => $ThePicture['name'] )); }	
-	}	// end frame
-	else 
-	// no frame
-{$template->clear_assign('FRAME_BEGIN') ;}
+function LLGBO_prefilter_Frame($content, &$smarty)
+{ //  begin frame 
+ $search = '<img src="';
+  $replacement = '{if isset($llgbo.TITLE_FRAME)}'."\n".'<span  id="gboh2" style ="background:transparent;z-index:3;color:{$llgbo.TITLE_FRAME_COLOR}">{$llgbo.TITLE_FRAME}</span>';
+  $replacement = $replacement."\n".'{/if}'."\n".'<div  id="gbo" {$llgbo.FRAME_SIZE}>'."\n".'{$llgbo.FRAME_BEGIN}'."\n".$search;
+  $step1 = str_replace($search, $replacement, $content);
+//  End frame   
+  $search = '{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}';
+  $replacement = '{$llgbo.FRAME_END}'."\n"."</div> <!-- end GBO frame -->"."\n".$search;
+    return str_replace($search, $replacement, $step1);
+}
 
-$template->set_filenames( array('default_content'=> dirname(__FILE__).'/template/picture_content.tpl') );
-return $template->parse( 'default_content', true);
-} //end --> MyPictureOptions
-} // End class
-	
 /* trigger à intercepter                                   */ 
-add_event_handler('loc_begin_page_header', array(&$obj, 'MyBeginheader'));
-add_event_handler('loc_end_page_header', array(&$obj, 'Myheader'));
-Add_event_handler( 'loc_begin_picture', array(&$obj, 'AutoDisplayMetadata'));
-Add_event_handler( 'loc_end_picture', array(&$obj, 'DisplayGboLook'));
-add_event_handler('render_element_content',
-  array(&$obj,'MyPictureOptions'),  EVENT_HANDLER_PRIORITY_NEUTRAL-1,  2  );
-add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'plugin_admin_menu') );
-set_plugin_data($plugin['id'], $obj);
-function afficher_tableau($tableau) 
-    {
-    // on fait une boucle qui lit les éléments du tableau
-    foreach ($tableau as $cle=>$valeur) 
-        {
-        // si l'un des éléments est lui même un tableau
-        // alors on applique la fonction à ce tableau
-        if(is_array($valeur)) 
-            {
-            // on affiche le nom de la clé et
-            // le début d'une liste pour
-            //  décaler le contenu vers la droite
-            print_r ($cle);
-			 echo  ' : <ul>'; 
-            
-            // ici se réalise la récursivité
-            // c'est à dire qu'on applique la fonction
-            // à l'élément en cours car c'est lui aussi un tableau
-            afficher_tableau($valeur); 
-            
-            // on ferme la liste
-            echo '</ul>'; 
-            }
-        } 
-    }
+add_event_handler('loc_begin_page_header', 'llgbo_beginheader');
+add_event_handler('loc_end_page_header', 'llgbo_endHeader');
+Add_event_handler( 'loc_begin_picture','llgbo_BeginPicture');
+Add_event_handler( 'loc_end_picture', 'llgbo_EndPicture');
+add_event_handler('render_element_content', 'llgbo_RenderContent',  EVENT_HANDLER_PRIORITY_NEUTRAL-1, 20  );
+add_event_handler('get_admin_plugin_menu_links',  'plugin_admin_menu' );
 ?>
Index: extensions/LLGBO2/template/llgbo_content.tpl
===================================================================
--- extensions/LLGBO2/template/llgbo_content.tpl	(revision 14421)
+++ extensions/LLGBO2/template/llgbo_content.tpl	(revision 14421)
@@ -0,0 +1,16 @@
+<!-- LLGBO2 picture_content -->
+{if  isset($llgbo.TOOLTIPCSS)}	 
+		{$llgbo.TOOLTIPCSS} 
+{/if}  
+{if  isset($llgbo.GBOCSS)}	 
+		{$llgbo.GBOCSS} 
+{/if}  
+{if  !isset($llgbo.NOJS)}
+		{if  isset($llgbo.TOOLTIP)}	   
+			{combine_script id='llgbojqtooltip'   require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"}
+		 {/if}
+		 {if  isset($llgbo.FRAME_BEGIN)}	
+			{combine_script id='llgbojqframe'  require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js"}
+		{/if}
+{/if}
+
