aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_cats.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-03-01 14:24:04 +0000
committerrvelices <rv-github@modusoptimus.com>2008-03-01 14:24:04 +0000
commit732e456b3ba0c3e9ff4134e0ea815df03375918b (patch)
tree1bec560e6642d417c37a161b0de39d778686f8e3 /include/category_cats.inc.php
parente6b785cbaa554d815a385e380ff959c7dea595ba (diff)
- thumbnails.tpl migration
git-svn-id: http://piwigo.org/svn/trunk@2234 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_cats.inc.php')
-rw-r--r--include/category_cats.inc.php37
1 files changed, 8 insertions, 29 deletions
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index e969b475b..7f3c2ace6 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -288,7 +288,7 @@ if (count($categories) > 0)
}
}
}//fromto
-
+
$template->append( 'category_thumbnails', $tpl_var);
@@ -302,10 +302,6 @@ if (count($categories) > 0)
else
{
$template->set_filename( 'thumbnails', 'thumbnails.tpl');
- // first line
- $template->assign_block_vars('thumbnails.line', array());
- // current row displayed
- $row_number = 0;
if ($page['section']=='recent_cats')
{
@@ -315,8 +311,7 @@ if (count($categories) > 0)
foreach ($categories as $category)
{
- $template->assign_block_vars(
- 'thumbnails.line.thumbnail',
+ $tpl_var =
array(
'IMAGE' => $thumbnail_src_of[ $category['representative_picture_id'] ],
'IMAGE_ALT' => $category['name'],
@@ -335,8 +330,7 @@ if (count($categories) > 0)
)
),
'CLASS' => 'thumbCat',
- )
- );
+ );
if ($page['section']=='recent_cats')
{
$name = get_cat_display_name_cache($category['uppercats'], null, false);
@@ -344,30 +338,16 @@ if (count($categories) > 0)
else
{
$name = $category['name'];
- $template->merge_block_vars(
- 'thumbnails.line.thumbnail',
- array(
- 'IMAGE_TS' => get_icon($category['max_date_last'], $category['is_child_date_last']),
- )
- );
+ $tpl_var['IMAGE_TS'] = get_icon($category['max_date_last'], $category['is_child_date_last']);
}
- $template->assign_block_vars(
- 'thumbnails.line.thumbnail.category_name',
- array(
- 'NAME' => $name
- )
- );
+ $tpl_var['CATEGORY_NAME']=$name;
+
+ $template->append('thumbnails', $tpl_var);
//plugins need to add/modify sth in this loop ?
trigger_action('loc_index_category_thumbnail',
- $category, 'thumbnails.line.thumbnail' );
+ $category, 'thumbnails' );
- // create a new line ?
- if (++$row_number == $user['nb_image_line'])
- {
- $template->assign_block_vars('thumbnails.line', array());
- $row_number = 0;
- }
}
if ( isset($old_level_separator) )
@@ -376,7 +356,6 @@ if (count($categories) > 0)
}
$template->assign_var_from_handle('CATEGORIES', 'thumbnails');
- $template->delete_block_vars('thumbnails', true); // category_default reuse them
}
trigger_action('loc_end_index_category_thumbnails', $categories);
}