root/ip/trunk/tags.php
| 142 | 159 | ||
|---|---|---|---|
169 | $topic_id = $topic_link['topic_id']; | 169 | $topic_id = $topic_link['topic_id']; |
170 | $topic_id_append = $topic_link['topic_id_append']; | 170 | $topic_id_append = $topic_link['topic_id_append']; |
171 | 171 | ||
172 | if(($replies + 1) > $config['posts_per_page']) | 172 | $topic_pagination = generate_topic_pagination($forum_id, $topic_id, $replies); |
173 | { | ||
174 | $total_pages = ceil(($replies + 1) / $config['posts_per_page']); | ||
175 | $goto_page_prefix = ' ['; | ||
176 | $goto_page = ' <img src="' . $images['icon_gotopage'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" /> '; | ||
177 | $times = '1'; | ||
178 | for($j = 0; $j < $replies + 1; $j += $config['posts_per_page']) | ||
179 | { | ||
180 | $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>'; | ||
181 | if(($times == '1') && ($total_pages > '4')) | ||
182 | { | ||
183 | $goto_page .= ' ... '; | ||
184 | $times = $total_pages - 3; | ||
185 | $j += ($total_pages - 4) * $config['posts_per_page']; | ||
186 | } | ||
187 | elseif($times < $total_pages) | ||
188 | { | ||
189 | //$goto_page .= ', '; | ||
190 | $goto_page .= ' '; | ||
191 | } | ||
192 | $times++; | ||
193 | } | ||
194 | $goto_page_suffix = ' ]'; | ||
195 | $goto_page .= ' '; | ||
196 | } | ||
197 | else | ||
198 | { | ||
199 | $goto_page = ''; | ||
200 | } | ||
201 | 173 | ||
202 | $first_time = create_date_ip($lang['DATE_FORMAT_VF'], $topic['topic_time'], $config['board_timezone'], true); | 174 | $first_time = create_date_ip($lang['DATE_FORMAT_VF'], $topic['topic_time'], $config['board_timezone'], true); |
203 | $first_author = ($topic['first_poster_id'] != ANONYMOUS) ? colorize_username($topic['topic_first_poster_id'], $topic['topic_first_poster_name'], $topic['topic_first_poster_color'], 1) : (($topic['topic_first_poster_name'] != '') ? $topic['topic_first_poster_name'] : $lang['Guest']); | 175 | $first_author = ($topic['first_poster_id'] != ANONYMOUS) ? colorize_username($topic['topic_first_poster_id'], $topic['topic_first_poster_name'], $topic['topic_first_poster_color'], 1) : (($topic['topic_first_poster_name'] != '') ? $topic['topic_first_poster_name'] : $lang['Guest']); |
... | ... | ||
221 | 'CLASS_NEW' => $topic_link['class_new'], | 193 | 'CLASS_NEW' => $topic_link['class_new'], |
222 | 'NEWEST_POST_IMG' => $topic_link['newest_post_img'], | 194 | 'NEWEST_POST_IMG' => $topic_link['newest_post_img'], |
223 | 'L_NEWS' => $news_label, | 195 | 'L_NEWS' => $news_label, |
224 | 'GOTO_PAGE' => (($goto_page == '') ? '' : ('<span class="gotopage">' . $goto_page . '</span>')), | 196 | 'GOTO_PAGE' => $topic_pagination['base'], |
225 | 'GOTO_PAGE_FULL' => (($goto_page == '') ? '' : ('<span class="gotopage">' . $goto_page_prefix . ' ' . $lang['Goto_page'] . $goto_page . $goto_page_suffix . '</span>')), | 197 | 'GOTO_PAGE_FULL' => $topic_pagination['full'], |
226 | 'VIEWS' => $views, | 198 | 'VIEWS' => $views, |
227 | 199 | ||
228 | 'REPLIES' => $replies, | 200 | 'REPLIES' => $replies, |
Download diff