Ignore:
Timestamp:
Oct 23, 2004, 7:56:46 PM (20 years ago)
Author:
z0rglub
Message:
  • refactoring of comments.php
  • creation of function get_thumbnail_src used everywhere a thumbnail must be displayed
  • creation of function parse_comment_content (used in comments.php and picture.php)
  • concerning undefined index on arrays retrieved in database, instead of testing possibly unset values, use of @ operator (smarter...)
  • add pre tag in default.css stylesheet for debugging purpose (need to have left aligned text)
File:
1 edited

Legend:

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

    r470 r579  
    7878  $subrow = mysql_fetch_array( mysql_query( $query ) );
    7979
    80   $file = get_filename_wo_extension( $subrow['file'] );
    81    
    82   // creating links for thumbnail and associated category
    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   }
     80  $thumbnail_src = get_thumbnail_src($subrow['file'],
     81                                     $subrow['storage_category_id'],
     82                                     @$subrow['tn_ext']);
    9483 
    9584  $url_link = PHPWG_ROOT_PATH.'category.php?cat='.$row['category_id'];
     
    9887    'thumbnails.line.thumbnail',
    9988    array(
    100       'IMAGE'                   => $thumbnail_link,
     89      'IMAGE'                   => $thumbnail_src,
    10190      'IMAGE_ALT'               => $subrow['file'],
    10291      'IMAGE_TITLE'             => $lang['hint_category'],
Note: See TracChangeset for help on using the changeset viewer.