diff options
author | rvelices <rv-github@modusoptimus.com> | 2009-02-05 02:28:37 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2009-02-05 02:28:37 +0000 |
commit | e71d84ebfbb3659a08ff4034f0f35113d7243a6d (patch) | |
tree | 623c1325f739f17d48d1fc555ae5d4f6aa32e488 /include/category_default.inc.php | |
parent | e8dac75c400dea48b97fe72a60cf554f0123c280 (diff) |
- 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
git-svn-id: http://piwigo.org/svn/trunk@3124 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_default.inc.php')
-rw-r--r-- | include/category_default.inc.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php index da2386445..804f2a5fa 100644 --- a/include/category_default.inc.php +++ b/include/category_default.inc.php @@ -90,11 +90,10 @@ SELECT image_id, COUNT(*) AS nb_comments $template->set_filenames( array( 'index_thumbnails' => 'thumbnails.tpl',)); trigger_action('loc_begin_index_thumbnails', $pictures); +$tpl_thumbnails_var = array(); foreach ($pictures as $row) { - $thumbnail_url = get_thumbnail_url($row); - // link on picture.php page $url = duplicate_picture_url( array( @@ -107,7 +106,7 @@ foreach ($pictures as $row) $tpl_var = array( 'ID' => $row['id'], - 'TN_SRC' => $thumbnail_url, + 'TN_SRC' => get_thumbnail_url($row), 'TN_ALT' => $row['file'], 'TN_TITLE' => get_thumbnail_title($row), 'ICON_TS' => get_icon($row['date_available']), @@ -171,13 +170,12 @@ foreach ($pictures as $row) $tpl_var['NB_COMMENTS'] = $row['nb_comments']; } - //plugins need to add/modify sth in this loop ? - $tpl_var = trigger_event('loc_index_thumbnail', $tpl_var, $row); - - $template->append('thumbnails', $tpl_var); + $tpl_thumbnails_var[] = $tpl_var; } -trigger_action('loc_end_index_thumbnails', $pictures); +$tpl_thumbnails_var = trigger_event('loc_end_index_thumbnails', $tpl_thumbnails_var, $pictures); +$template->assign('thumbnails', $tpl_thumbnails_var); + $template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails'); pwg_debug('end include/category_default.inc.php'); |