Changeset 12930 for trunk/comments.php


Ignore:
Timestamp:
Jan 20, 2012, 6:36:58 AM (12 years ago)
Author:
rvelices
Message:

feature 2548 multisize

  • comments thumbnails + no more hard coded thumbnail sizes in css
  • removed admin thumbnail page + language cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r12922 r12930  
    117117    $category_ids = array(-1);
    118118  }
    119  
     119
    120120  $page['where_clauses'][] =
    121121    'category_id IN ('.implode(',', $category_ids).')';
     
    414414  $elements = array();
    415415  $query = '
    416 SELECT id, name, file, path, representative_ext
     416SELECT *
    417417  FROM '.IMAGES_TABLE.'
    418418  WHERE id IN ('.implode(',', $element_ids).')
     
    456456
    457457    // source of the thumbnail picture
    458     $thumbnail_src = DerivativeImage::thumb_url( $elements[$comment['image_id']] );
     458    $src_image = new SrcImage($elements[$comment['image_id']]);
    459459
    460460    // link to the full size picture
     
    470470      'ID' => $comment['comment_id'],
    471471      'U_PICTURE' => $url,
    472       'TN_SRC' => $thumbnail_src,
     472      'src_image' => $src_image,
    473473      'ALT' => $name,
    474474      'AUTHOR' => trigger_event('render_comment_author', $comment['author']),
     
    510510      if (isset($edit_comment) and ($comment['comment_id'] == $edit_comment))
    511511      {
    512         $tpl_comment['IN_EDIT'] = true;
    513         $key = get_ephemeral_key(2, $comment['image_id']);
    514         $tpl_comment['KEY'] = $key;
    515         $tpl_comment['IMAGE_ID'] = $comment['image_id'];
    516         $tpl_comment['CONTENT'] = $comment['content'];
     512        $tpl_comment['IN_EDIT'] = true;
     513        $key = get_ephemeral_key(2, $comment['image_id']);
     514        $tpl_comment['KEY'] = $key;
     515        $tpl_comment['IMAGE_ID'] = $comment['image_id'];
     516        $tpl_comment['CONTENT'] = $comment['content'];
    517517      }
    518518    }
     
    535535}
    536536
     537$derivative_params = trigger_event('get_comments_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
     538$template->assign( 'derivative_params', $derivative_params );
     539
    537540// include menubar
    538541$themeconf = $template->get_template_vars('themeconf');
Note: See TracChangeset for help on using the changeset viewer.