Show
Ignore:
Timestamp:
04/04/12 17:47:23 (14 months ago)
Author:
flop25
Message:

updated for 2.4 :
-deleted timthumb
-deleted config for auto-generation

features added :
-representative thumbs can be big : always, as the "Every x thumb" config or never

bug corrected :
-big thumbs didn't have rounded corners

Translations uk_UA needed for new keys

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/themeconf.inc.php

    r13015 r13894  
    4848  global $template, $conf; 
    4949  $config = unserialize( $conf['stripped_black_bloc'] ); 
     50  $template->assign( 'stripped_black_bloc', $config ); 
    5051  $new_tplvar=array(); 
    5152  $i=1; 
    5253  foreach ($tpl_thumbnails_var as $tplvar) 
    5354  { 
    54     list($width, $height, $type, $attr) = getimagesize( str_replace("../", "", $tplvar['TN_SRC']) ); 
    55     $tplvar['TN_WIDTH']=$width; 
    56     $tplvar['TN_HEIGHT']=$height; 
    57     if (!isset($tplvar['CAPTION_NB_IMAGES'])) 
    58     { 
    59       $conf_thumbnail_width=($i==$config['starting_to']) ? $config['column_width']+$config['thumbnail_width'] : $config['thumbnail_width']; 
    60       $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc"; 
    61     } 
    62     else 
    63     { 
    64       $conf_thumbnail_width=$config['thumbnail_width']; 
    65     } 
    66     if (isset($config['thumbnail'])) 
    67     { 
    68       switch ($config['thumbnail']) 
    69       { 
    70         case 'generated': 
    71           if (isset($tplvar['FILE_WIDTH'])) 
    72           { 
    73            $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".$tplvar['FILE_PATH']."&w=".$conf_thumbnail_width; 
    74           } 
    75           else 
    76           { 
    77            $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".str_replace("../", "", $tplvar['TN_SRC'])."&w=".$conf_thumbnail_width; 
    78           } 
    79           $tplvar['TN_HEIGHT']=floor($tplvar['TN_HEIGHT']*($conf_thumbnail_width/$tplvar['TN_WIDTH'])); 
    80           $tplvar['TN_WIDTH']=$conf_thumbnail_width; 
    81          break; 
    82          case 'auto': 
    83           if($tplvar['TN_WIDTH']<=$conf_thumbnail_width) 
    84           { 
    85             if (isset($tplvar['FILE_WIDTH'])) 
    86             { 
    87              $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".$tplvar['FILE_PATH']."&w=".$conf_thumbnail_width; 
    88             } 
    89             else 
    90             { 
    91              $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".str_replace("../", "", $tplvar['TN_SRC'])."&w=".$conf_thumbnail_width; 
    92             } 
    93             $tplvar['TN_HEIGHT']=floor($tplvar['TN_HEIGHT']*($conf_thumbnail_width/$tplvar['TN_WIDTH'])); 
    94             $tplvar['TN_WIDTH']=$conf_thumbnail_width; 
    95           } 
    96         break; 
    97         case 'piwigo':break; 
    98       } 
    99     } 
    100    $new_tplvar[]=$tplvar; 
    101     if ($i==$config['every_x']) 
    102     { 
    103       $i=1; 
    104     } 
    105     else { 
    106       $i++;     
    107     } 
     55    $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc"; 
     56    $new_tplvar[]=$tplvar; 
     57    $i= ($i==$config['every_x']) ? 1 : $i+1 ; 
    10858  } 
    10959  return $new_tplvar;