Ignore:
Timestamp:
Nov 8, 2006, 5:28:30 AM (17 years ago)
Author:
rvelices
Message:
  • comments.php improvements:
    • unvalidated comments are shown only for administrators
    • added delete/validate icons for admins
    • removed some unused code
  • display of comment content performed through an event
  • replace some get_thumbnail_src with get_thumbnail_url
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/comments.php

    r1571 r1598  
    4848
    4949  if (isset($_POST['submit']) and !is_adviser())
    50   {   
     50  {
    5151    foreach (explode(',', $_POST['list']) as $comment_id)
    5252    {
     
    142142;';
    143143$result = pwg_query($query);
    144 while ($row = mysql_fetch_array($result))
     144while ($row = mysql_fetch_assoc($result))
    145145{
     146  $thumb = get_thumbnail_url(
     147      array(
     148        'id'=>$row['image_id'],
     149        'path'=>$row['path'],
     150        'tn_ext'=>@$row['tn_ext']
     151        )
     152     );
    146153  $template->assign_block_vars(
    147154    'comment',
     
    151158          '&image_id='.$row['image_id'],
    152159      'ID' => $row['id'],
    153       'TN_SRC' => get_thumbnail_src($row['path'], @$row['tn_ext']),
     160      'TN_SRC' => $thumb,
    154161      'AUTHOR' => $row['author'],
    155162      'DATE' => format_date($row['date'],'mysql_datetime',true),
    156       'CONTENT' => parse_comment_content($row['content'])
     163      'CONTENT' => trigger_event('render_comment_content',$row['content'])
    157164      )
    158165    );
Note: See TracChangeset for help on using the changeset viewer.