assign('LLGBO_PATH',LLGBO_PATH); include_once(LLGBO_PATH.'/css/sweettitles.css.php'); //----------------------------------------------------------------- // ----------- add CSS tooltip in footer -------------------- //----------------------------------------------------------------- if (($conf['LLGBO2']['tooltipdisp'] ) or ($conf['LLGBO2']['exifunderbt'])) { $template->append('footer_elements',$sweetcss); $template->append('llgbo', array( 'TOOLTIP' => 'ok' ), true);} //----------------------------------------------------------------- // Frame is only available on picture extension //----------------------------------------------------------------- unset ($conf['LLGBO2']['is-picture']); $ext = get_extension($element_info['path']); if (!in_array($ext, $conf['picture_ext'])) {return $content;} $conf['LLGBO2']['is-picture'] = true; // $content ok for update $update_tpl = false ; //----------------------------------------------------------------- // AN OTHER PLUGIN IS WORKING -> GO BACK //----------------------------------------------------------------- if ( !empty($content) ) { // 2.6 paticular case automatic size management and Modus $autosize_on = $template->get_template_vars('is_automatic_size'); $current = $template->get_template_vars('current'); // modus if ((empty ($current['selected_derivative'])) and (empty($autosize_on) )) {return $content;} } //----------------------------------------------------------------- if (($conf['LLGBO2']['frame']) ) //Frame { $deriv_type = pwg_get_session_var('picture_deriv', $conf['derivative_default_size']); $PictSizeWH = $element_info['derivatives'][$deriv_type]->get_size(); // default conf $autosize_type = $template->get_template_vars('automatic_size'); if (isset($autosize_type)) // auto size { $PictSizeWH = $element_info['derivatives'][$autosize_type]->get_size(); $update_tpl = true ;} if (isset($current['selected_derivative'])) // modus { $PictSizeWH = $current['selected_derivative']->get_size(); $update_tpl = true ;} // -- Css Theme adaptation $themeconf = $template->get_template_vars('themeconf'); if (file_exists(LLGBO_PATH."css/llgbo_content_".$themeconf['id'].".css")) // no css file dedicated for this theme { $themestyle = $themeconf['id'];} else {$themestyle = 'default';} // -- Frame build $frame_begin = ''; $frame_border =0; $frame_end = ''."\n".' '."\n"; foreach ($conf['LLGBO2']['FR-sizes'] as $cle => $value) { if ( $value > 0) // boder value > 0 { $frame_border = $frame_border + ( 2 * $value); $frame_begin = '
'."\n".$frame_begin; $frame_end = '
'.$frame_end; } } $frame_begin ="\n".''."\n".$frame_begin; $PictSizeWH[0] = $PictSizeWH[0] + $frame_border; $PictSizeWH[1] = $PictSizeWH[1] + $frame_border; $frame_size = "\n".'
'; $frame_title = ""; if ($conf['LLGBO2']['titleframe']) { $frame_title = "\n".''."\n".''; } $template->append('llgbo', array( 'FRAME_TITLE1' => $frame_title, 'FRAME_TITLE3' => '', 'FRAME_SIZE' => $frame_size , 'FRAME_BEGIN' => $frame_begin, 'FRAME_END' => $frame_end, 'GBOCSS' => LLGBO_PATH."css/llgbo_content_".$themestyle.".css" ), true); $template->set_prefilter('default_content', 'LLGBO_prefilter_Content_Frame'); } // end frame //---------------------------------------------------- //------- Tooltip ------------- //---------------------------------------------------- if ($conf['LLGBO2']['tooltipdisp'] )// tooltip { $prev = $template->get_template_vars('previous'); $next = $template->get_template_vars('next'); if (isset($prev)){ $prev_thumbimg = '||get_url(); $template->append('previous', array('TITLE_ESC' => $prev['TITLE_ESC'].$prev_thumbimg.'>'),TRUE); } if (isset($next)){ $next_thumbimg = '||get_url(); $template->append('next', array('TITLE_ESC' => $next['TITLE_ESC'].$next_thumbimg.'>'),TRUE); } $template->append('llgbo', array('tooltipCSS' => $sweetcss), true); } // ----------------------------------------------------------- // 2.6 paticular case automatic size and modus management // ----------------------------------------------------------- if ($update_tpl) {return $template->parse( 'default_content', true);} } //end --> llgbo_RenderContent /******************************************************************/ function LLGBO_prefilter_Content_Frame($content, $smarty) /******************************************************************/ { // add frame on picture_content TPL // -------------------------------------- $patern = '/'.''.'/'; $replacement = '{if !empty($llgbo.FRAME_TITLE1)}{$llgbo.FRAME_TITLE1}{$current.TITLE} {$llgbo.FRAME_TITLE3}{/if}{$llgbo.FRAME_SIZE}{$llgbo.FRAME_BEGIN}'."\n".''.'{$llgbo.FRAME_END}'; $content = preg_replace($patern, $replacement, $content); return $content; } ?>