Changeset 29019


Ignore:
Timestamp:
Jul 10, 2014, 12:28:44 PM (10 years ago)
Author:
gbo
Message:

fix issue with automatic Size

Location:
extensions/LLGBO2
Files:
2 edited

Legend:

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

    r29005 r29019  
    1010        $template->assign('LLGBO_PATH',LLGBO_PATH);
    1111        include_once(LLGBO_PATH.'/css/sweettitles.css.php');   
    12         $conf['LLGBO2']['rendercontent']  = false;
     12
    1313        //-----------------------------------------------------------------
    1414        // -----------  add CSS tooltip in footer --------------------
     
    2020        // Frame is only available on picture extension
    2121        //-----------------------------------------------------------------
     22        unset ($conf['LLGBO2']['rendercontent']);
    2223         $ext = get_extension($element_info['path']);
    2324         if (!in_array($ext, $conf['picture_ext']))
     
    3031        if ( !empty($content) )
    3132                {        // 2.6 paticular case automatic size management
    32                  $autosize_in_place = $template->get_template_vars('is_automatic_size');
    33                  $autosize_selected = $template->get_template_vars('automatic_size');
     33                 $autosize_on = $template->get_template_vars('is_automatic_size');
     34                 if (empty($autosize_on) )
     35                                        {return $content;}
     36                                       
     37                $autosize_type = $template->get_template_vars('automatic_size');
    3438                 unset ($conf['LLGBO2']['PictSizeWH'] );
    35                         if ((isset($autosize_in_place))  and  (isset($autosize_selected)) )
    36                                 {$conf['LLGBO2']['PictSizeWH'] =  $element_info['derivatives'][$autosize_selected]->get_size();
    37                                           }
    38                 else
    39                 {return $content;}
     39                if (isset($autosize_type))
     40                                {$conf['LLGBO2']['PictSizeWH'] =  $element_info['derivatives'][$autosize_type]->get_size();
     41                                         }
    4042                }
    4143
     
    6870                           {$themestyle = 'default';}
    6971                           $frame_end = '';
     72                           
    7073                         foreach ($conf['LLGBO2']['FR-sizes'] as  $value)
    7174                                {if ( $value > 0)       // boder value > 0     
    7275                                        {       $frame_end = $frame_end.'</div>';}
    7376                                 }
    74                           
     77                         
    7578                         $template->append('llgbo', array(
    7679                                'FRAME_END' => $frame_end,
     
    7982        } // end frame
    8083         // 2.6 paticular case automatic size management
    81         if ((isset($autosize_in_place))  and  (isset ($autosize_selected)) )
    82                                                 {       return $template->parse( 'default_content', true);}
     84        if ((isset($autosize_on))  and  (isset ($autosize_type)) )
     85                                                { return $template->parse( 'default_content', true);}
    8386                                               
    8487} //end --> llgbo_RenderContent
  • extensions/LLGBO2/main.inc.php

    r29005 r29019  
    5151{
    5252        global $conf;
    53         Load_language('plugin.lang', LLGBO_PATH);
     53        load_language('plugin.lang', LLGBO_PATH);
    5454                       
    5555        $conf['LLGBO2'] =  safe_unserialize($conf['LLGBO2_Settings']);
     
    103103                       
    104104        If (($conf['LLGBO2']['frame'])    //Frame
    105                  and ($conf['LLGBO2']['rendercontent']) )// $content ok for update
     105                 and (!empty($conf['LLGBO2']['rendercontent'])) )// $content ok for update
    106106                {       $target = 'picture';
    107107                        if ($page['slideshow'] and $conf['light_slideshow'])
     
    247247        add_event_handler('loc_begin_page_header', 'llgbo_beginheader');
    248248        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');
     249        add_event_handler( 'loc_begin_picture','llgbo_BeginPicture');
     250        add_event_handler( 'loc_end_picture', 'llgbo_EndPicture');
    251251        add_event_handler('render_element_content', 'llgbo_RenderContent',  EVENT_HANDLER_PRIORITY_NEUTRAL-1, 20  );
    252252}
Note: See TracChangeset for help on using the changeset viewer.