--- \\Ninjapanda\webvcr\drupal-4.6.0\modules\forum.module Sun Jun 12 18:28:39 2005 +++ \\Ninjapanda\webvcr\modules\forum.module Sun Jun 12 18:48:35 2005 @@ -876,6 +876,7 @@ */ function theme_forum_topic_list($tid, $topics, $sortby, $forum_per_page) { global $forum_topic_list_header; + global $user; if ($topics) { @@ -889,6 +890,17 @@ ); } else { + $comments_per_page = $user->comments_per_page ? $user->comments_per_page : ($_SESSION['comment_comments_per_page'] ? $_SESSION['comment_comments_per_page'] : variable_get('comment_default_per_page', '50')); + if ($topic->num_comments > $comments_per_page) { + $pages_link = ' (Page '; + $num_pages = ceil($topic->num_comments/$comments_per_page); + for ($pagenum=0; $pagenum<$num_pages; $pagenum++) + $pages_link .= l($pagenum+1,"node/$topic->nid?from=".($pagenum*$comments_per_page)."&comments_per_page=$comments_per_page").','; + $pages_link = substr($pages_link,0,-1); + $pages_link .= ')'; + } else { + $pages_link=''; + } $rows[] = array( array('data' => _forum_icon($topic->new, $topic->num_comments, $topic->comment_mode, $topic->sticky), 'class' => 'icon'), array('data' => l($topic->title, "node/$topic->nid"), 'class' => 'topic'),