Just 2 files to change, yourtheme.php and include/functions.inc.php
in yourtheme.php, look for
$template_tab_display = array('left_text' => '<td width="100%%" align="left" valign="middle" class="tableh1_compact" style="white-space: nowrap"><b>{LEFT_TEXT}</b></td>' . "\n",
'tab_header' => '',
'tab_trailer' => '',
add after
'active_next_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%s</b></td>',
'inactive_next_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="{LINK}"<b>%s</b></a></td>',
'active_prev_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%s</b></td>',
'inactive_prev_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="{LINK}"<b>%s</b></a></td>',
find
$theme_alb_list_tab_tmpl['inactive_tab'] = strtr($theme_alb_list_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
add after
$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'));
find
if ($mode == 'thumb') {
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page']));
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
add after
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
find
} else {
$theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
$theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
add after
$theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
$theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
in functions.inc.php, find the function
function create_tabs($items, $curr_page, $total_pages, $template)
replace the WHOLE function with
function create_tabs($items, $curr_page, $total_pages, $template)
{
global $CONFIG;
if (function_exists('theme_create_tabs')) {
theme_create_tabs($items, $curr_page, $total_pages, $template);
return;
}
$maxTab = $CONFIG['max_tabs'];
$tabs = sprintf($template['left_text'], $items, $total_pages);
if (($total_pages == 1)) return $tabs;
$tabs .= $template['tab_header'];
if ($total_pages > $maxTab){
$start = max(2, $curr_page - floor(($maxTab -2)/2));
$start = min($start, $total_pages - $maxTab +2);
$end = $start + $maxTab -3;
} else {
$start = 2;
$end = $total_pages-1;
}
//display prev page tab
if ($curr_page != ($start-1)) {
$tabs .= sprintf($template['inactive_prev_tab'], $curr_page-1, "Prev");
} else {
$tabs .= sprintf($template['active_prev_tab'], "Prev");
}
if ($curr_page == 1) {
$tabs .= sprintf($template['active_tab'], 1);
} else {
$tabs .= sprintf($template['inactive_tab'], 1, 1);
}
for ($page = $start ; $page <= $end; $page++) {
if ($page == $curr_page) {
$tabs .= sprintf($template['active_tab'], $page);
} else {
$tabs .= sprintf($template['inactive_tab'], $page, $page);
}
}
if ($total_pages > 1){
if ($curr_page == $total_pages) {
$tabs .= sprintf($template['active_tab'], $total_pages);
} else {
$tabs .= sprintf($template['inactive_tab'], $total_pages, $total_pages);
}
}
//display next page tab
if ($curr_page != $total_pages) {
$tabs .= sprintf($template['inactive_next_tab'], $curr_page+1, "Next");
} else {
$tabs .= sprintf($template['active_next_tab'], "Next");
}
return $tabs.$template['tab_trailer'];
}
I am using the theme water_drop
a [Prev] and [Next] button tab will appear in all thumbnails page
apologise for the poor expressing of my hack
***********Updated a piece of forgotten code**********************