[Pushed] How to change word filters to pagination?
#1
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]


Want pagenation like this

[Image: eqtbi8.jpg]

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&amp;action=edit&amp;bid={$badword['bid']}\">{$lang->edit}</a>", array("class" => "align_center"));
		$table->construct_cell("<a href=\"index.php?module=config-badwords&amp;action=delete&amp;bid={$badword['bid']}&amp;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! Heart
A rookie Angel
Reply
#2
This should be in core.
Reply
#3
(2021-02-20, 05:22 AM)Omar G. Wrote: This should be in core.

Thanks for your reply. It would be better to be more detailed Heart
A rookie Angel
Reply
#4
Open a bug report for this.
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#5
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/4267

Thanks for contributing to MyBB!

Regards,
The MyBB Group
Reply
#6
(2021-02-23, 07:39 PM)Omar G. Wrote: Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/4267

Thanks for contributing to MyBB!

Regards,
The MyBB Group

Thank you for your work Heart Heart Heart
A rookie Angel
Reply
#7
(2021-02-24, 12:50 PM)akimoe Wrote:
(2021-02-23, 07:39 PM)Omar G. Wrote: Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/4267

Thanks for contributing to MyBB!

Regards,
The MyBB Group

Thank you for your work Heart Heart Heart

There has been a fix opened for this, https://github.com/mybb/mybb/pull/4268 . You can try to apply the changes if you like although we can't confirm if it works yet.
-Ben

Please do not PM me for support. I am looking to be hired for paid services.

You can view my paid services here.
Reply
#8
I can confirm it works, if you would like to help us review it simply replace the two files in your system:
https://github.com/mybb/mybb/pull/4268/files
Reply
#9
(2021-02-24, 08:30 PM)Omar G. Wrote: I can confirm it works, if you would like to help us review it simply replace the two files in your system:
https://github.com/mybb/mybb/pull/4268/files

It's works, Thank you!

(2021-02-24, 03:09 PM)Ben Wrote:
(2021-02-24, 12:50 PM)akimoe Wrote:
(2021-02-23, 07:39 PM)Omar G. Wrote: Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/4267

Thanks for contributing to MyBB!

Regards,
The MyBB Group

Thank you for your work Heart Heart Heart

There has been a fix opened for this, https://github.com/mybb/mybb/pull/4268 . You can try to apply the changes if you like although we can't confirm if it works yet.

It's worksThank you!

(2021-02-23, 06:43 PM)Eldenroot Wrote: Open a bug report for this.

thanks!  Heart
A rookie Angel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)