Copy the following code block to your theme's theme.php file:
/******************************************************************************
** Section <<<theme_display_cat_list>>> - START
******************************************************************************/
function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
global $template_cat_list, $lang_cat_list;
if ($statistics && count($cat_data) > 0) {
starttable('100%');
$template = template_extract_block($template_cat_list, 'footer');
$params = array('{STATISTICS}' => $statistics);
echo template_eval($template, $params);
}
if (count($cat_data) > 0) {
$template = template_extract_block($template_cat_list, 'header');
$params = array(
'{CATEGORY}' => $lang_cat_list['category'],
'{ALBUMS}' => $lang_cat_list['albums'],
'{PICTURES}' => $lang_cat_list['pictures'],
);
echo template_eval($template, $params);
}
$template_noalb = template_extract_block($template_cat_list, 'catrow_noalb');
$template = template_extract_block($template_cat_list, 'catrow');
foreach($cat_data as $category) {
if (!isset($category['cat_thumb'])) { $category['cat_thumb'] = ''; }
if (count($category) == 3) {
$params = array(
'{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
);
echo template_eval($template_noalb, $params);
} elseif (isset($category['cat_albums']) && ($category['cat_albums'] != '')) {
$params = array(
'{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
'{CAT_ALBUMS}' => $category['cat_albums'],
'{ALB_COUNT}' => cpg_float2decimal($category[2]),
'{PIC_COUNT}' => cpg_float2decimal($category[3]),
);
echo template_eval($template, $params);
} else {
$params = array(
'{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
'{CAT_ALBUMS}' => '',
'{ALB_COUNT}' => cpg_float2decimal($category[2]),
'{PIC_COUNT}' => cpg_float2decimal($category[3]),
);
echo template_eval($template, $params);
}
}
if (count($cat_data) > 0)
endtable();
echo template_extract_block($template_cat_list, 'spacer');
}
/******************************************************************************
** Section <<<theme_display_cat_list>>> - END
******************************************************************************/