Changeset 470


Ignore:
Timestamp:
Aug 5, 2004, 7:38:14 PM (20 years ago)
Author:
z0rglub
Message:

non picture files management

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_calendar.inc.php

    r456 r470  
    235235   
    236236    // creating links for thumbnail and associated category
    237     $thumbnail_link = get_complete_dir($row['storage_category_id']);
    238     $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
    239     $thumbnail_link.= $file.'.'.$row['tn_ext'];
     237    if (isset($row['tn_ext']) and $row['tn_ext'] != '')
     238    {
     239      $thumbnail_link = get_complete_dir($row['storage_category_id']);
     240      $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
     241      $thumbnail_link.= $file.'.'.$row['tn_ext'];
     242    }
     243    else
     244    {
     245      $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
     246      $thumbnail_link.= strtolower(get_extension($row['file'])).'.png';
     247    }
    240248   
    241249    $name = $calendar_year.' ('.$nb_pics.')';
     
    285293   
    286294    $file = get_filename_wo_extension($row['file']);
    287    
     295
    288296    // creating links for thumbnail and associated category
    289     $thumbnail_link = get_complete_dir($row['storage_category_id']);
    290     $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
    291     $thumbnail_link.= $file.'.'.$row['tn_ext'];
     297    if (isset($row['tn_ext']) and $row['tn_ext'] != '')
     298    {
     299      $thumbnail_link = get_complete_dir($row['storage_category_id']);
     300      $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
     301      $thumbnail_link.= $file.'.'.$row['tn_ext'];
     302    }
     303    else
     304    {
     305      $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
     306      $thumbnail_link.= strtolower(get_extension($row['file'])).'.png';
     307    }
    292308     
    293309    $name = $lang['month'][$calendar_month];
     
    345361   
    346362    // creating links for thumbnail and associated category
    347     $thumbnail_link = get_complete_dir($row['storage_category_id']);
    348     $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
    349     $thumbnail_link.= $file.'.'.$row['tn_ext'];
     363    if (isset($row['tn_ext']) and $row['tn_ext'] != '')
     364    {
     365      $thumbnail_link = get_complete_dir($row['storage_category_id']);
     366      $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
     367      $thumbnail_link.= $file.'.'.$row['tn_ext'];
     368    }
     369    else
     370    {
     371      $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
     372      $thumbnail_link.= strtolower(get_extension($row['file'])).'.png';
     373    }
    350374
    351375    list($year,$month,$day) = explode('-', $calendar_day);
     
    417441   
    418442    // creating links for thumbnail and associated category
    419     $thumbnail_link = get_complete_dir($row['storage_category_id']);
    420     $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
    421     $thumbnail_link.= $file.'.'.$row['tn_ext'];
     443    if (isset($row['tn_ext']) and $row['tn_ext'] != '')
     444    {
     445      $thumbnail_link = get_complete_dir($row['storage_category_id']);
     446      $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
     447      $thumbnail_link.= $file.'.'.$row['tn_ext'];
     448    }
     449    else
     450    {
     451      $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
     452      $thumbnail_link.= strtolower(get_extension($row['file'])).'.png';
     453    }
    422454   
    423455    $thumbnail_title = $lang['calendar_picture_hint'].$name;
  • trunk/include/category_default.inc.php

    r456 r470  
    8686  }
    8787  // thumbnail url
    88   $thumbnail_url = $cat_directory;
    89   $thumbnail_url.= 'thumbnail/'.$conf['prefix_thumbnail'];
    90   $thumbnail_url.= $file.'.'.$row['tn_ext'];
     88  if (isset($row['tn_ext']) and $row['tn_ext'] != '')
     89  {
     90    $thumbnail_url = $cat_directory;
     91    $thumbnail_url.= 'thumbnail/'.$conf['prefix_thumbnail'];
     92    $thumbnail_url.= $file.'.'.$row['tn_ext'];
     93  }
     94  else
     95  {
     96    $thumbnail_url = './template/'.$user['template'].'/mimetypes/';
     97    $thumbnail_url.= strtolower(get_extension($row['file'])).'.png';
     98  }
     99 
    91100  // message in title for the thumbnail
    92101  $thumbnail_title = $row['file'];
  • trunk/include/category_recent_cats.inc.php

    r452 r470  
    8181   
    8282  // creating links for thumbnail and associated category
    83   $thumbnail_link = get_complete_dir( $subrow['storage_category_id'] );
    84   $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
    85   $thumbnail_link.= $file.'.'.$subrow['tn_ext'];
     83  if (isset($subrow['tn_ext']) and $subrow['tn_ext'] != '')
     84  {
     85    $thumbnail_link = get_complete_dir($subrow['storage_category_id']);
     86    $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
     87    $thumbnail_link.= $file.'.'.$subrow['tn_ext'];
     88  }
     89  else
     90  {
     91    $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
     92    $thumbnail_link.= strtolower(get_extension($subrow['file'])).'.png';
     93  }
    8694 
    8795  $url_link = PHPWG_ROOT_PATH.'category.php?cat='.$row['category_id'];
  • trunk/include/category_subcats.inc.php

    r440 r470  
    9090
    9191  // creating links for thumbnail and associated category
    92   $thumbnail_link = get_complete_dir($image_row['storage_category_id']);
    93   $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
    94   $thumbnail_link.= $file.'.'.$image_row['tn_ext'];
     92  if (isset($image_row['tn_ext']) and $image_row['tn_ext'] != '')
     93  {
     94    $thumbnail_link = get_complete_dir($image_row['storage_category_id']);
     95    $thumbnail_link.= 'thumbnail/'.$conf['prefix_thumbnail'];
     96    $thumbnail_link.= $file.'.'.$image_row['tn_ext'];
     97  }
     98  else
     99  {
     100    $thumbnail_link = './template/'.$user['template'].'/mimetypes/';
     101    $thumbnail_link.= strtolower(get_extension($image_row['file'])).'.png';
     102  }
    95103
    96104  $thumbnail_title = $lang['hint_category'];
  • trunk/language/en_UK.iso-8859-1/common.lang.php

    r462 r470  
    230230$lang['period_seconds'] = 'seconds per picture';
    231231$lang['slideshow_stop'] = 'stop the slideshow';
     232$lang['download'] = 'download';
     233$lang['download_hint'] = 'download this file';
    232234$lang['comment_added'] = 'Your comment has been registered';
    233235$lang['comment_to_validate'] = 'An administrator must authorize your comment before it is visible.';
Note: See TracChangeset for help on using the changeset viewer.