Ignore:
Timestamp:
Nov 7, 2006, 4:37:57 AM (17 years ago)
Author:
rvelices
Message:
  • deprecated get_thumbnail_src (still there for compatibility). use rather

get_thumbnail_path or get_thumbnail_url (these allow plugins to override)

  • plugins can hook into index thumbnail display (items only so far)
File:
1 edited

Legend:

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

    r1384 r1596  
    5050;';
    5151  $result = pwg_query($query);
    52   while ($row = mysql_fetch_array($result))
     52  while ($row = mysql_fetch_assoc($result))
    5353  {
    5454    $row['rank'] = $page['rank_of'][ $row['id'] ];
     
    6161
    6262// template thumbnail initialization
    63 $template->set_filenames( array( 'thumbnails' => 'thumbnails.tpl',)); 
     63$template->set_filenames( array( 'thumbnails' => 'thumbnails.tpl',));
    6464if (count($pictures) > 0)
    6565{
    66   $template->assign_block_vars('thumbnails', array());
    6766  // first line
    6867  $template->assign_block_vars('thumbnails.line', array());
     
    7170}
    7271
     72trigger_action('loc_begin_index_thumbnails', $pictures);
     73
    7374foreach ($pictures as $row)
    7475{
    75   $thumbnail_url = get_thumbnail_src($row['path'], @$row['tn_ext']);
     76  $thumbnail_url = get_thumbnail_url($row);
    7677
    7778  // message in title for the thumbnail
     
    8182    $thumbnail_title .= ' : '.$row['filesize'].' KB';
    8283  }
    83  
     84
    8485  // link on picture.php page
    8586  $url = duplicate_picture_url(
     
    160161  }
    161162
     163  //plugins need to add/modify sth in this loop ?
     164  trigger_action('loc_index_thumbnail', $row, 'thumbnails.line.thumbnail' );
     165
    162166  // create a new line ?
    163167  if (++$row_number == $user['nb_image_line'])
     
    167171  }
    168172}
     173
     174trigger_action('loc_end_index_thumbnails', $pictures);
    169175$template->assign_var_from_handle('THUMBNAILS', 'thumbnails');
    170176
Note: See TracChangeset for help on using the changeset viewer.