Ignore:
Timestamp:
Apr 26, 2013, 1:51:34 PM (11 years ago)
Author:
cljosse
Message:

[extensions] Autosize update to piwigo 2.5 (fix bugs in admin )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/include/affiche.php

    r22360 r22367  
    1919//===========================================================================
    2020$size=  array(
    21             'src_img_h' => $imgSizeWH[1],
    22             'src_img_w' => $imgSizeWH[0],
    23             'window_height' =>$windowHeight,
    24             'window_width' => $windowWidth
     21            'src_img_h' => ($imgSizeWH[1]==0)?$_COOKIE['theMainImageHeight']:$imgSizeWH[1],
     22            'src_img_w' => ($imgSizeWH[0]==0)?$_COOKIE['theMainImageWidth']:$imgSizeWH[0],
     23            'window_height' =>($windowHeight==0)?$_COOKIE['windowHeight']:$windowHeight,
     24            'window_width' => ($windowWidth==0)?$_COOKIE['windowWidth']:$windowWidth
    2525          );
    26 if($imgSizeWH[1]==0){
    27           print_r($size);
    28           }
    29           $ratio=$imgSizeWH[0]/$imgSizeWH[1];
    30         if(preg_match("|fin_affiche|", $DEBUG_autosize, $val)){
    31 echo "<pre>";
    32 echo $DEBUG_autosize.$infos_message."
    33 ";
    34 print_r(explode(",","$infos_message"));
    35 print_r($events);
    36 
    37  echo  $pictureDeriv . " " . $pictureDeriv . " " . $pictureSelType;
    38 
    39 echo "WH: " . $windowHeight . "x " .$windowWidth;
    40 print_r($imgSizeWH);
    41         print_r($_COOKIE);
    42 
    43 
    44 die();
    45 }       
    46 
    47 
     26  $ratio=$size['src_img_w']/$size['src_img_h'];
    4827  $my_path = AUTOSIZE_PATH_ABS;
    49   $theme=$user['theme'];
    50  
     28  $theme=$user['theme']; 
    5129  $user_status = $user['status'] ;
    5230  $template->assign( array(
     
    6543      $value = $type_size;
    6644      if($type_size != "square" && $type_size != "thumb" )
    67       $options[$value] = $type_size;   
     45          $options[$value] = $type_size;   
    6846    } 
    6947 $autosize_parametres = cl_autosize_Get_Options();
     
    7856
    7957 //===========================================
    80 $COOKIE_PATH= cookie_path() ;
     58$COOKIE_PATH = cookie_path() ;
    8159
    8260
     
    169147                                );     
    170148
     149        if(preg_match("|fin_affiche|", $DEBUG_autosize, $val)){
     150      echo "<pre>";
     151      echo $DEBUG_autosize."<br>";
     152      echo "autosize_parametres; ";print_r($autosize_parametres);
     153      echo "infos_message; ";print_r(explode(",","$infos_message"));
     154      echo "events; ";print_r($events);
     155      echo  $pictureDeriv . " " . $pictureDeriv . " " . $pictureSelType;
     156      echo "WH: " . $windowHeight . "x " .$windowWidth;
     157      echo "Size : ".print_r($size);
     158            echo "COOKIE:".print_r($_COOKIE);
     159
     160
     161die();
     162}       
     163
    171164                           
    172165 //unset($_POST);
Note: See TracChangeset for help on using the changeset viewer.