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.
@Kiesp
I've never used IIS, but it seems like IIS does not server .json files by default (the themes are stored in a .json file). See if this helps:
http:www.uipress.com/add-json-handler-support-in-iis-7/
@joa222
I have the same problem.. Found out it was due to my site being hosted on IIS with PHP. Havent found a solution to it :(
the theme isnt working for me, the sql works
@JustinM511
This may be because sessions aren't enabled or they're not working properly. Read here to find out if sessions are working.
@iwontshowmyname
I've been meaning to check for MySQLi on startup but I keep forgetting to add it. If it still does not work after installing MySQLi, let me know.
When I enter the password it does nothing, mysqli is enabled, php works, etc.
Thanks!
@iwontshowmyname
POSSIBLE FIX: Although I have php 5.4+, I was missing mysqli extension. Will post results...
Hello! I'm really grateful for you guys making this interface! Though I would really love to get it to work!!!
Web Interface is there, but no world is being loaded (they do exist in mysql), only: "Loading worlds from database...". The same usernames and passwords work for my other web plugin (BeardStat), which uses the same database... so everything SHOULD be correct! Gave 775, tried 777 permissions.. nothing! Looks like a simple mistake is somewhere. Any help appreaciated! Thanks!
@JoeFritz
I'm not an expert on file permissions, so I can't be of much help regarding your specific setup. If you can't get it to work with your host, you can try another web host or host it on your own computer.
I use 000webhost.com for the live demo, which works decently enough for a free web host. Alternatively, you can download something like XAMPP or EasyPHP and host it from your own computer (this would be my choice).
I keep getting the following error when I try and visit my site at:
http://mydomain.net/coreprotect/index.php
A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.
I Chmodded all directories, subdirectories and files to '777' but the problem still persists. Is there any way to fix this, or do you know what the problem is?
If you changed table-prefix in CoreProtect's config.yml, that would explain the error. I accidentally hard-coded the table prefix in a line of code.
I've fixed the bug and a new version should be out within 24 hours. In the meantime, if you want to fix this yourself, change main.php, line 38 to:
$result = query("SELECT id, world FROM {$config['tablePrefix']}world");
If this doesn't fix the error, the new version will explain the error message a little more clearly, so hopefully that will help too.
I'm getting this error message...
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/a8776216/public_html/lib/main.php on line 40
Possibly doing something wrong?
@MrSpazmic
Thanks. :)
Amazing interface, thank you :)
@Madminor
I use the free one - the TOS is probably talking about scripts that help you in those online browser games. I assume those scripts consistently retrieve large amounts of data, or they allow somebody to directly profit off those gaming scripts, so they are not allowed on the free accounts. You shouldn't have a problem hosting the CoreProtect interface on it.
@lexplay
Do you use the Paid version at www.000webhost.com or the free one? Because in their TOS (yes i bothered to read it for once :P ) it says " 7. We do not allow online gaming scripts such as ogame, mafia, etc.. (allowed if you upgrade account) "
@Madminor
I'm using www.000webhost.com for the demo. It's not great, but it does the job.
An alternative to getting a free web host is to set up a web server on your own computer. XAMPP makes it very easy - just download and install it, then drop the web interface files into XAMPP/htdocs and set up config.php. Point your browser to localhost to start.
hmm... just wondering, as this needs a PHP file host, what host do you reccommend lexplay, and is it free (i need a free one) thanks mad
@cookieman768
This won't work with Logblock. I don't plan on making it work with Logblock either, as I don't have time to run another project. You can try submitting a request to Logblock for someone to implement an interface like this.
Does this work with logblock? Could you make it work with logblock?
@a1mbot
I recreated the problem you are having. The solution was to add the following line to my.ini (MySQL's config file):
character_set_server=utf8
I also tried adding this to Apache's httpd.conf, which did not help:
AddDefaultCharset utf-8
And I tried adding this to PHP's php.ini, which also did not help:
default_charset = "UTF-8"
But they may have been part of the solution. If adding the line in my.ini doesn't work, then try the other two.
@Umcookies
I will add this to the main page in case other people are having the same problem.