Changeset 29049


Ignore:
Timestamp:
Jul 16, 2014, 9:28:35 PM (10 years ago)
Author:
gbo
Message:

[llgbo2-27A] compatible with modus and more theme

Location:
extensions/LLGBO2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/include/manage_header.php

    r29005 r29049  
    33/*      LLGBO Manage header                                        */
    44//----------------------------------------------------
     5global $template,$conf;
     6$page_name = script_basename();
    57if (!isset($page_name)) {$page_name ='index';}
    68if ($conf['LLGBO2']['manageheader'])
    79        {$no_header = false;
    8         $input= $_SERVER['PHP_SELF'];
    9         if ($conf['question_mark_in_urls'] == true)
    10                 {       foreach($_GET as $cle  =>$valeur)
    11                         {$input= $input.$cle ;}
    12         }
    13          
    14         if  ( strpos( $input,'index') == true )
    15         {       foreach($conf['LLGBO2']['HD-dispheader'] as $cle  => $valeur)
    16                         { if ($valeur  == false) {
    17                                         if($cle == 'home' ) {$cle = 'index.php';}
    18                                         if (strpos( $input, $cle) == true )
    19                                                 {$no_header = true;}
    20                                         }
    21                         }
    22         }
    23          else
    24         {       
    25                  if (isset($conf['LLGBO2']['HD-dispheader'][$page_name]) and ($conf['LLGBO2']['HD-dispheader'][$page_name] == false) ) {$no_header = true;}
    26         } 
    27          if ($no_header == true)
    28         {$template->append('head_elements','<!-- llgbo -->'."\n".'<STYLE type="text/css">'."\n".'#theHeader{display: none}'."\n".'header_msgs {position:static}'."\n".'</STYLE>');}
     10                $input= $_SERVER['PHP_SELF'];
     11                if ($conf['question_mark_in_urls'] == true)
     12                        {       foreach($_GET as $cle  =>$valeur)
     13                                {$input= $input.$cle ;}
     14                }
     15                 
     16                if  ( strpos( $input,'index') == true )
     17                {       foreach($conf['LLGBO2']['HD-dispheader'] as $cle  => $valeur)
     18                                { if ($valeur  == false) {
     19                                                if($cle == 'home' ) {$cle = 'index.php';}
     20                                                if (strpos( $input, $cle) == true )
     21                                                        {$no_header = true;}
     22                                                }
     23                                }
     24                }
     25                 else
     26                {       if (isset($conf['LLGBO2']['HD-dispheader'][$page_name]) and ($conf['LLGBO2']['HD-dispheader'][$page_name] == false) ) {$no_header = true;}
     27                } 
     28        if ($no_header == true)
     29                {$template->append('head_elements','<!-- llgbo no header-->'."\n".'<STYLE type="text/css">'."\n".'#theHeader{display: none}'."\n".'header_msgs {position:static}'."\n".'</STYLE>');}
    2930}       
    3031?>
  • extensions/LLGBO2/include/manage_picture_content.php

    r29019 r29049  
    22function llgbo_RenderContent($content,$element_info)
    33/******************************************************************/
    4 {
    5 //----------------------------------------------------   
    6 /*      LLGBO Manage Picture_content                       */
    7 //----------------------------------------------------
     4{       //----------------------------------------------------   
     5        /*      LLGBO Manage Picture_content                       */
     6        //----------------------------------------------------
    87        global $template,$conf;
    9          
    108        $template->assign('LLGBO_PATH',LLGBO_PATH);
    119        include_once(LLGBO_PATH.'/css/sweettitles.css.php');   
    12 
    1310        //-----------------------------------------------------------------
    1411        // -----------  add CSS tooltip in footer --------------------
    1512        //-----------------------------------------------------------------
    16          If (($conf['LLGBO2']['tooltipdisp']  )  or  ($conf['LLGBO2']['exifunderbt']))   
     13         if (($conf['LLGBO2']['tooltipdisp']  )  or  ($conf['LLGBO2']['exifunderbt']))   
    1714                {       $template->append('footer_elements',$sweetcss);
    1815                        $template->append('llgbo', array( 'TOOLTIP' => 'ok' ), true);}
     
    2017        // Frame is only available on picture extension
    2118        //-----------------------------------------------------------------
    22         unset ($conf['LLGBO2']['rendercontent']);
     19        unset ($conf['LLGBO2']['is-picture']);
    2320         $ext = get_extension($element_info['path']);
    2421         if (!in_array($ext, $conf['picture_ext']))
    2522                                {return $content;}
    26                 $conf['LLGBO2']['rendercontent'] = true;        // $content ok for update
    27                
     23                               
     24        $conf['LLGBO2']['is-picture'] = true;   // $content ok for update
     25        $update_tpl = false ;
    2826        //-----------------------------------------------------------------
    2927        // AN OTHER PLUGIN IS WORKING -> GO BACK
    3028        //-----------------------------------------------------------------
    3129        if ( !empty($content) )
    32                 {        // 2.6 paticular case automatic size management
    33                  $autosize_on = $template->get_template_vars('is_automatic_size');
    34                  if (empty($autosize_on) )
    35                                         {return $content;}
    36                                        
     30                {        // 2.6 paticular case automatic size management and Modus
     31                         $autosize_on = $template->get_template_vars('is_automatic_size');
     32                         $current = $template->get_template_vars('current'); // modus
     33                         if ((empty ($current['selected_derivative'])) and (empty($autosize_on) ))
     34                                                {return $content;}                                             
     35                }
     36        //-----------------------------------------------------------------
     37        if (($conf['LLGBO2']['frame'])   ) //Frame
     38        {       $deriv_type = pwg_get_session_var('picture_deriv', $conf['derivative_default_size']);
     39                $PictSizeWH =  $element_info['derivatives'][$deriv_type]->get_size();  // default conf
     40               
    3741                $autosize_type = $template->get_template_vars('automatic_size');
    38                  unset ($conf['LLGBO2']['PictSizeWH'] );
    39                 if (isset($autosize_type))
    40                                 {$conf['LLGBO2']['PictSizeWH'] =  $element_info['derivatives'][$autosize_type]->get_size();
    41                                          }
    42                 }
    43 
     42               
     43                if (isset($autosize_type)) // auto size
     44                        {       $PictSizeWH =  $element_info['derivatives'][$autosize_type]->get_size();
     45                                $update_tpl = true ;}
     46                       
     47                if (isset($current['selected_derivative'])) // modus
     48                        {       $PictSizeWH =  $current['selected_derivative']->get_size();
     49                                $update_tpl = true ;}
     50                       
     51        // -- Css Theme adaptation
     52                $themeconf = $template->get_template_vars('themeconf');
     53                if (file_exists(LLGBO_PATH."css/llgbo_content_".$themeconf['id'].".css")) // no css file dedicated for this theme
     54                           { $themestyle = $themeconf['id'];}
     55                           else
     56                           {$themestyle = 'default';}
     57        // -- Frame build               
     58                $frame_begin = '';   
     59                        $frame_border =0;               
     60                        $frame_end = '</div>'."\n".' <!-- end LLGBO frame -->'."\n";
     61                         foreach ($conf['LLGBO2']['FR-sizes'] as $cle  => $value)
     62                                { if ( $value > 0)      // boder value > 0     
     63                                         {      $frame_border = $frame_border + ( 2 * $value);                           
     64                                                $frame_begin = '<div class="llgboFR" style="border:'.$value.'px solid '.$conf['LLGBO2']['FR-colors'][$cle].'">'."\n".$frame_begin;
     65                                                $frame_end = '</div>'.$frame_end;
     66                                                }
     67                                }
     68                        $frame_begin ="\n".'<!-- Begin LLGBO frame -->'."\n".$frame_begin;
     69                        $PictSizeWH[0] = $PictSizeWH[0] + $frame_border;
     70                        $PictSizeWH[1] = $PictSizeWH[1] + $frame_border;
     71                        $frame_size = "\n".'<div   id="llgbo0" class="llgbo" style="border:0 ;width:'.$PictSizeWH[0].'px; height:'.$PictSizeWH[1].'px;">';
     72       
     73                        if ($conf['LLGBO2']['titleframe']) {
     74                                $frame_title =  "\n".'<!-- Begin LLGBO -->'."\n".'<span  id="llgboh2" style ="background:transparent;z-index:3;color:'.$conf['LLGBO2']['FR-titlecolor'].'">'.$element_info['name'].'</span>';   
     75                                }
     76                       
     77                        $template->append('llgbo', array(   
     78                                                        'FRAME_TITLE' => $frame_title,
     79                                                        'FRAME_SIZE' => $frame_size ,
     80                                                        'FRAME_BEGIN' => $frame_begin,
     81                                                        'FRAME_END' => $frame_end,
     82                                                         'GBOCSS' => LLGBO_PATH."css/llgbo_content_".$themestyle.".css" ), true);
     83                                                         
     84                        $template->set_prefilter('default_content', 'LLGBO_prefilter_Content_Frame');                                                           
     85        } // end frame                                 
    4486//----------------------------------------------------   
    4587//-------      Tooltip                   -------------   
    4688//----------------------------------------------------
    47          
    48         If ($conf['LLGBO2']['tooltipdisp'] )//   tooltip 
     89        if ($conf['LLGBO2']['tooltipdisp'] )//   tooltip 
    4990        {       $prev = $template->get_template_vars('previous');
    5091                $next  = $template->get_template_vars('next');
     
    5394                if (isset($next)){$template->append('next',  array('TITLE_ESC' =>  $next['TITLE_ESC'].$swtimg.$next['THUMB_SRC'].'>'),TRUE);}
    5495                $template->append('llgbo', array('tooltipCSS'  => $sweetcss), true);
    55         }       
    56        
    57         If (($conf['LLGBO2']['frame'])   ) //Frame
    58         {       $template->set_prefilter('default_content', 'LLGBO_prefilter_Content_Frame');
    59         //----------------------------------------------------   
    60         /*       HTML End  frame   on Picture_content       */
    61         //----------------------------------------------------         
    62                 $csstheme = 'default';
    63                 $themeconf = $template->get_template_vars('themeconf');
    64                 //  dedicated Css by parent theme       
    65                         if (isset ($themeconf['parent']))
    66                         { $themestyle = $themeconf['parent'];}
    67                         If (file_exists(LLGBO_PATH."css/llgbo_content_".$themeconf['id'].".css")) // no css file dedicated for this theme
    68                            { $themestyle = $themeconf['id'];}
    69                            else
    70                            {$themestyle = 'default';}
    71                            $frame_end = '';
    72                            
    73                          foreach ($conf['LLGBO2']['FR-sizes'] as  $value)
    74                                 {if ( $value > 0)       // boder value > 0     
    75                                         {       $frame_end = $frame_end.'</div>';}
    76                                  }
    77                          
    78                          $template->append('llgbo', array(
    79                                 'FRAME_END' => $frame_end,
    80                                 'GBOCSS' => LLGBO_PATH."css/llgbo_content_".$themestyle.".css" ), true);
    81 
    82         } // end frame
    83          // 2.6 paticular case automatic size management
    84         if ((isset($autosize_on))  and  (isset ($autosize_type)) )
    85                                                 { return $template->parse( 'default_content', true);}
     96        }               
     97         // 2.6 paticular case automatic size and modus management
     98        if ($update_tpl)
     99                {return $template->parse( 'default_content', true);} 
    86100                                               
    87101} //end --> llgbo_RenderContent
    88102
     103/******************************************************************/
     104function LLGBO_prefilter_Content_Frame($content, $smarty)
     105/******************************************************************/
     106{        // add  frame on picture_content TPL
     107        // --------------------------------------   
     108                $patern = '/'.'<img(.*)id="theMainImage"(.*)>'.'/';     
     109        $replacement =  $replacement.'{$llgbo.FRAME_TITLE}'.'{$llgbo.FRAME_SIZE}'.'{$llgbo.FRAME_BEGIN}'."\n".'<img $1 id="theMainImage" $2> '.'{$llgbo.FRAME_END}';
     110                $content = preg_replace($patern, $replacement, $content); 
     111        return $content;
     112}
    89113?>
  • extensions/LLGBO2/js/jquery_llgboframeresize.js

    r28990 r29049  
    11// LLGBO frame resize
    2 jQuery(document).ready(function(jQuery){
    3          jQuery("#theMainImage").load(function(){LlgboFr_Resize();});   
    4         jQuery(window).resize(function(){ LlgboFr_Resize(); });
    5 });
    6 var LlgboFr_Resize = function () {
    7         var Elmgbo = jQuery("#llgbo0");
    8        if (Elmgbo.size() > 0)
    9          {      var MainImg = jQuery("#theMainImage");
    10                if (jQuery("#theMainImage").size() > 0)
    11                    {    var nImgH = parseInt(MainImg.height() );
    12                                 var nImgW = parseInt(MainImg.width() );
    13                                 var FrLstBdr = 0; var frbdr=0;
    14                                 jQuery(".llgboFR").each(function(){
    15                                          frbdr = parseInt(jQuery(this).css('border-top-width'));
    16                                                 FrLstBdr = (frbdr * 2)+FrLstBdr;
    17                                         });                     
     2jQuery(document).ready( function(){
     3                function LlgboFr_Resize()
     4                 {      var Elmgbo = jQuery("#llgbo0");
     5                        if (Elmgbo.size() > 0)
     6                         {      var MainImg = jQuery("#theMainImage");
     7                                if (MainImg.size() > 0)
     8                                   {    var nImgH = parseInt(MainImg.height() );
     9                                                var nImgW = parseInt(MainImg.width() );
     10                                                var FrLstBdr = 0; var frbdr=0;
     11                                                jQuery(".llgboFR").each(function(){
     12                                                         frbdr = parseInt(jQuery(this).css('border-top-width'));
     13                                                                FrLstBdr = (frbdr * 2)+FrLstBdr;
     14                                                        });
     15                                        }               
    1816                                Elmgbo.width (nImgW + FrLstBdr) ;
    1917                                Elmgbo.height (nImgH + FrLstBdr) ;
    20                         }
    21         }               
    22 }
     18                        }               
     19                }
     20        LlgboFr_Resize();
     21       
     22        jQuery(window).resize(function(){
     23                                LlgboFr_Resize(); });
     24                       
     25        jQuery("#theMainImage").load(function(){
     26                                LlgboFr_Resize();});
     27 });
     28
     29
     30
  • extensions/LLGBO2/main.inc.php

    r29019 r29049  
    88Description:  Display thumbnail under button. Add navigation on picture look like GBo Gallery
    99Add a border around  picture ......
    10         2.4.A Beta1 Compliance Piwigo 2.4 + jquery
    11         2.4.B beta 2 Compliance with Theme Stripped and plugin Piwishak 
    12         2.4.C First version for official Piwigo 2.4
    13         2.4.D Compliance with Theme Simple + fix bug on option
    14         2.4.F Improvement on frame management first size
    15                   Frame available on SlideShow.
    16         2.4.G Compliance with plugin RV MAP & EARTH
    17 -- 05-05-2013   
    18         2.5.A Fix bug  back to default values after  deactivates / reactivates actions
    19         2.5.B Fix bug  back to default values after  deactivates / reactivates actions (with API)
    20         2.5.C Fix bug  notice with $lang
    21 -- 30-12-2013   
    22                 2.6.A Compliance Piwigo 2.6     and automatic size
    23 -- 01-07-2014   
     10        -- 01-07-2014   
    2411                2.7.A Compliance Piwigo 2.7     new administration management
    2512 */
    2613if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    27 
    2814
    2915// +-----------------------------------------------------------------------+
     
    5541        $conf['LLGBO2'] =  safe_unserialize($conf['LLGBO2_Settings']);
    5642}
    57 
    58 
    5943/******************************************************************/
    6044/*       ALWAYS      DISPLAY      METADATA */
     
    7054                        {  pwg_set_session_var('show_metadata', 1 );     }
    7155                }
    72 }// --------------- end begin picture
    73 
     56}
     57// --------------- end begin picture
    7458/******************************************************************/
    7559//      MANAGE     BEGIN          H E A D E R
     
    8670function llgbo_endHeader()
    8771/******************************************************************/
    88 {global $template,$conf;
    89         $page_name = script_basename();
    90         include_once(LLGBO_PATH.'include/manage_header.php');
     72{include_once(LLGBO_PATH.'include/manage_header.php');
    9173}  // --------------- end header
    92 
    93 
    9474/******************************************************************/
    9575//* IMPROVE FUNCTIONNALITIES --> PICTURE.TPL
     
    9777function  llgbo_EndPicture()
    9878/******************************************************************/
    99 { global $template,$conf,$page,$lang;
    100         //----------------------------------------------------   
    101         /*       HTML End  frame   on Picture.tpl       */
    102         //---------------------------------------------------- 
    103                        
    104         If (($conf['LLGBO2']['frame'])    //Frame
    105                  and (!empty($conf['LLGBO2']['rendercontent'])) )// $content ok for update
    106                 {       $target = 'picture';
    107                         if ($page['slideshow'] and $conf['light_slideshow'])
    108                         { $target = 'slideshow';}
    109                         $template->set_prefilter($target, 'LLGBO_prefilter_Picture_Frame');
    110                  //$PictSizeWH is not already defined by auto_size     
    111                   $current= $template->get_template_vars('current');
    112                   if (empty($conf['LLGBO2']['PictSizeWH']))
    113                                 {$conf['LLGBO2']['PictSizeWH'] =  $current['selected_derivative']->get_size();}
    114                         $PictSizeWH = $conf['LLGBO2']['PictSizeWH'];           
    115                         $frame_width  = $PictSizeWH[0];
    116                         $frame_height = $PictSizeWH[1];
    117                         $frame_begin ='';
    118                          foreach ($conf['LLGBO2']['FR-sizes'] as $cle  => $value)
    119                                 { if ( $value > 0)      // boder value > 0     
    120                                          {      $frame_width = $frame_width + ( 2 * $value);                             
    121                                                 $frame_height = $frame_height + ( 2* $value);
    122                                                 $frame_begin = '<div class="llgboFR" style="border:'.$value.'px solid '.$conf['LLGBO2']['FR-colors'][$cle].'">'."\n".$frame_begin;
    123                                                 }
    124                                 }
    125                                
    126                         $frame_size = "\n".'<!-- Begin LLGBO frame -->'."\n".'<div   id="llgbo0" class="llgbo" style="border:0 ;width:'.$frame_width.'px; height:'.$frame_height.'px;">';
    127                         $template->append('llgbo', array(
    128                                  'FRAME_SIZE' => $frame_size ,
    129                                  'FRAME_BEGIN' => $frame_begin), true);
    130                                  
    131                 If ($conf['LLGBO2']['titleframe'] ) 
    132                          {  $template->append('llgbo', array(
    133                                          'TITLE_FRAME_COLOR' => $conf['LLGBO2']['FR-titlecolor'],
    134                                          'TITLE_FRAME' => $current['name'] ), true);
    135                                 $template->assign('SHOW_PICTURE_NAME_ON_TITLE' , false);
    136                                 }                       
    137                 } //--------------- end frame
    138                
    139        
    140         // ---- Metadata ----------     
    141         $ext = get_extension($current['path']);
    142         if (!in_array($ext, $conf['picture_ext']))
    143                 {$lang['Show file metadata'] =  'No Metadata';}
    144                 else
    145                 {if ($conf['show_exif']) // No exif ?
    146                         {$meta = "";
    147                         $u_metadata = $template->get_template_vars('U_METADATA');
    148                         $swt = "";
    149                          If ($conf['LLGBO2']['exifunderbt'])  // exif under bt
    150                                 {  $metadata = $template->get_template_vars('metadata');
    151                                 if (is_array($metadata))
    152                                   {  if (isset($metadata[0]) and is_array($metadata[0]))
    153                                                 {foreach($metadata[0] as $cle =>$tableau)
    154                                                         { if(is_array($tableau))
    155                                                          {   foreach($tableau as $cle=>$valeur)
    156                                                                 {   $swt= $swt.$cle.' : '.$valeur.'||';
    157                                                                         $meta = 1;} }   }
    158                                                         if  ( pwg_get_session_var('show_metadata') == 1 )
    159                                                         {       $lang['Show file metadata'] =  'EXIF Metadata';
    160                                                                  if (isset($metadata[0] ['TITLE'])) // advanced meta
    161                                                                 {$lang['Show file metadata']    = $metadata [0] ['TITLE'];}
    162                                                                 if ($meta  != 1 ) {$lang['Show file metadata'] =  'No Metadata';}
    163                                                         }
    164                                                         $template->assign( 'U_METADATA', $u_metadata.'" title="'.$lang['Show file metadata']."||".$swt);
    165                                                         unset( $metadata[0]);
    166                                                          $template->Clear_assign('metadata');// hide original metadata 
    167                                                          $template->assign('metadata',$metadata);} //  original metadata item > 0       
    168                                   }
    169                                   else
    170                                   {if  ( pwg_get_session_var('show_metadata') == 1 )
    171                                   {$lang['Show file metadata'] =  'No Metadata';
    172                                    $template->assign( 'U_METADATA', $u_metadata.'" title="'.$lang['Show file metadata']);}
    173                                    }
    174                                 }
     79{ global $template,$conf,$lang;
     80        if      (!empty($conf['LLGBO2']['is-picture']))
     81         {      // ---- Metadata ----------     
     82                if ($conf['LLGBO2']['exifunderbt'])  // exif under bt
     83                                {       $metadata = $template->get_template_vars('metadata');
     84                                   if (is_array($metadata[0]))
     85                                                {
     86                                                if ($metadata [0] ['TITLE'] == $lang['EXIF Metadata']    )  // only exif are displayed under buton
     87                                                        {$u_metadata = $template->get_template_vars('U_METADATA');
     88                                                                $swt = '';     
     89                                                                foreach($metadata[0]['lines'] as $cle=>$valeur){$swt= $swt.$cle.' : '.$valeur.'||';}
     90                                                                if  ( pwg_get_session_var('show_metadata') == 1 )
     91                                                                        { $lang['Show file metadata'] = $metadata [0] ['TITLE'];}                                               
     92                                                                $template->assign( 'U_METADATA',$u_metadata.'" title="'.$lang['Show file metadata']."||".$swt);
     93                                                                unset( $metadata[0]);
     94                                                                $template->Clear_assign('metadata');// hide all original metadata       
     95                                                                $template->assign('metadata',$metadata); }//  always display  metadata elem > 0
     96                                                }       
     97                                else
     98                                        {if  (( pwg_get_session_var('show_metadata') == 1 ) and (!is_array($metadata)))
     99                                                        {$template->Clear_assign( 'U_METADATA');}
     100                                        }
    175101                        }
    176                 }
    177         // --------------------------------------
    178         // Add llgbo requirement to ELEMENT_CONTENT
    179         // --------------------------------------
    180         $template->set_filenames( array('llgbo_content'=> dirname(__FILE__).'/template/llgbo_content.tpl') );
    181         $template->concat('picture', $template->parse('llgbo_content', true));
     102                // --------------------------------------
     103                // Add llgbo requirement to ELEMENT_CONTENT
     104                // --------------------------------------
     105                $template->set_filenames( array('llgbo_content'=> dirname(__FILE__).'/template/llgbo_content.tpl') );
     106                $template->concat('picture', $template->parse('llgbo_content', true));
     107        }       
    182108}
    183 
    184 
    185109
    186110/******************************************************************
    187111                        ------   MANAGE PICTURE PAGE                --------------     
    188112 ******************************************************************/
    189  // --> function llgbo_RenderContent($content,$element_info)
    190113 include_once(LLGBO_PATH.'include/manage_picture_content.php');
    191 /******************************************************************/             
    192  
     114/******************************************************************/               
    193115
    194 
    195 /******************************************************************/
    196 function LLGBO_prefilter_Content_Frame($content, $smarty)
    197 /******************************************************************/
    198 
    199 // --------------------------------------
    200 // add  End frame  picture_content TPL
    201 // --------------------------------------
    202   global $themeconf;
    203   $search = '{foreach from=$current.unique_derivatives';
    204   $replacement = '{$llgbo.FRAME_END}'.'</div>'."\n".' <!-- end LLGBO frame -->'."\n".$search;
    205         if (( strpos(strtoupper($themeconf['name']) , 'STRIPPED') === 0) )
    206                 {$search = 'class="hideTabs">';
    207                 $replacement =  $search
    208                 .'{$llgbo.FRAME_END}'
    209                 ."</div>";
    210                 }
    211    if (( strpos(strtoupper($themeconf['name']) , 'PWGCARBON_DFT') === 0) )
    212                 {$search = '{if $DISPLAY_NAV_THUMB}';
    213                 $replacement =   '{$llgbo.FRAME_END}'
    214                 ."</div>"."</div> <!-- end GBO frame -->"
    215                 .$search;
    216                 }
    217   $content = str_replace($search, $replacement, $content);
    218   return $content;
    219 }
    220 
    221 
    222 /******************************************************************/
    223 function LLGBO_prefilter_Picture_Frame($content, $smarty)
    224 /******************************************************************/
    225 
    226 // ------------------------------------
    227 //  add begin frame on picture TPL
    228 // --------------------------------------
    229  $search = '<div id="theImage">';
    230  $replacement = $search."\n".'{if isset($llgbo.TITLE_FRAME)}'."\n".'<span  id="llgboh2" style ="background:transparent;z-index:3;color:{$llgbo.TITLE_FRAME_COLOR}">{$llgbo.TITLE_FRAME}</span>';
    231  $replacement = $replacement."\n".'{/if}'."\n".'{$llgbo.FRAME_SIZE}'."\n".'{$llgbo.FRAME_BEGIN}';
    232 
    233 // ------------------------
    234   return  str_replace($search, $replacement, $content);
    235 
    236 }
    237116/******************************************************************/
    238117//    trigger à intercepter   
     
    240119 add_event_handler('init', 'llgbo_init');
    241120if (defined('IN_ADMIN'))
    242 {
    243   add_event_handler('get_admin_plugin_menu_links', 'llgbo_admin_menu');
     121{    add_event_handler('get_admin_plugin_menu_links', 'llgbo_admin_menu'); }
     122else
     123{   add_event_handler('loc_begin_page_header', 'llgbo_beginheader');
     124        add_event_handler('loc_end_page_header', 'llgbo_endHeader');
     125        add_event_handler('loc_begin_picture','llgbo_BeginPicture');
     126        add_event_handler('loc_end_picture', 'llgbo_EndPicture');
     127        add_event_handler('render_element_content', 'llgbo_RenderContent',  EVENT_HANDLER_PRIORITY_NEUTRAL, 20 );
    244128}
    245 else
    246 {                   
    247         add_event_handler('loc_begin_page_header', 'llgbo_beginheader');
    248         add_event_handler('loc_end_page_header', 'llgbo_endHeader');
    249         add_event_handler( 'loc_begin_picture','llgbo_BeginPicture');
    250         add_event_handler( 'loc_end_picture', 'llgbo_EndPicture');
    251         add_event_handler('render_element_content', 'llgbo_RenderContent',  EVENT_HANDLER_PRIORITY_NEUTRAL-1, 20  );
    252 }
    253 
    254129?>
  • extensions/LLGBO2/template/llgbo_content.tpl

    r28990 r29049  
    1717        {/if}
    1818
    19         {if  isset($llgbo.READIMGREELSIZE)}     
    20         <div id="LLGBO_READIMGREELSIZE" style="visibility:hidden;top:0;"> <!--  if exists Force javascript LlgboFr_Resize  to Read MainImage Reel Size via URL" --></div>
    21         {/if}
    2219
    2320
     21
Note: See TracChangeset for help on using the changeset viewer.