414 | $goto_page = ''; | 414 | $topic_pagination = generate_topic_pagination($forum_id, $topic_id, $replies); |
415 | if(($replies + 1) > $config['posts_per_page']) | | |
416 | { | | |
417 | $total_pages = ceil(($replies + 1) / $config['posts_per_page']); | | |
418 | $goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': '; | | |
419 | $times = 1; | | |
420 | for($j = 0; $j < $replies + 1; $j += $config['posts_per_page']) | | |
421 | { | | |
422 | $goto_page .= '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . "?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j") . '">' . $times . '</a>'; | | |
423 | if($times == 1 && $total_pages > 4) | | |
424 | { | | |
425 | $goto_page .= ' ... '; | | |
426 | $times = $total_pages - 3; | | |
427 | $j += ($total_pages - 4) * $config['posts_per_page']; | | |
428 | } | | |
429 | else if ($times < $total_pages) | | |
430 | { | | |
431 | //$goto_page .= ', '; | | |
432 | $goto_page .= ' '; | | |
433 | } | | |
434 | $times++; | | |
435 | } | | |
436 | $goto_page .= ' ] '; | | |
437 | } | | |
669 | 'TOPIC_FOLDER_IMG' => $folder_image, | 646 | 'TOPIC_FOLDER_IMG' => $folder_image, |
670 | 'TOPIC_AUTHOR' => $topic_author, | 647 | 'TOPIC_AUTHOR' => $topic_author, |
671 | 'TOPIC_DESCRIPTION' => $topic_desc, | 648 | 'TOPIC_DESCRIPTION' => $topic_desc, |