'Look_like_GBo', 'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/llgbo_admin.php') )); return $menu; } //------------------------------------------------------------- /* ALWAYS DISPLAY METADATA */ //------------------------------------------------------------- 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 ( pwg_get_session_var('show_metadata') == null ) { pwg_set_session_var('show_metadata', 1 ); }} } function llgbo_beginheader() { global $page,$conf; If ($conf['LLGBO_SETTINGS'][2] == 'true' ) // reset nofollow, noindex { unset ($page['meta_robots']);} } //------------------------------------------------------------- // MANAGE H E A D E R //------------------------------------------------------------- function llgbo_endHeader() {global $template,$conf; $page_name = script_basename(); include_once(LLGBO_PATH.'include/manage_header.php'); } // end header //------------------------------------------------------------- //* IMPROVE FUNCTIONNALITIES --> PICTURE.TPL //------------------------------------------------------------- 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 = ""; 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 (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 -------------- */ //----------------------------------------------------------------- function llgbo_RenderContent($content,$element_info ) {global $template,$conf,$user,$lang,$themeconf; $template->assign('LLGBO_PATH',LLGBO_PATH); include_once(LLGBO_PATH.'/css/sweettitles.css.php'); //----------------------------------------------------------------- // ----------- add CSS tooltip in footer -------------------- //----------------------------------------------------------------- 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 {} */ //----------------------------------------------------------------- // 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 function LLGBO_prefilter_Frame($content, &$smarty) { global $themeconf; // ------------------------ // begin frame $search = '{$llgbo.TITLE_FRAME}'; $replacement = $replacement."\n".'{/if}'."\n".'
'."\n".'{$llgbo.FRAME_BEGIN}'."\n".$search; $content = str_replace($search, $replacement, $content); // ------------------------ // End frame $search = '{$ALT_IMG}{/if}">'; if (( strpos(strtoupper($themeconf['name']) , 'STRIPPED') === 0) ) {$search = 'class="hideTabs">';} $replacement = $search."\n".'{$llgbo.FRAME_END}'."\n"."
"; return str_replace($search, $replacement, $content); } /* trigger à intercepter */ 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' ); ?>