Well, I'm trying to figure out what I've messed up

At my site (
http://mmofaces.net/index.php?cat=3), it is not displaying the tabs for the pages correctly even though {TABS} is linked correctly in theme.php (if that is what is causing the problem).
I really don't know if it was ever working, or what I might have done wrong to stop it from displaying them - I added the albums that go over the page limit today.
Here is my theme.php
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2009 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.4.24
$HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/themes/classic/theme.php $
$Revision: 5969 $
$Author: gaugau $
$Date: 2009-05-21 22:03:33 +0200 (Do, 21 Mai 2009) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items removed //
// ------------------------------------------------------------------------- //
// Function for writing a pageheader
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
$custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);
$charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
header("Content-Type: text/html; charset=$charset");
user_save_profile();
$template_vars = array('{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
'{CHARSET}' => $charset,
'{META}' => $meta,
'{GAL_NAME}' => $CONFIG['gallery_name'],
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
'{SYS_MENU}' => theme_main_menu('sys_menu'),
'{SUB_MENU}' => theme_main_menu('sub_menu'),
'{ADMIN_MENU}' => theme_admin_mode_menu(),
'{CUSTOM_HEADER}' => $custom_header,
'{BREADCRUMB}' => $breadcrumb,
'{HEADER_BREADCRUMB}' => $breadcrumb_output,
);
// MOD - add {HEADER_BREADCRUMB} processing to pageheader
global $template_breadcrumb, $CURRENT_ALBUM_DATA, $cat;
$breadcrumb = '';
$breadcrumb_text = '';
$breadcrumb_output = '';
$actual_cat = (is_numeric($CURRENT_ALBUM_DATA['category']) ? $CURRENT_ALBUM_DATA['category'] : $cat);
breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text);
if ($breadcrumb) {
$template_breadcrumb_save = $template_breadcrumb;
$template = template_extract_block($template_breadcrumb, 'breadcrumb');
$params = array(
'{BREADCRUMB}' => $breadcrumb,
);
$breadcrumb_output = template_eval($template, $params);
$template_breadcrumb = $template_breadcrumb_save;
}
$template_vars['{HEADER_BREADCRUMB}'] = $breadcrumb_output;
// MOD - end
echo template_eval($template_header, $template_vars);
}
function theme_breadcrumb($breadcrumb_links, $BREADCRUMB_TEXTS, &$breadcrumb, &$BREADCRUMB_TEXT)
{
global $CURRENT_PIC_DATA;
$breadcrumb = '';
$BREADCRUMB_TEXT = '';
$breadcrumb_last = array_pop($breadcrumb_links);
foreach ($breadcrumb_links as $breadcrumb_link)
{
$breadcrumb .= " <img src=\"themes/faces/images/icon_path_separator.png\" width=\"6\" height=\"12\"/> " . $breadcrumb_link;
}
if (defined('DISPLAYIMAGE_PHP')) {
$breadcrumb_out = '<span style="font-weight: bold;">' . $breadcrumb_last . '</span>';
} elseif (defined('THUMBNAILS_PHP')) {
$breadcrumb_out = '<span style="font-weight: bold;">' . strip_tags($breadcrumb_last) . '</span>';
} elseif (defined('INDEX_PHP')) {
$breadcrumb_out = '<span style="font-weight: bold;">' . strip_tags($breadcrumb_last) . '</span>';
} else {
$breadcrumb_out = $breadcrumb_last;
}
$breadcrumb .= " <img src=\"themes/faces/images/icon_path_separator.png\" width=\"6\" height=\"12\"/> " . $breadcrumb_out;
foreach ($BREADCRUMB_TEXTS as $BREADCRUMB_TEXT_elt)
{
$BREADCRUMB_TEXT .= ' > ' . $BREADCRUMB_TEXT_elt;
}
/*
// Add filename to breadcrumb (if displayimage.php of course)
if ($CURRENT_PIC_DATA['filename']) {
// Add picture title to breadcrumb
$picture_title = $CURRENT_PIC_DATA['title'] ? $CURRENT_PIC_DATA['title'] : strtr(preg_replace("/(.+)\..*?\Z/", "\\1", htmlspecialchars($CURRENT_PIC_DATA['filename'])), "_", " ");
$breadcrumb .= ' > ' . $picture_title;
$BREADCRUMB_TEXT .= ' > ' . $picture_title;
}
*/
// We remove the first ' > '
$breadcrumb = substr_replace($breadcrumb,'', 0, 80);
$BREADCRUMB_TEXT = substr_replace($BREADCRUMB_TEXT,'', 0, 3);
}
// HTML template for sys_menu
$template_sys_menu = <<<EOT
{BUTTONS}
EOT;
// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
<a href="{HREF_TGT}" class="morelink" title="{HREF_TITLE}">{HREF_LNK}</a>
<!-- END {BLOCK_ID} -->
EOT;
// HTML template for the breadcrumb
if (defined('DISPLAYIMAGE_PHP')) {
$breadcrumb_out = '<span style="font-weight: bold;">' . $breadcrumb_last . '</span>';
} elseif (defined('THUMBNAILS_PHP')) {
$breadcrumb_out = strip_tags($breadcrumb_last);
} elseif (defined('INDEX_PHP')) {
$breadcrumb_out = strip_tags($breadcrumb_last);
} else {
$breadcrumb_out = $breadcrumb_last;
}
$breadcrumb .= ' > ' . $breadcrumb_out;
// BREADCRUMB HTML
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
{BREADCRUMB}
<!-- END breadcrumb -->
<!-- BEGIN breadcrumb_user_gal -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left"><b>{BREADCRUMB}</b></td>
<td align="right">{STATISTICS}</td>
</tr>
</table>
<!-- END breadcrumb_user_gal -->
EOT;
// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT
<table height="31" width="100%" cellspacing="0">
<tr>
<td width="100%" class="statlink"><h2>{ALBUM_NAME}</h2></td>
<td><img src="images/spacer.gif" width="1" alt="" /></td>
<td class="sortorder_cell">
<form name="sort">
<select name="sortbox" OnChange="location.href=sort.sortbox.options[selectedIndex].value">
<option>Sorting Order</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=ta">Ascending</option>
<option value="thumbnails.php?album={AID}&page={PAGE}&sort=td">Descending</option>
</select>
</form>
</td>
</tr>
</table>
EOT;
// HTML template for the album list
$template_album_list = <<<EOT
<!-- BEGIN stat_row -->
<tr>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
</td>
</tr>
<!-- END stat_row -->
<!-- BEGIN header -->
<tr style="padding-bottom:15px;" class="tableb_compact"><div class="tick_head1" style="padding-bottom:10px; font-weight:bold;">Select a server</div><div style="height:25px; padding-right:15px; padding-top:6px;float:right; color: #dad0b4;"><strong>TIP:</strong> To find your server quicker, use CTRL + F and type in the name. </div>
<!-- END header -->
<!-- BEGIN album_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="1" align="center" valign="top" class="tableh2">
<a href="{ALB_LINK_TGT}"><div style="width:100%;" class="alblink"><b>{ALBUM_TITLE}</b></div></a>
</td>
</tr>
<tr>
<td colspan="3">
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
</td>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
</td>
<td width="100%" valign="top" align="left" class="tableb_compact">
{ADMIN_MENU}
</td>
</tr>
</table>
</td>
<!-- END album_cell -->
<!-- BEGIN empty_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="1" valign="top">
<b> </b>
</td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td width="100%" valign="top" class="tableb_compact">
<div class="thumbnails" style="background-color:transparent"><img src="images/spacer.gif" width="1" height="1" border="0" class="image" style="border:0;margin-top:1px;margin-bottom:0" alt="" /></div>
</td>
</tr>
</table>
</td>
<!-- END empty_cell -->
<!-- BEGIN row_separator -->
</tr>
<tr class="tableb_compact">
<!-- END row_separator -->
<!-- BEGIN footer -->
</tr>
<!-- END footer -->
<!-- BEGIN tabs -->
<tr>
<td colspan="{COLUMNS}" style="padding: 0px;">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
{TABS}
</tr>
</table>
</td>
</tr>
<!-- END tabs -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
<tr style="padding-bottom:15px;" class="tableb_compact"><div class="tick_head1" style="padding-top:7px; padding-bottom:10px; font-weight:bold;">Select your game</div><div style="height:25px; padding-right:15px; padding-top:6px;float:right; color: #dad0b4;"><strong>TIP:</strong> What are you waiting for? Tell your friends to post their faces! </div>
<td class="tableh1" width="80%" align="left"><b>{CATEGORY}</b></td>
<td class="tableh1" width="10%" align="center"><b>{ALBUMS}</b></td>
<td class="tableh1" width="10%" align="center"><b>{PICTURES}</b></td>
</tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
<tr>
<td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
</tr>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
<tr>
<td class="catrow" align="left"><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="catrow" align="center">{ALB_COUNT}</td>
<td class="catrow" align="center">{PIC_COUNT}</td>
</tr>
<tr>
<td class="tableb" colspan="3">{CAT_ALBUMS}</td>
</tr>
<!-- END catrow -->
<!-- BEGIN footer -->
<tr>
<td colspan="3" class="tableh1" align="center"><span class="statlink">{STATISTICS}</span></td>
</tr>
<!-- END footer -->
<!-- BEGIN spacer -->
<img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->
EOT;
?>