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.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\APM_Setup\htdocs\core2\index.php:3) in C:\APM_Setup\htdocs\core2\index.php on line 5
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\APM_Setup\htdocs\core2\index.php:3) in C:\APM_Setup\htdocs\core2\index.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at C:\APM_Setup\htdocs\core2\index.php:3) in C:\APM_Setup\htdocs\core2\index.php on line 7
Does the why this error occurs?
http://ani.flfldk.wo.tc/core2/
Confirm password visible when you access the first page does not seem
@pchard
I don't think you can have both running at the same time.
Another question:
How can I have both mysql and the flatfile working at the same time?
@MattyQ
No problem, glad you got it working.
@lexplay
Thanks so much for all your help, lexplay. Using the updated error reporting I was able to figure out where in my PHP configuration there was disagreement. Everything is up and running now, it works beautifully. =)
Also, I haven't had any conflicts with the interface and the ingame commands either.
@pchard
I don't know of a conflict between this interface and ingame commands.
@MattyQ
Thanks for the detailed reply.
WID is indeed the world ID, however the examples you gave suggests the WID is not the cause of the problem (the WIDs are 1, which is normal).
Here are a couple more things you can try:
Array ( [0] => Array ( [action] => Stored [time] => 1351217419 [data] ...
SELECT * FROM co_blocks WHERE (user NOT LIKE '#%') AND (time BETWEEN 1349154000 AND 1351728780) AND (action IN (0,1,2)) AND (wid = 1) LIMIT 0 , 5000
Let me know how this goes.
@lexplay
I noticed in the scripting that there should be an error message, but none have cropped up yet, so I assume it's connecting to the database. It does lag a touch depending on how in-depth I make the search, so it appears to be querying the database, at least.
I'm wondering if it's an issue with world-ids. I was using Multiworld (not -verse) for a short while. Is there a way to check and see what the world id is in the database? Is it the column marked WID? [<< In retrospect, I realize this is probably a question for the CoreProtect people.]
Unfortunately neither of those suggestions seemed to have any effect. The database has well under 5000 entries total, so it shouldn't be maxing out. I fooled with the time a bit. I'll see if I can track down any error logs via mysql and let you know how it goes.
Here's a few examples from the co_blocks table:
8 -21 12 1351618548 Testy -325.72.207 3 0 0 0 1
9 -20 14 1351618592 Testy -307.71.226 3 0 1 0 1
10 -20 14 1351618602 Testy -308.80.239 17 2 0 0 1
Addendum to the addenda:
I see in the script for results.php that it's supposed to return a "No results found" if it can't find anything. I don't get any kind of changes in GUI after hitting the search button. I didn't do anything but edit config.php, but maybe parseinput isn't working or something? =(
Hey. I got a question.
Is it possible to have the interface AND the /co i command working at the same time?
If so, how?
@MattyQ
If your searches aren't coming up with anything at all, it may be some a database connection issue. It should come up with an error message when you click search.
If your searches only come up with some entries, but not others, then:
If none of this helps, let me know about your missing entries as detailed as possible so I can try to recreate the problem.
Hey, I'm really excited to get this up and running. I'm hitting an issue where the table of grief doesn't seem to be populating on the website. The PHP interface is functional (I can access it remotely and from the localhost), the database info is correct, the mysql database has info populating it. Have you run into any issues where the search doesn't produce any results?
@chiorigreene
Thanks for the suggestion. I'll clarify the error message in the next release. There may be a way to automatically generate a list of block names on a server, or maybe not. I'll look into it.
@Demonlover11
You won't be able to use this with Logblock without some major modifications to the code.
@Reddy360
No problem. A lot of people have requested this feature (including myself), but no one else stepped up to code it.
Thanks for this nice feature I did submit a ticket about adding this about a week ago and I don't know if it was me but anyway great on adding this
Wouldn't I be able to configure this to be used with Logblock?
Very Awesome Web Interface. This is going to make my job of Admin so much easier. I installed it and got it working within minutes.
Just a few small notes. My server is Tekkit but you don't have any of the Tekkit BlockIDs in your blocks.txt file. (I know CoreProtect is not fully Tekkit compatible but as long as I forbid Equivalent Exchange then CoreProtect works pretty good.) Could you either add theses or add some other way to populate the IDs from the server (maybe some type of script) not just for Tekkit but other modded servers. Just an idea.
To continue, I tried adding the IDs manually but now because of what editor I used there is white-space stuck at the end of my file and now I'm getting an error about that empty line. So to fix the problem I changed line 16 and 17 of file blockdata.php to:
Now empty lines are ignored and the user is given a more intelligent error. Take this all into consideration for your next release.
@LiLChris06
That's odd. I've uploaded the demo to another web host, see if this works:
lexplay.p4o.net
@lexplay
I tried latest Chrome, IE9, Firefox 17 beta...none of which load it.
It's not responding at all.
Are you hosting this locally if so then you probably cant access from an outside source.
@LiLChris06
In what way is it not working?
The only incompatibility I know using versions of IE below 9 (it doesn't support some CSS that is used). I just tested it on Firefox and Chrome, and both have worked fine (logged in with password "guest", clicked "Block Place", clicked "Search".
Look interesting, the live demo isn't working though.