All Topics Page

Carson

Seasoned Veteran
Joined
Apr 11, 2007
Messages
3,912
Reaction score
11
FP$
4,716
I was wondering if it is possible to make a page that lists all of a site's topics. I would really own like this page for my Moderators, but as long as the link is not findable, you don't have to worry about the permissions.

  • I would like it to look the same as if you were looking at a 'viewforum.php' page, just with all of the topics listed and no 'New Topic' button.
  • Show stickies and announcements properly.
  • I'll take it in any way as long as it works. So I really don't care whether it is an adjustment to the viewtopic.php file or an entirely new php file altogether.

If you have any comments or suggestions, please feel free to post them. 🙂
 
I just made one on my forum pretty easy:

1. Make copy of viewforum.php rename to anything else (mine is viewforumall.php, for example)

2. Open and find:
Code:
$sql_limit = $config['topics_per_page'];

Replace with:
Code:
$sql_limit = $topics_count;

3. Find:
Code:
'PAGINATION'
(first one) which looks like:
Code:
$template->assign_vars(array(
	'PAGINATION'	=> generate_pagination(append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&$u_sort_param"), $topics_count, $config['topics_per_page'], $start),
	'PAGE_NUMBER'	=> on_page($topics_count, $config['topics_per_page'], $start),
	'TOTAL_TOPICS'	=> ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
);

replace with:
Code:
$template->assign_vars(array(
	'TOTAL_TOPICS'	=> ($s_display_active) ? false : (($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count)))
);
 
Wait, do you want it to show all of the topics, i.e. EVERY single one? the code above shows all topics within a specific forum.

To show all the topics in all, just find any where statements in viewforumall.php and remove them, I can't test it as it would be VERY db intensive and may crash the server.
 
Showing all the topic on one page whether it is all topics for a forum or from the board as a whole is not a good idea on shared hosting especially with Lunarpages as they are a pain when it comes to SQL queries and cpu usage as their limits are so low and you can't even run a basic phpBB3 forum without going over the limit. This is a bad idea in my opinion.
 
Back
Top Bottom