Changeset 29484


Ignore:
Timestamp:
Sep 11, 2014, 2:03:20 PM (10 years ago)
Author:
gbo
Message:

Compliance Piwigo 2.7rc1

Location:
extensions/LLGBO2
Files:
5 edited

Legend:

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

    r29049 r29484  
    8989        if ($conf['LLGBO2']['tooltipdisp'] )//   tooltip 
    9090        {       $prev = $template->get_template_vars('previous');
    91                 $next  = $template->get_template_vars('next');
    92                 $swtimg =   '||<img src=';     
    93                 if (isset($prev)){$template->append('previous',  array('TITLE_ESC' =>  $prev['TITLE_ESC'].$swtimg.$prev['THUMB_SRC'].'>'),TRUE);}
    94                 if (isset($next)){$template->append('next',  array('TITLE_ESC' =>  $next['TITLE_ESC'].$swtimg.$next['THUMB_SRC'].'>'),TRUE);}
     91                $next  = $template->get_template_vars('next');
     92       
     93                if (isset($prev)){
     94                        $prev_thumbimg =  '||<img src='.$prev['derivatives']['thumb']->get_url(); 
     95                        $template->append('previous',  array('TITLE_ESC' =>  $prev['TITLE_ESC'].$prev_thumbimg.'>'),TRUE);
     96                        }
     97                if (isset($next)){
     98                                $next_thumbimg =  '||<img src='.$next['derivatives']['thumb']->get_url();
     99                                $template->append('next',  array('TITLE_ESC' =>  $next['TITLE_ESC'].$next_thumbimg.'>'),TRUE);
     100                        }
    95101                $template->append('llgbo', array('tooltipCSS'  => $sweetcss), true);
    96         }               
    97          // 2.6 paticular case automatic size and modus management
     102        }       
     103 // -----------------------------------------------------------
     104 // 2.6 paticular case automatic size and modus management
     105 // -----------------------------------------------------------
    98106        if ($update_tpl)
    99107                {return $template->parse( 'default_content', true);} 
     
    107115        // --------------------------------------   
    108116                $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}';
     117        $replacement =  $replacement.'{$llgbo.FRAME_TITLE}'.'{$llgbo.FRAME_SIZE}'.'{$llgbo.FRAME_BEGIN}'."\n".'<img $1 id="theMainImage" $2>'.'{$llgbo.FRAME_END}';
    110118                $content = preg_replace($patern, $replacement, $content); 
    111119        return $content;
  • extensions/LLGBO2/js/jquery_llgboframeresize.js

    r29049 r29484  
    1010                                                var FrLstBdr = 0; var frbdr=0;
    1111                                                jQuery(".llgboFR").each(function(){
    12                                                          frbdr = parseInt(jQuery(this).css('border-top-width'));
    13                                                                 FrLstBdr = (frbdr * 2)+FrLstBdr;
     12                                                        frbdr = parseInt(jQuery(this).css('border-top-width'));
     13                                                        FrLstBdr = (frbdr * 2)+FrLstBdr;
    1414                                                        });
    1515                                        }               
  • extensions/LLGBO2/main.inc.php

    r29049 r29484  
    99Add a border around  picture ......
    1010        -- 01-07-2014   
    11                 2.7.A Compliance Piwigo 2.7     new administration management
     11                2.7.A Compliance Piwigo 2.7 béta        new administration management
     12        -- 10-09-2014   
     13                2.7.A Compliance Piwigo 2.7rc1  new administration management
    1214 */
    1315if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
  • extensions/LLGBO2/maintain.class.php

    r29005 r29484  
    3434        private $default_header;
    3535       
    36 function __construct(){
     36 function __construct(){
    3737// +-----------------------------------------------------------------------+
    3838// +----------------- default values            ---------------------------+
    3939// +-----------------------------------------------------------------------+   
    40 include(PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/' .'defaultvalues.php');
     40 include(PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/' .'defaultvalues.php');
    4141     // variable declared in include       
    4242         $this->default_main = $default_main;
     
    4444         $this->default_frame = $default_frame;
    4545         $this->default_header = $default_header; 
    46     }       
    47 // +-----------------------------------------------------------------------+
    48 // +----------------- default values            ---------------------------+
    49 // +-----------------------------------------------------------------------+   
     46 }       
    5047       
    5148// +-----------------------------------------------------------------------+
    5249// +---------------  Install all settings  --------------------------------+
    5350// +-----------------------------------------------------------------------+
    54     function install($plugin_version, &$errors=array()) {
    55                 global $conf;
     51 function install($plugin_version, &$errors=array()) {
     52        global $conf;
    5653// +-----------------------------------------------------------------------+   
    57                 if (empty($conf['LLGBO2_Settings']))
    58                         {       if  (isset($conf['LLGBO'])) // compatibility 2.6 --> 2.7
    59                                         { $Oldvalues = explode("," , $conf['LLGBO']);                   
    60                                                 foreach($Oldvalues as $cle  => $valeur)
    61                                                 {       if ($Oldvalues[$cle]  == 'true' )
    62                                                                 {$Oldvalues[$cle]  = (boolean)true ;}   else { $Oldvalues[$cle]  = (boolean)false;}
    63                                                 }
    64                                                 $this->default_main['version']                          =  1;
    65                                                 $this->default_main['frame']                            =  $Oldvalues[0];
    66                                                 $this->default_main['tooltipdisp']                      =  $Oldvalues[1];
    67                                                 $this->default_main['exifunderbt']                      =  $Oldvalues[2];
    68                                                 $this->default_main['titleframe']                       =  $Oldvalues[5];
    69                                                 $this->default_main['manageheader']             =  $Oldvalues[6];
    70                                                 $this->default_main['alwaysdisplayexif']        =  $Oldvalues[10];
    71                                                 conf_delete_param('LLGBO');  // old values before 2.7
     54        if (empty($conf['LLGBO2_Settings']))
     55                {       if  (isset($conf['LLGBO'])) // compatibility 2.6 --> 2.7
     56                                { $Oldvalues = explode("," , $conf['LLGBO']);                   
     57                                        foreach($Oldvalues as $cle  => $valeur)
     58                                        {       if ($Oldvalues[$cle]  == 'true' )
     59                                                        {$Oldvalues[$cle]  = (boolean)true ;}   else { $Oldvalues[$cle]  = (boolean)false;}
    7260                                        }
    73                        
     61                                        $this->default_main['version']                          =  1;
     62                                        $this->default_main['frame']                            =  $Oldvalues[0];
     63                                        $this->default_main['tooltipdisp']                      =  $Oldvalues[1];
     64                                        $this->default_main['exifunderbt']                      =  $Oldvalues[2];
     65                                        $this->default_main['titleframe']                       =  $Oldvalues[5];
     66                                        $this->default_main['manageheader']             =  $Oldvalues[6];
     67                                        $this->default_main['alwaysdisplayexif']        =  $Oldvalues[10];
     68                                        conf_delete_param('LLGBO');  // old values before 2.7
     69                                }
     70
     71// +-----------------------------------------------------------------------+                           
     72                if  (isset($conf['LLGBOTOOLTIP'])) // compatibility 2.6 --> 2.7
     73                                {        $Oldvalues = explode("," , $conf['LLGBOTOOLTIP']);
     74
     75                                        $this->default_tooltip['TT-width']                      = $Oldvalues[0];
     76                                        $this->default_tooltip['TT-size']                       = $Oldvalues[1];
     77                                        $this->default_tooltip['TT-bordercolor']        = $Oldvalues[2];
     78                                        $this->default_tooltip['TT-bgcolor']            = $Oldvalues[3];
     79                                        $this->default_tooltip['TT-titlecolor']         = $Oldvalues[4];
     80                                        $this->default_tooltip['TT-textcolor']          = $Oldvalues[5];
     81                                               
     82                                        conf_delete_param('LLGBOTOOLTIP');  // old values before 2.7
     83                                }
    7484               
    7585// +-----------------------------------------------------------------------+                           
    76                         if  (isset($conf['LLGBOTOOLTIP'])) // compatibility 2.6 --> 2.7
    77                                         {        $Oldvalues = explode("," , $conf['LLGBOTOOLTIP']);
    7886
    79                                                 $this->default_tooltip['TT-width']                      = $Oldvalues[0];
    80                                                 $this->default_tooltip['TT-size']                       = $Oldvalues[1];
    81                                                 $this->default_tooltip['TT-bordercolor']        = $Oldvalues[2];
    82                                                 $this->default_tooltip['TT-bgcolor']            = $Oldvalues[3];
    83                                                 $this->default_tooltip['TT-titlecolor']         = $Oldvalues[4];
    84                                                 $this->default_tooltip['TT-textcolor']          = $Oldvalues[5];
    85                                                        
    86                                                 conf_delete_param('LLGBOTOOLTIP');  // old values before 2.7
    87                                         }
    88                        
    89 // +-----------------------------------------------------------------------+                           
     87                if (isset($conf['LLGBOFRAME']))  // compatibility 2.6 --> 2.7
     88                        {        $Oldvalues = explode("," , $conf['LLGBOFRAME']);
     89                                 $i=0;
     90                                for ($x = 1   ;$x < 32  ; $x =$x +2)
     91                                {       $newcolors[$i]  = $Oldvalues[$x]; 
     92                                        $newsizes[$i]  =  $Oldvalues[$x +1];
     93                                        $i = $i +1;
     94                                }
     95                                $this->default_frame['FR-titlecolor']   =   $Oldvalues[0];
     96                                $this->default_frame['FR-sizes']                =   $newsizes;
     97                                $this->default_frame['FR-colors']               =   $newcolors;
     98                               
     99                                conf_delete_param('LLGBOFRAME');  // old values before 2.7
     100                        }
    90101       
    91                         if (isset($conf['LLGBOFRAME']))  // compatibility 2.6 --> 2.7
    92                                 {        $Oldvalues = explode("," , $conf['LLGBOFRAME']);
    93                                      $i=0;
    94                                         for ($x = 1   ;$x < 32  ; $x =$x +2)
    95                                         {       $newcolors[$i]  = $Oldvalues[$x]; 
    96                                                 $newsizes[$i]  =  $Oldvalues[$x +1];
    97                                                 $i = $i +1;
    98                                         }
    99                        
    100                                                 $this->default_frame['FR-titlecolor']   =   $Oldvalues[0];
    101                                                 $this->default_frame['FR-sizes']                =   $newsizes;
    102                                                 $this->default_frame['FR-colors']               =   $newcolors;
    103                                        
    104                                         conf_delete_param('LLGBOFRAME');  // old values before 2.7
    105                                 }
    106                
    107102// +-----------------------------------------------------------------------+                                   
     103
     104                 if (isset($conf['LLGBOHEADER']))  // compatibility 2.6 --> 2.7
     105                        {       $Oldvalues = explode("," , $conf['LLGBOHEADER']);
     106                                $i = 0;
     107                                foreach($this->default_header['HD-dispheader'] as $cle  => $valeur)
     108                                {       if ($Oldvalues[$i] == 'true' )  {$Oldvalues[$i] = (boolean)true ;} else { $Oldvalues[$i] = (boolean)false;}
     109                                        $this->default_header['HD-dispheader'][$cle] = $Oldvalues[$i];
     110                                        $i = $i +1;}
     111                                conf_delete_param('LLGBOHEADER');  // old values before 2.7
     112                        }
    108113       
    109                          if (isset($conf['LLGBOHEADER']))  // compatibility 2.6 --> 2.7
    110                                 {       $Oldvalues = explode("," , $conf['LLGBOHEADER']);
    111                                         $i = 0;
    112                                         foreach($this->default_header['HD-dispheader'] as $cle  => $valeur)
    113                                         {       if ($Oldvalues[$i] == 'true' )  {$Oldvalues[$i] = (boolean)true ;} else { $Oldvalues[$i] = (boolean)false;}
    114                                                 $this->default_header['HD-dispheader'][$cle] = $Oldvalues[$i];
    115                                                 $i = $i +1;}
    116                                         conf_delete_param('LLGBOHEADER');  // old values before 2.7
    117                                 }
    118                
    119          $conf['LLGBO2'] =array_merge((array)$this->default_main, (array)$this->default_tooltip,(array) $this->default_frame,(array) $this->default_header);
    120                  print_r($this->default_main);
    121                  conf_update_param('LLGBO2_Settings', $conf['LLGBO2']);
    122                 }
     114         $conf['LLGBO2'] =array_merge((array)$this->default_main, (array)$this->default_tooltip,(array) $this->default_frame,(array) $this->default_header);
     115         print_r($this->default_main);
     116         conf_update_param('LLGBO2_Settings', $conf['LLGBO2']);
    123117        }
    124 
     118 }
    125119       
    126 // +-----------------------------------------------------------------------+           
    127120// +-----------------------------------------------------------------------+                   
    128121  function update($old_version, $new_version, &$errors=array())
    129   {
     122        {
    130123    $this->install($new_version, $errors);
    131   }
     124        }
    132125       
    133126// +-----------------------------------------------------------------------+
    134         function uninstall() { 
     127 function uninstall()
     128        { 
    135129                conf_delete_param('LLGBO2_Settings');
    136        
    137130        }
    138131}
  • extensions/LLGBO2/template/llgbo_content.tpl

    r29049 r29484  
    11<!-- LLGBO2 picture_content -->
    2 
    3         {if  isset($llgbo.TOOLTIPCSS)}   
    4                         {$llgbo.TOOLTIPCSS}
    5         {/if} 
    6         {if  isset($llgbo.GBOCSS)}     
    7                         {combine_css path=$llgbo.GBOCSS order=+10}
    8         {/if}
    9          
    10         {if  !isset($llgbo.NOJS)}
    11                         {if  isset($llgbo.TOOLTIP)}       
    12                                 {combine_script id='llgbojqtooltip' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"}
    13                          {/if}
    14                          {if  isset($llgbo.FRAME_BEGIN)}       
    15                                 {combine_script id='llgbojqframe' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js" }
    16                         {/if}
     2{if  isset($llgbo.TOOLTIPCSS)}   
     3        {$llgbo.TOOLTIPCSS}
     4{/if} 
     5{if  isset($llgbo.GBOCSS)}     
     6        {combine_css path=$llgbo.GBOCSS order=+10}
     7{/if}
     8 
     9{if  !isset($llgbo.NOJS)}
     10        {if  isset($llgbo.TOOLTIP)}       
     11                {combine_script id='llgbojqtooltip' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"}
     12         {/if}
     13         {if  isset($llgbo.FRAME_BEGIN)}       
     14                {combine_script id='llgbojqframe' load='footer' require='jquery'  path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js" }
    1715        {/if}
     16{/if}
    1817
    1918
    2019
    21 
Note: See TracChangeset for help on using the changeset viewer.