2021-02-20, 02:53 AM
(This post was last modified: 2021-02-26, 02:33 AM by akimoe. Edited 6 times in total.)
My forum need to add thousands of word filters, mybb version is 1.8.24.
But mybb default word filtering is not paging, which will leads to very lengthy and slow loading.
![[Image: hd12dj.jpg]](https://camo.mybb.com/550ff40e27ed3afcb80a2eda2e83a5d76fab5fc7/68747470733a2f2f66696c65732e636174626f782e6d6f652f68643132646a2e6a7067)
Want pagenation like this
![[Image: eqtbi8.jpg]](https://camo.mybb.com/fb1db551f564fc1075e29f975c25f570518fa753/68747470733a2f2f66696c65732e636174626f782e6d6f652f6571746269382e6a7067)
In badwords.php
I may need to add limit and change this query
I am a php rookie, I don’t know how to make other changes, and add query parameters in template?
Hope to get help, thanks in advance!
But mybb default word filtering is not paging, which will leads to very lengthy and slow loading.
Want pagenation like this
In badwords.php
$query = $db->simple_select("badwords", "*", "", array("order_by" => "badword", "order_dir" => "asc"));
while($badword = $db->fetch_array($query))
{
$badword['badword'] = htmlspecialchars_uni($badword['badword']);
$badword['replacement'] = htmlspecialchars_uni($badword['replacement']);
if(!$badword['replacement'])
{
$badword['replacement'] = '*****';
}
$regex = $lang->no;
if($badword['regex'])
{
$regex = $lang->yes;
}
$table->construct_cell($badword['badword']);
$table->construct_cell($badword['replacement']);
$table->construct_cell($regex, array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-badwords&action=edit&bid={$badword['bid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-badwords&action=delete&bid={$badword['bid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_bad_word_deletion}');\">{$lang->delete}</a>", array("class" => "align_center"));
$table->construct_row();
}
I may need to add limit and change this query
$query = $db->simple_select("badwords", "*", "", array("order_by" => "badword", "order_dir" => "asc"));
I am a php rookie, I don’t know how to make other changes, and add query parameters in template?
Hope to get help, thanks in advance!

A rookie
