'Look_like_GBo',
'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/llgbo_admin.php') ));
return $menu; }
//-------------------------------------------------------------
/* ALWAYS DISPLAY METADATA */
//-------------------------------------------------------------
function AutoDisplayMetadata()
{global $conf;
If ($conf['LLGBO_SETTINGS'] [2] == 'true' ) // exif under bt
{$_GET['metadata'] = 'O';}
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()
{ global $page,$conf;
If ($conf['LLGBO_SETTINGS'][2] == 'true' ) // reset nofollow, noindex
{ unset ($page['meta_robots']);}
}
//-------------------------------------------------------------
// MANAGE H E A D E R
//-------------------------------------------------------------
function Myheader()
{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',''."\n".'');}
}
} // 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 = "";
$u_metadata = $template->get_template_vars('U_METADATA');
$swt = ' swttips="';
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))
{ foreach($tableau as $cle=>$valeur)
{ $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
}
}
}
}
//-----------------------------------------------------------------
/* ------ MANAGE PICTURE PAGE---------------- */
//-----------------------------------------------------------------
function MyPictureOptions($content )
{global $template,$conf,$user,$lang;
$template->assign('LLGBO_PATH',LLGBO_PATH);
$sweetcss = '
';
//-----------------------------------------------------------------
// ----------- add JS 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="