root/ip/trunk/search.php
| 145 | 159 | ||
|---|---|---|---|
1729 | } | 1729 | } |
1730 | // Event Registration - END | 1730 | // Event Registration - END |
1731 | 1731 | ||
1732 | if (($replies + 1) > $config['posts_per_page']) | 1732 | $topic_pagination = generate_topic_pagination($forum_id, $topic_id, $replies); |
1733 | { | ||
1734 | $total_pages = ceil(($replies + 1) / $config['posts_per_page']); | ||
1735 | $goto_page = ' [ <img src="' . $images['icon_gotopage'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" /> ' . $lang['Goto_page'] . ': '; | ||
1736 | 1733 | ||
1737 | $times = 1; | ||
1738 | for($j = 0; $j < $replies + 1; $j += $config['posts_per_page']) | ||
1739 | { | ||
1740 | $goto_page .= '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&' . $topic_id_append . '&start=' . $j) . '">' . $times . '</a>'; | ||
1741 | if (($times == 1) && ($total_pages > 4)) | ||
1742 | { | ||
1743 | $goto_page .= ' ... '; | ||
1744 | $times = $total_pages - 3; | ||
1745 | $j += ($total_pages - 4) * $config['posts_per_page']; | ||
1746 | } | ||
1747 | elseif ($times < $total_pages) | ||
1748 | { | ||
1749 | //$goto_page .= ', '; | ||
1750 | $goto_page .= ' '; | ||
1751 | } | ||
1752 | $times++; | ||
1753 | } | ||
1754 | $goto_page .= ' ] '; | ||
1755 | } | ||
1756 | else | ||
1757 | { | ||
1758 | $goto_page = ''; | ||
1759 | } | ||
1760 | |||
1761 | if ($searchset[$i]['user_id'] != ANONYMOUS) | 1734 | if ($searchset[$i]['user_id'] != ANONYMOUS) |
1762 | { | 1735 | { |
1763 | $topic_author = colorize_username($searchset[$i]['user_id'], $searchset[$i]['username'], $searchset[$i]['user_color'], $searchset[$i]['user_active']); | 1736 | $topic_author = colorize_username($searchset[$i]['user_id'], $searchset[$i]['username'], $searchset[$i]['user_color'], $searchset[$i]['user_active']); |
... | ... | ||
1846 | 'REG_USER_OWN_REG' => $reg_user_own_reg, | 1819 | 'REG_USER_OWN_REG' => $reg_user_own_reg, |
1847 | // Event Registration - END | 1820 | // Event Registration - END |
1848 | 1821 | ||
1849 | 'GOTO_PAGE' => $goto_page, | 1822 | 'GOTO_PAGE' => $topic_pagination['base'], |
1823 | 'GOTO_PAGE_FULL' => $topic_pagination['full'], | ||
1850 | 'REPLIES' => $replies, | 1824 | 'REPLIES' => $replies, |
1851 | 'VIEWS' => $views, | 1825 | 'VIEWS' => $views, |
1852 | 'FIRST_POST_TIME' => $first_post_time, | 1826 | 'FIRST_POST_TIME' => $first_post_time, |
Download diff