MyBB Community Forums

Full Version: No Permission Log
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi, the plugin is missing pagination for some reason. It simply doesn't display.
(2021-02-20, 07:07 AM)Omar G. Wrote: [ -> ]Hi, the plugin is missing pagination for some reason. It simply doesn't display.

That's odd.  It should Relavent line.
You are passing $pages (total pages) instead of $rows (total items). Also, you mix order_by and sort_by so sorting doesn't work either.
(2021-02-20, 08:31 PM)Omar G. Wrote: [ -> ]You are passing $pages (total pages) instead of $rows (total items). Also, you mix order_by and sort_by so sorting doesn't work either.

I'll update it when I have a chance.  I do find it odd though that the order of arguments for multipage which is used on the front facing board is different than the arguments for draw_admin_pagination.  Unfortunately I'm sure it would break any plugin that uses the Admin CP so fixing it would not be viable in 1.8 and would need to be in 1.9 since that will break a lot of stuff anyway.
I have updated the Github build to log IP addresses now. I also fixed pagination and the query that some database systems do not like.
The correct syntax for storing the IP is the following (tested):
	$mybb->binary_fields['nopermission'] = ['ipaddress' => true];

	$no_permission = array(
		/*...*/
		"ipaddress" => my_inet_pton(get_ip())
	);

Also, the nopermission_db_update() function isn't ran anytime, so updates are not working.
(2021-02-24, 05:46 AM)Omar G. Wrote: [ -> ]The correct syntax for storing the IP is the following (tested):
	$mybb->binary_fields['nopermission'] = ['ipaddress' => true];

	$no_permission = array(
		/*...*/
		"ipaddress" => my_inet_pton(get_ip())
	);

Also, the nopermission_db_update() function isn't ran anytime, so updates are not working.

I know it isn't run yet.  This way it is easier to remember any changes I do.  I just was putting it in as a placeholder for when I do make the script.  I was trying to do the code like log_admin_action and that's how I got to where I was at. I'll review your pull request.
I installed that version available on github got a bunch of database errors i fixed it with

ALTER TABLE table_name ADD COLUMN ipaddress VARBINARY(16) NOT NULL DEFAULT '';
I'm not sure how you got the error, but I am glad you got it fixed. I'll have to look into the error.
hello,

I saw on github issues here https://github.com/dragonexpert/nopermission/issues/3 "prune the log" do you mean something like this ?
Pages: 1 2 3