OK, here is a much better solution that respects the admins config but still gets rid of the extra cell.
in your theme.php (This work was done on CPG1.32 Rainy Day) Your theme may differ slightly.
find:
<!-- BEGIN catrow -->
<tr>
<td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
<td class="tableb" align="center">{ALB_COUNT}</td>
<td class="tableb" align="center">{PIC_COUNT}</td>
</tr>
<tr>
<td class="tableb" colspan=3>{CAT_ALBUMS}</td>
</tr>
<!-- END catrow -->
Change to:
<!-- BEGIN catrow -->
<tr>
<td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
<td class="tableb" align="center">{ALB_COUNT}</td>
<td class="tableb" align="center">{PIC_COUNT}</td>
</tr>
{CAT_ALBUMS}
<!-- END catrow -->
Find:
function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
global $template_cat_list, $lang_cat_list;
Change to:
function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
global $template_cat_list, $lang_cat_list;
$non_empty_cat_albums=<<<EOT
<tr >
<td colspan=3>{CAT_ALBUMS}</td>
</tr>
EOT;
In the same function find:
$template = template_extract_block($template_cat_list, 'catrow');
foreach($cat_data as $category) {
Change to:
$template = template_extract_block($template_cat_list, 'catrow');
$params = array('{CAT_ALBUMS}' => $non_empty_cat_albums);
$template_non_empty_cat_albums = template_eval($template,$params);
foreach($cat_data as $category) {
In the same function find:
} else {
$params = array('{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
'{CAT_ALBUMS}' => $category['cat_albums'],
'{ALB_COUNT}' => $category[2],
'{PIC_COUNT}' => $category[3],
);
echo template_eval($template, $params);
}
change to:
} else {
$params = array('{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1],
'{CAT_ALBUMS}' => $category['cat_albums'],
'{ALB_COUNT}' => $category[2],
'{PIC_COUNT}' => $category[3],
);
if ($category['cat_albums']) {
echo template_eval($template_non_empty_cat_albums,$params);
} else {
echo template_eval($template, $params);
}
}
Hope that helps.
Devs, I've seen folks asking to get rid of those extra lines a few times, perhaps this can be thrown in the feature requests and maybe a "Dev Approved" version can be implemented for at least the base themes in the next release.