dem Activity Mod....
Das Problem erscheint immer dann wenn man auf die 'Hall of Fame'
möchte...
Warning: Division by zero in /.../phpbb2/includes/functions.php on line 670
Warning: Division by zero in /.../phpbb2/includes/functions.php on line 677
Warning: Division by zero in /.../phpbb2/amod_files/activity_hof.php on line 134
Funktions.php: Zeile 666 - 691
Code: Alles auswählen
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
{
global $lang;
$total_pages = ceil($num_items/$per_page);
if ( $total_pages == 1 )
{
return '';
}
$on_page = floor($start_item / $per_page) + 1;
$page_string = '';
if ( $total_pages > 10 )
{
$init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages;
for($i = 1; $i < $init_page_max + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
if ( $i < $init_page_max )
{
$page_string .= ", ";
}
}
Activity_Hof.php: Zeile: 123 - 140
Code: Alles auswählen
$i++;
if (!$game_id) break;
}
$q = "SELECT *
FROM ". INA_HOF ."
GROUP BY game_id";
$r = $db -> sql_query($q);
$hof_count = $db -> sql_numrows($r);
$pagination = generate_pagination("activity.$phpEx?page=hof&next", $hof_count, $board_config['games_per_page'], $start). ' ';
$page_number = sprintf($lang['Page_of'], ( floor($start / $board_config['games_per_page'] ) + 1 ), ceil($hof_count / $board_config['games_per_page'] ));
$template->assign_vars(array(
'PAGE_1' => $page_number,
'PAGE_2' => $pagination)
);