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
No Permission Log

Description

Creates a log entry every time a user is shown a no permission error page.  This log is viewable under the Admin CP under Tools & Maintenance.

Compatibility: 1.8
Latest Version: 1.0
Languages: English
Features
- Admin Permission which is default 'No' in case you want to restrict who has access to the log.
- Sort by username, time ( default ), or script.
- Pagination is supported in case you want to view longer history.
- Uses language variables
- Logs IP Address of User

Planned Updates
These are updates that are planned, but are not yet implemented.
- Ability to prune log
- Ability to download log as either json or csv.
- View all entries by a specific ipaddress


Installation

- Upload all files other than the license and read me files to the same directory on your forum.
- Install & Activate in the Admin CP.

Screenshot
[Image: unknown.png]

Download: https://community.mybb.com/mods.php?action=view&pid=1421
Github: https://github.com/dragonexpert/nopermission
Donations: https://www.paypal.me/MarkJanssen
+1, thank you, useful!
Seems like a useful feature to track errors.

Thanks for your contribution. Smile
Hello,

Nice plugin but i am seeing allot of entries in that log caused by guests to the file newreply.php guests cannot see the reply button so this is strange.You could add
$_SERVER['HTTP_USER_AGENT'];
$_SERVER['REMOTE_ADDR'];
i think that are spambots that have some kind of system to "create" a valid reply link they cannot post though
IP Logging is something I plan on for the next update. I might also look into making it so you can have it ignore certain file names. newreply.php and newthread.php are ones that come to mind.
It gives below error on localhost.
https://prnt.sc/xxidoy
(2021-01-31, 06:26 PM)Dr_The_One Wrote: [ -> ]It gives below error on localhost.
https://prnt.sc/xxidoy

As usual... The query uses a reserved keyword (rows)... Replace occurences of rows with a non reserved alias, as nbrows
What to do? Please guide.
(2021-02-03, 02:01 PM)Dr_The_One Wrote: [ -> ]What to do? Please guide.
(2021-02-01, 07:19 AM)Crazycat Wrote: [ -> ]Replace occurences of rows with a non reserved alias, as nbrows

Open file admin/modules/tools/nopermission.php and find:
$query = $db->simple_select("nopermission", "COUNT(id) as rows"); (line 25)
Replace with $query = $db->simple_select("nopermission", "COUNT(id) as nbrows");

Also change line 26:
$rows = $db->fetch_field($query, "rows"); become $rows = $db->fetch_field($query, "nbrows");
Next update I will address this. I didn't think it was an issue because it worked fine in my environment. I'll probably have it be a smaller update so I can push it out faster.
Pages: 1 2 3