CoreProtect Web Interface
CoreProtect 2 Web Interface
March 25: Beta released for CoreProtect 2
- Finally updated! The update took such a long time because I have been busy with other projects.
- The interface has been rewritten, so remove all files from the previous version before installing.
About
Web interface for Intellii's CoreProtect plugin.
Search through your CoreProtect history with an easy-to-use interface.
Screenshot
Demo
See the interface in action: Live Demo
Password: guest
Features
- Supports MySQL.
- Search by actions: block place, block break, sign place (sign text), interact, chest use (includes block names and amount stored/taken), chat, command, login/logout.
- Search by player name, world, time, coordinates, block id/name and date.
- Sort and filter results.
- Generates /tp commands to paste into Minecraft (configurable).
- Automatically fetches the list of worlds on the server.
Requirements
The web interface requires:
- MySQL database - flat files are not supported.
- PHP-enabled web host.
- MySQLi for PHP. If you don't have this, you will not receive any results or get an error.
- Sessions enabled for PHP, or else the login function will not work. To check if you have sessions enabled, see here)
Download
Installation
- Extract contents to a web-accessible directory on your web server.
- Edit config-RENAME-ME.php (instructions are included in the file). Rename to config.php when you are done.
- Browse (with your web browser) to index.php to start searching.
Configuration - config-rename-me.php
First, rename config-rename-me.php to config.php.
Important settings to configure in config.php are:
- 'interfacePass' => 'admin',
This is the password to log into the web interface.
- 'host' => 'localhost',
- 'port' => 3306,
- 'user' => 'root',
- 'pass' => '',
- 'database' => 'minecraft',
- 'tablePrefix' => 'co_',
MySQL info - should be the same as in your CoreProtect's config.yml.
Configuration - themes.json
You can edit themes in themes.json. Simply change the hex codes to any color you want. Make sure you include the # before each hex code.
Configuration - /js/main.js
At the top of main.js, you can edit the command that pops up when you click on a result.
Configuration - blocks.txt
I will update the blocks list for each release, so you generally don't need to edit it.
If you have custom blocks, you can add them to blocks.txt. Follow the format of the other entries (id#,name), and make sure there are no empty lines or leading/trailing spaces.
Comments, Questions, Complaints
Post a comment or submit a ticket, I'll try to get back to you as soon as I can.
I would love to use this with my favorite rollback system!
The login page looks slick. That's all I can tell because I cant seem to get any further.
Using a faulty password returns an error so that is not the problem. When I enter the right password and click "log in", the login page just refreshes.
Please update this so we can use it with CoreProtect 2.0.0. Cause there are more logging methods, like I would like to be able to search "Chat" and "Commands" in the web interface. Also the MySQL table names has changed in CoreProtect 2.0.0 :D
For me, for now, I made changes to your display.php file line 34 to turn UTC into PST.
The time zone is wrong? Due to this all of my records are inaccurate. Any way to change that as the server has the correct time and timezone.
please readd the option to leave out mob or environment specific changes in the new version
when i try to see who placed block fire, i get 119 pages of '#fire' and nothing else...
This web interface is awesome. Very slick looking & took only seconds to setup. Thanks!
@krisdestruction
Yep, MySQLi not being installed has caught a myself and few users off guard. I've added it to the requirements list above, and I will implement a proper check in the next version.
Solved, installed MySQLi
You should make something to check if MySQLi is installed.
Hi, I tried to install this and I got the WebUI up. However once I log on, the query doesn't seem to work. Basically when I press search, nothing happens. No error message on the right, nothing.
Looking at the comments, it looks like I'm supposed to try this: 1. Try 'localhost', '127.0.0.1' and your server ip as the host name in config.php. 2. In mysqlconn.php, delete '@' on line 19. Save and run a search, see if there is an error message. 3. Uncomment line 71 in output.php. Save and run a search. Copy the query that is outputted and run the query in phpmyadmin.
I skipped 1 because I know the IP address of the MySQL connection and already have it connected to 5+ existing plugins. 2 and 3 I tried, but there's no messages poping up on the right where the entries are supposed to be. No error message, nothing.
nice work mate!
when serch by userID,everything works fine.but,when serch by coordinates,some/all of the records were missing,
i've checked coreprotectiong command in-game,it dose show record.
was that something to do with mysql?
@Zachary_DuBois
In config.php, set 'defaultWorld' => "0" and run a search, and you will see the world IDs for your extra worlds.
@lexplay
How do you find these "World IDs"
@Mercury92
Something like that could be possible in the future.
@Zachary_DuBois
If you have additional worlds from a plugin like Multiverse, you can uncomment (delete the two slashes) to allow searching for those extra worlds. So in the line:
'4' => "MultiVerse 1"
The '4' is the world ID, which is a number that CoreProtect assigns to each world, and "MultiVerse 1" is whatever name you want to call that world. This name will show up on the button and in the results.
Hooking into Core Protect plugin and doing rollback tasks would be even cooler.
@lunus72
Glad you got it sorted. You're not the first to run into this problem, so I'll test for mysqli in the future.
@broomy123
Probably not from me. However, I can answer any specific questions you have about setting it up.
@RadeonCraft
Good to hear that everything is working fine.
I love the userinterface. To sort by default descending by date I edit the file js/main.js (around line 145) and add this line
right before
Works beautifully, really glad this came out for CoreProtect, being able to watch over who's breaking/placing what is a charm.
Hi i cant get the web interface to work, any chance of a video tutorial?
@lexplay
Thank you very much.
"In mysqlconn.php, delete '@' on line 19. Save and run a search, see if there is an error message." was the key.
This way I could see that mysqli was not enabled on that webserver. After compiling PHP with mysqli support all is fine.