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

non picture files management

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.