MyBB Community Forums

Full Version: Admin pagination option
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1.8.27 has brought in more pagination to the admin control panel. Is there a way to disable pagination or give an option for the number of items in a page ?

I know some wanted more pagination in admin control panel, but there are some parts where I would prefer not to have it.

Thank you.
The example of banned IP's and ranges comes to mind.  Before 1827 pagination, a simple CTRL+F would do the job. 

When I saw it on the list of proposed changes - didn't object.  Although whenever you paginate - like to see search tools.  We all use that info differently I guess.  In my case - just moved my queries to the database.  No biggie. Wink
I would rather not use the database, it would be best if we had an option to set the number of pages in admin control panel.

But if not there must be a way of changing the number per page from 20 to something else or better still remove the pagination from some admin pages, but I can't find it.
There's no options to customise the numbers per-page or especially to disable pagination, it's not something that's typically required... it would need code edits to the files to remove the pagination if you really don't want it.
(2021-07-09, 03:36 PM)Matt Wrote: [ -> ]There's no options to customise the numbers per-page or especially to disable pagination, it's not something that's typically required... it would need code edits to the files to remove the pagination if you really don't want it.

I'm guessing for banned IP's it would be here "module=config-banning" but which part to remove is where I'm not sure.

Once I know which part to remove I can probably find the rest and keep notes for future reference.

Thank you
In ./admin/modules/config/banning.php, line 278 has this:

$query = $db->simple_select("banfilters", "*", "type='{$type}'", array('limit_start' => $start, 'limit' => 20, "order_by" => "filter", "order_dir" => "asc"));

If you change the 20 to 99999, or just remove "'limit' => 20," completely, it should just show all of them.

If it still shows pagination, remove this a few lines down too:

echo "<br />".draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-banning&amp;type={$mybb->get_input('type')}&amp;page={page}");
(2021-07-09, 03:54 PM)Matt Wrote: [ -> ]In ./admin/modules/config/banning.php, line 278 has this:

$query = $db->simple_select("banfilters", "*", "type='{$type}'", array('limit_start' => $start, 'limit' => 20, "order_by" => "filter", "order_dir" => "asc"));

If you change the 20 to 99999, or just remove "'limit' => 20," completely, it should just show all of them.

If it still shows pagination, remove this a few lines down too:

echo "<br />".draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-banning&amp;type={$mybb->get_input('type')}&amp;page={page}");

Perfect Matt, thank you very much. I did both 99999 and removed the second part and now I can see IP's, Usernames and Emails in the banned list without pagination. Exactly what I wanted.  Smile
Thanks Matt - super. Smile