Changeset 3720


Ignore:
Timestamp:
Aug 2, 2009, 3:04:17 PM (11 years ago)
Author:
nikrou
Message:

New feature : configuration option for thumbnail directory

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/thumbnail.php

    r3282 r3720  
    205205      $filename_wo_ext = get_filename_wo_extension($filename);
    206206      $tn_ext = '';
    207       $base_test = $dirname.'/thumbnail/';
     207      $base_test = $dirname.'/'.$conf['dir_thumbnail'].'/';
    208208      $base_test.= $conf['prefix_thumbnail'].$filename_wo_ext.'.';
    209209      foreach ($conf['picture_ext'] as $ext)
  • trunk/admin/upload.php

    r3282 r3720  
    188188    $thumbnail.= '.'.$row['tn_ext'];
    189189        $url = $cat_names[$row['storage_category_id']]['dir'];
    190     $url.= 'thumbnail/'.$thumbnail;
     190    $url.= $conf['dir_thumbnail'].'/'.$thumbnail;
    191191
    192192    $tpl_var['thumbnail'] =
  • trunk/include/config_default.inc.php

    r3662 r3720  
    264264// contain characters among : a to z (case insensitive), "-" or "_".
    265265$conf['prefix_thumbnail'] = 'TN-';
     266
     267// dir_thumbnail : directory where thumbnail reside.
     268$conf['dir_thumbnail'] = 'thumbnail';
    266269
    267270// users_page: how many users to display in screen
  • trunk/include/functions.inc.php

    r3282 r3720  
    257257function mkget_thumbnail_dir($dirname, &$errors)
    258258{
    259   $tndir = $dirname.'/thumbnail';
     259  $tndir = $dirname.'/'.$conf['dir_thumbnail'];
    260260  if (! mkgetdir($tndir, MKGETDIR_NONE) )
    261261  {
     
    866866    $path = substr_replace(
    867867      get_filename_wo_extension($element_info['path']),
    868       '/thumbnail/'.$conf['prefix_thumbnail'],
     868      '/'.$conf['dir_thumbnail'].'/'.$conf['prefix_thumbnail'],
    869869      strrpos($element_info['path'],'/'),
    870870      1
  • trunk/include/ws_functions.inc.php

    r3662 r3720  
    10661066  // thumbnail directory is a subdirectory of the photo file, hard coded
    10671067  // "thumbnail"
    1068   $thumbnail_dir = $upload_dir.'/thumbnail';
     1068  $thumbnail_dir = $upload_dir.'/'.$conf['dir_thumbnail'];
    10691069  if (!is_dir($thumbnail_dir)) {
    10701070    umask(0000);
Note: See TracChangeset for help on using the changeset viewer.