only have in your theme.php what you've actually changed and not a complete copy of themes/sample/theme.php
below's your theme reduced to 15%... should fix your tabs issue
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 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 as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Coppermine version: 1.4.8
$Source$ /cvsroot/coppermine/stable/themes/rainbow1/theme.php,v $
$Revision: 3116 $
$Author: gaugau $
$Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/
// ------------------------------------------------------------------------- //
// This theme has all CORE items that are available //
// ------------------------------------------------------------------------- //
// The following terms can be defined in theme.php
// ('THEME_HAS_RATING_GRAPHICS', 1) : The location for the ratings graphics will
// be directed to the themes images folder.
// RUBBISH : images/rating0.gif
// POOR : images/rating1.gif
// FAIR : images/rating2.gif
// GOOD : images/rating3.gif
// EXCELLENT : images/rating4.gif
// GREAT : images/rating5.gif
//('THEME_HAS_NAVBAR_GRAPHICS', 1); : The location for the navbar graphics will
// be directed to the themes images folder.
// Back to thumbnails : images/thumbnails.gif
// Picture Information : images/info.gif
// Slideshow : images/slideshow.gif
// Report to admin : images/report.gif
// Ecard : images/ecard.gif
// Previous : images/prev.gif
// Next : images/next.gif
// ('THEME_HAS_FILM_STRIP_GRAPHIC', 1) : The location for the film strip graphics will
// be directed to the themes images folder.
// tile : images/tile.gif
// ('THEME_HAS_FILM_STRIP_GRAPHICS', 1) : The location for the film strip graphics will
// be directed to the themes images folder.
// tile on the top : images/tile1.gif
// tile on the bottom : images/tile2.gif
// ('THEME_HAS_NO_SYS_MENU_BUTTONS', 1) : When present the system won't attempt to replace {BUTTONS} in the SYS_MENU template
// The entire block needs to be present like in Coppermine 1.3 themes
// ('THEME_HAS_NO_SUB_MENU_BUTTONS', 1) When present the system won't attempt to replace {BUTTONS} in the SUB_MENU template
// The entire block needs to be present like in Coppermine 1.3 themes
// ('THEME_IS_XHTML10_TRANSITIONAL',1) : If theme is defined as XHTML10_TRANSITIONAL the VANITY footer will be enabled
// if the theme has a {VANITY} token in its template.html. Don't enable this if you have modified the code! See the
// docs/theme.html documentation for validation methodology.
// Creates buttons from a template using an array of tokens
// this function is used in this file it needs to be declared before being called.
function assemble_template_buttons($template_buttons,$buttons) {
$counter=0;
$output='';
foreach ($buttons as $button) {
if (isset($button[4])) {
$spacer=$button[4];
} else {
$spacer='';
}
$params = array(
'{SPACER}' => $spacer,
'{BLOCK_ID}' => $button[3],
'{HREF_TGT}' => $button[2],
'{HREF_TITLE}' => $button[1],
'{HREF_LNK}' => $button[0]
);
$output.=template_eval($template_buttons, $params);
}
return $output;
}
// Creates an array of tokens to be used with function assemble_template_buttons
// this function is used in this file it needs to be declared before being called.
function addbutton(&$menu,$href_lnk,$href_title,$href_tgt,$block_id,$spacer) {
$menu[]=array($href_lnk,$href_title,$href_tgt,$block_id,$spacer);
}
// HTML template for sub_menu
$template_sub_menu = <<<EOT
<!-- BEGIN custom_link -->
<a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a><br /><br />
<!-- END custom_link -->
<!-- BEGIN album_list -->
<a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a><br /><br />
<!-- END album_list -->
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a><br /><br />
<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a><br /><br />
<a href="{TOPN_TGT}">{TOPN_LNK}</a><br /><br />
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a><br /><br />
<a href="{FAV_TGT}">{FAV_LNK}</a><br /><br />
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
EOT;
// HTML template for sys_menu
$template_sys_menu = <<<EOT
{BUTTONS}
EOT;
// HTML template for sub_menu
$template_sub_menu = <<<EOT
<!-- BEGIN custom_link -->
<a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a><br /><br />
<!-- END custom_link -->
<!-- BEGIN album_list -->
<a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a><br /><br />
<!-- END album_list -->
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a><br /><br />
<a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a><br /><br />
<a href="{TOPN_TGT}">{TOPN_LNK}</a><br /><br />
<a href="{TOPRATED_TGT}">{TOPRATED_LNK}</a><br /><br />
<a href="{FAV_TGT}">{FAV_LNK}</a><br /><br />
<a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
EOT;
if (!defined('THEME_HAS_NO_SYS_MENU_BUTTONS')) {
// HTML template for template sys_menu spacer
$template_sys_menu_spacer ="::";
// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
<a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a> {SPACER}
<!-- END {BLOCK_ID} -->
EOT;
// HTML template for main menu
$template_sys_menu = <<<EOT
<span class="topmenu">
<!-- BEGIN my_gallery -->
<a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a><br /><br />
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
<a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a><br /><br />
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
<a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a><br /><br />
<!-- END my_profile -->
<!-- BEGIN faq -->
<a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a><br /><br />
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
<a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a><br /><br />
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
<a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a><br /><br />
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
<a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a><br /><br />
<!-- END upload_pic -->
<!-- BEGIN register -->
<a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a><br /><br />
<!-- END register -->
<!-- BEGIN login -->
<a href="{LOGIN_TGT}" title="">{LOGIN_LNK}</a>
<!-- END login -->
<!-- BEGIN logout -->
<a href="{LOGOUT_TGT}" title="">{LOGOUT_LNK}</a><br />
<!-- END logout -->
</span>
EOT;
// HTML template for template sub_menu spacer
$template_sub_menu_spacer = $template_sys_menu_spacer;
// HTML template for template sub_menu buttons
$template_sub_menu_button= $template_sys_menu_button;
// HTML template for template sub_menu buttons
// {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
addbutton($sub_menu_buttons,'{CUSTOM_LNK_LNK}','{CUSTOM_LNK_TITLE}','{CUSTOM_LNK_TGT}','custom_link',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{ALB_LIST_LNK}','{ALB_LIST_TITLE}','{ALB_LIST_TGT}','album_list',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{LASTUP_LNK}','{LASTUP_TITLE}','{LASTUP_TGT}','lastup',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{LASTCOM_LNK}','{LASTCOM_TITLE}','{LASTCOM_TGT}','lastcom',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{TOPN_LNK}','{TOPN_TITLE}','{TOPN_TGT}','topn',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{TOPRATED_LNK}','{TOPRATED_TITLE}','{TOPRATED_TGT}','toprated',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{FAV_LNK}','{FAV_TITLE}','{FAV_TGT}','favpics',$template_sub_menu_spacer);
addbutton($sub_menu_buttons,'{SEARCH_LNK}','{SEARCH_TITLE}','{SEARCH_TGT}','search','');
$params = array('{BUTTONS}' => assemble_template_buttons($template_sub_menu_button,$sub_menu_buttons));
$template_sub_menu = template_eval($template_sub_menu,$params);
}
// HTML template for gallery admin menu
$template_gallery_admin_menu = <<<EOT
<div align="center">
<table cellpadding="0" cellspacing="1">
<tr>
<!-- BEGIN admin_approval -->
<td class="admin_menu" id="admin_menu_anim"><a href="editpics.php?mode=upload_approval" title="{UPL_APP_TITLE}">{UPL_APP_LNK}</a></td>
<!-- END admin_approval -->
<td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
<td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
<td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
<td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
<td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
<td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
<td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>
<!-- BEGIN log_ecards -->
<td class="admin_menu"><a href="db_ecard.php" title="{DB_ECARD_TITLE}">{DB_ECARD_LNK}</a></td>
<!-- END log_ecards -->
<td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
<td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
<td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
<td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
</tr>
</table>
</div>
EOT;
// HTML template for user admin menu
$template_user_admin_menu = <<<EOT
<div align="center">
<table cellpadding="0" cellspacing="1">
<tr>
<td class="admin_menu"><a href="albmgr.php" title="{ALBMGR_TITLE}">{ALBMGR_LNK}</a></td>
<td class="admin_menu"><a href="modifyalb.php" title="{MODIFYALB_TITLE}">{MODIFYALB_LNK}</a></td>
<td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
</tr>
</table>
</div>
EOT;
function theme_display_album_list(&$alb_list, $nbAlb, $cat, $page, $total_pages)
{
global $CONFIG, $STATS_IN_ALB_LIST, $statistics, $template_tab_display, $template_album_list, $lang_album_list;
$theme_alb_list_tab_tmpl = $template_tab_display;
$theme_alb_list_tab_tmpl['left_text'] = strtr($theme_alb_list_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_album_list['album_on_page']));
$theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$theme_alb_list_tab_tmpl['inactive_next_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$theme_alb_list_tab_tmpl['inactive_prev_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$tabs = create_tabs($nbAlb, $page, $total_pages, $theme_alb_list_tab_tmpl);
$album_cell = template_extract_block($template_album_list, 'album_cell');
$empty_cell = template_extract_block($template_album_list, 'empty_cell');
$tabs_row = template_extract_block($template_album_list, 'tabs');
$stat_row = template_extract_block($template_album_list, 'stat_row');
$spacer = template_extract_block($template_album_list, 'spacer');
$header = template_extract_block($template_album_list, 'header');
$footer = template_extract_block($template_album_list, 'footer');
$rows_separator = template_extract_block($template_album_list, 'row_separator');
$count = 0;
$columns = $CONFIG['album_list_cols'];
$column_width = ceil(100 / $columns);
$thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
starttable('100%');
if ($STATS_IN_ALB_LIST) {
$params = array('{STATISTICS}' => $statistics,
'{COLUMNS}' => $columns,
);
echo template_eval($stat_row, $params);
}
echo $header;
if (is_array($alb_list)) {
foreach($alb_list as $album) {
$count ++;
// MOD - remove date from album info
list($album['album_info'],$trash) = split(', ',$album['album_info'],2);
// MOD - end
$params = array('{COL_WIDTH}' => $column_width,
'{ALBUM_TITLE}' => $album['album_title'],
'{THUMB_CELL_WIDTH}' => $thumb_cell_width,
'{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
'{ALB_LINK_PIC}' => $album['thumb_pic'],
'{ADMIN_MENU}' => $album['album_adm_menu'],
'{ALB_DESC}' => $album['album_desc'],
'{ALB_INFOS}' => $album['album_info'],
);
echo template_eval($album_cell, $params);
if ($count % $columns == 0 && $count < count($alb_list)) {
echo $rows_separator;
}
}
}
$params = array('{COL_WIDTH}' => $column_width,
'{SPACER}' => $thumb_cell_width
);
$empty_cell = template_eval($empty_cell, $params);
while ($count++ % $columns != 0) {
echo $empty_cell;
}
echo $footer;
// Tab display
$params = array('{COLUMNS}' => $columns,
'{TABS}' => $tabs,
);
echo template_eval($tabs_row, $params);
endtable();
echo $spacer;
}
// Function to display first level Albums of a category
function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pages)
{
global $CONFIG, $STATS_IN_ALB_LIST, $statistics, $template_tab_display, $template_album_list_cat, $lang_album_list;
if (!$CONFIG['first_level']) {
return;
}
$theme_alb_list_tab_tmpl = $template_tab_display;
$theme_alb_list_tab_tmpl['left_text'] = strtr($theme_alb_list_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_album_list['album_on_page']));
$theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$tabs = create_tabs($nbAlb, $page, $total_pages, $theme_alb_list_tab_tmpl);
// echo $template_album_list_cat;
$template_album_list_cat1 = $template_album_list_cat;
$album_cell = template_extract_block($template_album_list_cat1, 'c_album_cell');
$empty_cell = template_extract_block($template_album_list_cat1, 'c_empty_cell');
$tabs_row = template_extract_block($template_album_list_cat1, 'c_tabs');
$stat_row = template_extract_block($template_album_list_cat1, 'c_stat_row');
$spacer = template_extract_block($template_album_list_cat1, 'c_spacer');
$header = template_extract_block($template_album_list_cat1, 'c_header');
$footer = template_extract_block($template_album_list_cat1, 'c_footer');
$rows_separator = template_extract_block($template_album_list_cat1, 'c_row_separator');
$count = 0;
$columns = $CONFIG['album_list_cols'];
$column_width = ceil(100 / $columns);
$thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
starttable('100%');
if ($STATS_IN_ALB_LIST) {
$params = array('{STATISTICS}' => $statistics,
'{COLUMNS}' => $columns,
);
echo template_eval($stat_row, $params);
}
echo $header;
if (is_array($alb_list)) {
foreach($alb_list as $album) {
$count ++;
// MOD - remove date from album info
list($album['album_info'],$trash) = split(', ',$album['album_info'],2);
// MOD - end
$params = array('{COL_WIDTH}' => $column_width,
'{ALBUM_TITLE}' => $album['album_title'],
'{THUMB_CELL_WIDTH}' => $thumb_cell_width,
'{ALB_LINK_TGT}' => "thumbnails.php?album={$album['aid']}",
'{ALB_LINK_PIC}' => $album['thumb_pic'],
'{ADMIN_MENU}' => $album['album_adm_menu'],
'{ALB_DESC}' => $album['album_desc'],
'{ALB_INFOS}' => $album['album_info'],
);
echo template_eval($album_cell, $params);
if ($count % $columns == 0 && $count < count($alb_list)) {
echo $rows_separator;
}
}
}
$params = array('{COL_WIDTH}' => $column_width,
'{SPACER}' => $thumb_cell_width
);
$empty_cell = template_eval($empty_cell, $params);
while ($count++ % $columns != 0) {
echo $empty_cell;
}
echo $footer;
// Tab display
$params = array('{COLUMNS}' => $columns,
'{TABS}' => $tabs,
);
echo template_eval($tabs_row, $params);
endtable();
echo $spacer;
}
?>