Index: /extensions/LLGBO2/main.inc.php
===================================================================
--- /extensions/LLGBO2/main.inc.php	(revision 29861)
+++ /extensions/LLGBO2/main.inc.php	(revision 29861)
@@ -0,0 +1,135 @@
+<?php  
+/*
+Plugin Name: Look_like_gbo2 
+Version:  2.7.C
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
+Author: GBo 
+Author URI: http://www.photos.bouteyron.fr/
+Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery 
+Add a border around  picture ......
+	-- 01-07-2014   
+		2.7.A Compliance Piwigo 2.7 béta	new administration management
+	-- 10-09-2014   
+		2.7.A Compliance Piwigo 2.7rc1	new administration management
+		2.7.B Fix issue with extended description and improve translation
+			compatibility with Back2Front	
+		2.7.C change PHP array_replace by internal function
+ */
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+// +-----------------------------------------------------------------------+
+// | Plugin constants                                               |
+// +-----------------------------------------------------------------------+
+define('LLGBO_VERSION', '2.7.C');
+define('LLGBO_ID',       basename(dirname(__FILE__)));
+define('LLGBO_PATH' ,    PHPWG_PLUGINS_PATH . LLGBO_ID . '/');
+define('LLGBO_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . LLGBO_ID);
+// +-----------------------------------------------------------------------+
+/*				 Set the administration panel of the plugin */
+// +-----------------------------------------------------------------------+
+function llgbo_admin_menu($menu)
+  {  
+	$menu[] = array(
+		'NAME' => 'Look like Gbo',
+		'URL' => LLGBO_ADMIN,
+    );
+  return $menu;
+	}
+// +-----------------------------------------------------------------------+
+// | Plugin initialization                                                 |
+// +-----------------------------------------------------------------------+
+function llgbo_init()
+{
+	global $conf;
+	load_language('plugin.lang', LLGBO_PATH);
+			
+	$conf['LLGBO2'] =  safe_unserialize($conf['LLGBO2_Settings']);
+} 
+/******************************************************************/
+/*       ALWAYS      DISPLAY      METADATA */
+/******************************************************************/
+function llgbo_BeginPicture()
+/******************************************************************/
+{global $conf,$template;
+	If ($conf['LLGBO2']['exifunderbt'])  // exif under bt
+		{$_GET['metadata'] = 'O';}
+		
+	If ($conf['LLGBO2']['alwaysdisplayexif'])  //always display metadata
+		{if ( pwg_get_session_var('show_metadata') == null )
+			{  pwg_set_session_var('show_metadata', 1 );	 }
+		}
+}
+// --------------- end begin picture 
+/******************************************************************/
+//      MANAGE     BEGIN          H E A D E R 
+/******************************************************************/
+function llgbo_beginheader()
+/******************************************************************/
+{ global $page,$conf;
+	If ($conf['LLGBO2']['exifunderbt'] ) // reset nofollow, noindex
+	{ unset ($page['meta_robots']);}
+}
+/******************************************************************/
+//      MANAGE               H E A D E R 
+/******************************************************************/
+function llgbo_endHeader()
+/******************************************************************/
+{include_once(LLGBO_PATH.'include/manage_header.php');
+}  // --------------- end header 
+/******************************************************************/
+//* IMPROVE FUNCTIONNALITIES --> PICTURE.TPL
+/******************************************************************/
+function  llgbo_EndPicture()
+/******************************************************************/
+{ global $template,$conf,$lang;
+	if	(!empty($conf['LLGBO2']['is-picture']))	
+	 { 	// ---- Metadata ----------	
+		if ($conf['LLGBO2']['exifunderbt'])  // exif under bt
+				{  	$metadata = $template->get_template_vars('metadata');
+				   if (is_array($metadata[0]))
+						{
+						if ($metadata [0] ['TITLE'] == $lang['EXIF Metadata']	 )  // only exif are displayed under buton
+							{$u_metadata = $template->get_template_vars('U_METADATA');
+								$swt = '';	
+								foreach($metadata[0]['lines'] as $cle=>$valeur){$swt= $swt.$cle.' : '.$valeur.'||';} 
+								if  ( pwg_get_session_var('show_metadata') == 1 )
+ 									{ $lang['Show file metadata'] = $metadata [0] ['TITLE'];} 						
+								$template->assign( 'U_METADATA',$u_metadata.'" title="'.$lang['Show file metadata']."||".$swt);
+								unset( $metadata[0]); 
+								$template->Clear_assign('metadata');// hide all original metadata	
+								$template->assign('metadata',$metadata); }//  always display  metadata elem > 0
+						} 	
+				else
+					{if  (( pwg_get_session_var('show_metadata') == 1 ) and (!is_array($metadata)))
+							{$template->Clear_assign( 'U_METADATA');} 
+					}
+			}
+		// --------------------------------------
+		// Add llgbo requirement to ELEMENT_CONTENT
+		// --------------------------------------
+
+		$template->set_filenames( array('llgbo_content'=> dirname(__FILE__).'/template/llgbo_content.tpl') );
+		$template->concat('picture', $template->parse('llgbo_content', true));
+	}	
+} 
+
+/******************************************************************
+			------   MANAGE PICTURE PAGE                --------------     
+ ******************************************************************/
+ include_once(LLGBO_PATH.'include/manage_picture_content.php');
+/******************************************************************/		   
+
+/******************************************************************/
+//    trigger à intercepter    
+/******************************************************************/    
+ add_event_handler('init', 'llgbo_init'); 
+if (defined('IN_ADMIN'))
+{    add_event_handler('get_admin_plugin_menu_links', 'llgbo_admin_menu'); }
+else
+{   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, 20 );
+}
+?>
