root/ip/trunk/viewforum.php

150159
1160
		}
1160
		}
1161
		// Event Registration - END
1161
		// Event Registration - END
1162
1162
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'] . '" />&nbsp;';
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 . '&amp;' . $topic_id_append . '&amp;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
		}
1192
1164
1193
		if (($config['url_rw'] == '1') || (($config['url_rw_guests'] == '1') && ($userdata['user_id'] == ANONYMOUS)))
1165
		if (($config['url_rw'] == '1') || (($config['url_rw_guests'] == '1') && ($userdata['user_id'] == ANONYMOUS)))
1194
		{
1166
		{
...
...
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,
1264
			'GOTO_PAGE' => (($goto_page == '') ? '' : ('<span class="gotopage">' . $goto_page . '</span>')),
1236
			'GOTO_PAGE' => $topic_pagination['base'],
1265
			'GOTO_PAGE_FULL' => (($goto_page == '') ? '' : ('<span class="gotopage">' . $goto_page_prefix . ' ' . $lang['Goto_page'] . $goto_page . $goto_page_suffix . '</span>')),
1237
			'GOTO_PAGE_FULL' => $topic_pagination['full'],
1266
			'REPLIES' => $replies,
1238
			'REPLIES' => $replies,
1267
			'VIEWS' => $views,
1239
			'VIEWS' => $views,
1268
			'FIRST_POST_TIME' => $first_post_time,
1240
			'FIRST_POST_TIME' => $first_post_time,