Hello all,
I've been messing around with CPG for the past couple days and I am in love with the platform!
After applying the column mod from here:
http://forum.coppermine-gallery.net/index.php/topic,33615.msg156786.html#msg156786I adjusted the main page to show properly. Now, after clicking a subcategory (Honda), the next page (index.php?cat=2) is misaligned.
Your assistance will be much appreciated. Please let me know if there is anything further you need."
theme.php
<?php
define('THEME_IS_XHTML10_TRANSITIONAL',1);
define('THEME_HAS_PROGRESS_GRAPHICS',1);
$template_sub_menu_spacer = $template_sys_menu_spacer = '';
define('THEME_HAS_MENU_ICONS',16);
define('THEME_HAS_FILM_STRIP_GRAPHICS',1);
define('THEME_HAS_NAVBAR_GRAPHICS',1);
define('THEME_HAS_FILM_STRIP_GRAPHICS',1);
// Start Column Mod
// HTML template for the category list
$template_cat_list = <<<EOT
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
<tr>
<td class="tableh1" width="25%" colspan="9"><b>{CATEGORY}</b></td>
</tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
<td class="catrow_noalb" align="left" colspan="3"><table border="0"><tr>{CAT_THUMB}
<span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</tr></table></td>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
<td class="catrow" align="left" colspan="3"><table border="0"><tr><td>{CAT_THUMB}</td><td>
<span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
<!-- END catrow -->
<!-- BEGIN footer -->
<tr>
<td colspan="9" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
</tr>
<!-- END footer -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="10" border="" alt="" /><br />
<!-- END spacer -->
EOT;
function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
global $template_cat_list, $lang_cat_list;
if (count($cat_data) > 0) {
starttable('100%');
$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_noabl = template_extract_block($template_cat_list, 'catrow_noalb');
$template = template_extract_block($template_cat_list, 'catrow');
$count=0;
$columnCount=3;
echo "<tr>";
foreach($cat_data as $category) {
If ($count%$columnCount==0) {
echo "</tr><tr>";
}
$count++;
if (count($category) == 3) {
$params = array('{CAT_TITLE}' => $category[0],
'{CAT_THUMB}' => $category['cat_thumb'],
'{CAT_DESC}' => $category[1]
);
echo template_eval($template_noabl, $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}' => $category[2],
'{PIC_COUNT}' => $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}' => $category[2],
'{PIC_COUNT}' => $category[3],
);
echo template_eval($template, $params);
}
}
echo "</tr>";
if ($statistics && count($cat_data) > 0) {
$template = template_extract_block($template_cat_list, 'footer');
$params = array('{STATISTICS}' => $statistics);
echo template_eval($template, $params);
}
if (count($cat_data) > 0)
endtable();
echo template_extract_block($template_cat_list, 'spacer');
}
?>