1163 | if(($replies + 1) > $config['posts_per_page']) | 1163 | $topic_pagination = generate_topic_pagination($forum_id, $topic_id, $replies); |
1164 | { | | |
1165 | $total_pages = ceil(($replies + 1) / $config['posts_per_page']); | | |
1166 | $goto_page_prefix = ' ['; | | |
1167 | $goto_page = ' <img src="' . $images['icon_gotopage'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" /> '; | | |
1168 | $times = 1; | | |
1169 | for($j = 0; $j < $replies + 1; $j += $config['posts_per_page']) | | |
1170 | { | | |
1171 | $goto_page .= '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&' . $topic_id_append . '&start=' . $j) . '" title="' . $lang['Goto_page'] . ' ' . $times . '"><b>' . $times . '</b></a>'; | | |
1172 | if(($times == 1) && ($total_pages > 4)) | | |
1173 | { | | |
1174 | $goto_page .= ' ... '; | | |
1175 | $times = $total_pages - 3; | | |
1176 | $j += ($total_pages - 4) * $config['posts_per_page']; | | |
1177 | } | | |
1178 | elseif ($times < $total_pages) | | |
1179 | { | | |
1180 | //$goto_page .= ', '; | | |
1181 | $goto_page .= ' '; | | |
1182 | } | | |
1183 | $times++; | | |
1184 | } | | |
1185 | $goto_page_suffix = ' ]'; | | |
1186 | $goto_page .= ' '; | | |
1187 | } | | |
1188 | else | | |
1189 | { | | |
1190 | $goto_page = ''; | | |
1191 | } | | |
1261 | 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), | 1233 | 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), |
1262 | 'TOPIC_RATING' => (!empty($rating2) ? $rating2 : ''), | 1234 | 'TOPIC_RATING' => (!empty($rating2) ? $rating2 : ''), |
1263 | 'CALENDAR_TITLE' => $calendar_title, | 1235 | 'CALENDAR_TITLE' => $calendar_title, |