Changeset 3124 for trunk/include


Ignore:
Timestamp:
Feb 5, 2009, 3:28:37 AM (16 years ago)
Author:
rvelices
Message:
  • removed triggers loc_index_thumbnail and loc_index_category_thumbnail
  • changed triggers loc_end_index_thumbnails and loc_end_index_category_thumbnails from actions to events
Location:
trunk/include
Files:
2 edited

Legend:

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

    r3049 r3124  
    221221  trigger_action('loc_begin_index_category_thumbnails', $categories);
    222222
     223  $tpl_thumbnails_var = array();
     224
    223225  foreach ($categories as $category)
    224226  {
     
    238240    }
    239241
    240     $icon_ts = get_icon($category['max_date_last'], $category['is_child_date_last']);
    241 
    242242    $tpl_var =
    243243        array(
     
    245245          'TN_SRC'   => $thumbnail_src_of[$category['representative_picture_id']],
    246246          'TN_ALT'   => strip_tags($category['name']),
    247           'ICON_TS'  => $icon_ts,
     247          'ICON_TS'  => get_icon($category['max_date_last'], $category['is_child_date_last']),
    248248
    249249          'URL'   => make_index_url(
     
    296296    }//fromto
    297297
    298     //plugins need to add/modify sth in this loop ?
    299     $tpl_var = trigger_event('loc_index_category_thumbnail',
    300                   $tpl_var, $category );
    301 
    302     $template->append( 'category_thumbnails', $tpl_var);
    303   }
    304 
    305   trigger_action('loc_end_index_category_thumbnails', $categories);
     298    $tpl_thumbnails_var[] = $tpl_var;
     299  }
     300
     301  $tpl_thumbnails_var = trigger_event('loc_end_index_category_thumbnails', $tpl_thumbnails_var, $categories);
     302  $template->assign( 'category_thumbnails', $tpl_thumbnails_var);
     303
    306304  $template->assign_var_from_handle('CATEGORIES', 'index_category_thumbnails');
    307305}
     306pwg_debug('end include/category_cats.inc.php');
    308307?>
  • trunk/include/category_default.inc.php

    r3120 r3124  
    9191
    9292trigger_action('loc_begin_index_thumbnails', $pictures);
     93$tpl_thumbnails_var = array();
    9394
    9495foreach ($pictures as $row)
    9596{
    96   $thumbnail_url = get_thumbnail_url($row);
    97 
    9897  // link on picture.php page
    9998  $url = duplicate_picture_url(
     
    108107    array(
    109108      'ID'        => $row['id'],
    110       'TN_SRC'    => $thumbnail_url,
     109      'TN_SRC'    => get_thumbnail_url($row),
    111110      'TN_ALT'    => $row['file'],
    112111      'TN_TITLE'  => get_thumbnail_title($row),
     
    172171  }
    173172
    174   //plugins need to add/modify sth in this loop ?
    175   $tpl_var = trigger_event('loc_index_thumbnail', $tpl_var, $row);
    176 
    177   $template->append('thumbnails', $tpl_var);
     173  $tpl_thumbnails_var[] = $tpl_var;
    178174}
    179175
    180 trigger_action('loc_end_index_thumbnails', $pictures);
     176$tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures);
     177$template->assign('thumbnails', $tpl_thumbnails_var);
     178
    181179$template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails');
    182180
Note: See TracChangeset for help on using the changeset viewer.