aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-03-12 19:24:23 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-03-12 19:24:23 +0000
commitb829bfa2a50744e0cee2b9ed4254792b3164143b (patch)
treeb78d8926fea4d77c5e3beacdfe8453b7167c1b69 /phpBB/viewforum.php
parentf276636450d36f4962f23a3b51613f64823e61c5 (diff)
downloadforums-b829bfa2a50744e0cee2b9ed4254792b3164143b.tar
forums-b829bfa2a50744e0cee2b9ed4254792b3164143b.tar.gz
forums-b829bfa2a50744e0cee2b9ed4254792b3164143b.tar.bz2
forums-b829bfa2a50744e0cee2b9ed4254792b3164143b.tar.xz
forums-b829bfa2a50744e0cee2b9ed4254792b3164143b.zip
Fixed some links, added 'Goto Page:' link in viewforum.
git-svn-id: file:///svn/phpbb/trunk@99 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php32
1 files changed, 31 insertions, 1 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index d091850794..0bd7c4cac7 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -103,16 +103,46 @@ if($total_topics)
$topic_title = stripslashes($topic_rowset[$x]["topic_title"]);
$topic_id = $topic_rowset[$x]["topic_id"];
$replies = $topic_rowset[$x]["topic_replies"];
+ if($replies > $posts_per_page)
+ {
+ $goto_page = "&nbsp;&nbsp;&nbsp;(<img src=\"images/posticon.gif\">$l_gotopage: ";
+ $times = 1;
+ for($i = 0; $i < ($replies + 1); $i += $posts_per_page)
+ {
+ if($times > 4)
+ {
+ if(($i + $posts_per_page) >= ($replies + 1))
+ {
+ $goto_page.=" ... <a href=\"viewtopic.$phpEx?".POST_TOPIC_URL."=".$topic_id."&start=$i\">$times</a>";
+ }
+ }
+ else
+ {
+ if($times != 1)
+ {
+ $goto_page.= ", ";
+ }
+ $goto_page.= "<a href=\"viewtopic.$phpEx?".POST_TOPIC_URL."=".$topic_id."&start=$i\">$times</a>";
+ }
+ $times++;
+ }
+ $goto_page.= ")";
+ }
+ else
+ {
+ $goto_page = "";
+ }
$topic_poster = stripslashes($topic_rowset[$x]["username"]);
$views = $topic_rowset[$x]["topic_views"];
$last_post_time = date($date_format, $topic_rowset[$x]["post_time"]);
$last_post_user = $topic_rowset[$x]["user2"];
$folder_img = "<img src=\"images/folder.gif\">";
$template->set_var(array("FORUM_ID" => $forum_id,
- "POST_TOPIC_URL" => POST_TOPIC_URL,
+ "POST_TOPIC_URL" => POST_TOPIC_URL,
"TOPIC_ID" => $topic_id,
"FOLDER" => $folder_img,
"TOPIC_POSTER" => "<a href=\"profile.$phpEx?mode=viewprofile?user_id=".$topic_rowset[$x]["user_id"]."\">".$topic_poster."</a>",
+ "GOTO_PAGE" => $goto_page,
"REPLIES" => $replies,
"TOPIC_TITLE" => $topic_title,
"VIEWS" => $views,