Razer2015 / BFACP

A web based admin tool for Battlefield 3, Battlefield 4, and Battlefield Hardline integrated with AdKats and XPKillers Stat Logger plugins for ProCon.

Home Page:https://myrcon.net/topic/452-battlefield-admin-control-panel-bfacp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running on PHP Version 7

This does not work with any version of the BFACP do not try to run this application on that version. Use the latest stable PHP 5.6.

WARNING

DO NOT USE THIS BRANCH! This is still a work in progress and bound to be bugs. If you still wish to run this version, scroll down to the bottom and follow the instructions. You must have access to the command line and have git/composer installed on your system.

Circle CI Download Battlefield Admin Control PanelLatest Stable Version Total Downloads Latest Unstable Version License

Overview

The Battlefield Admin Control Panel (BFACP) is a web based admin tool designed to work exclusively with AdKats (v6+) and XpKillers Chat, GUID, Stats and Mapstats Logger (v1.0.0.2). The software is built with the Laravel PHP framework to speed up development time and make my job a lot easier.

FAQ

Requirements

  • MySQL Database (5.6+) or MariaDB 5.5 Series or MariaDB 10.x Series
  • AdKats v6+
  • XpKillers Chat, GUID, Stats and Mapstats Logger v1.0.0.2+
  • PHP 5.5.9+
  • PHP Mcrypt
  • PHP PDO

Features

  • User, Role, and Permission system.
  • Live Scoreboard with chat.
  • Ban Management for AdKats.
  • Detailed player information with graph charts.
  • Server statistics page for each server showing population history, uptime history with data from UptimeRobot, and Mapstats.
  • Metabans support.
  • Report notifications.
  • Chatlog searching where you can search by multiple players and/or keywords and ability to only show from a certain date/time range.
  • Message of the Day
  • Quick DB Stats overview
  • and more!

Download Battlefield Admin Control Panel

Download the latest version. Once downloaded unzip it to a temporary folder on your computer. Next open the .env.example file located in the root folder in your favorite text editor. Scroll down to the database settings section and fill in your database connection information.

DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

Next we need to create a encryption key. This is IMPORTANT! The default key provided is just a placeholder string and is insecure. I have provided a page where you can get a random 32 character string. I do NOT save these and they are random on each refresh. You can access this page here. Now go back to the .env.example file and replace the SomeRandomString with the key that was generated. By default it will look like this.

APP_KEY=SomeRandomString

Pusher Configuration (Optional)

If you would like to have real-time online users & site chat, you will to create an account over at Pusher. Once you have your account and are logged in click on the "Your apps" tab on the left and click the button that says "Create new app". Now for the app name you can name it whatever you want, I just used my communities name. For the cluster selection choose the one that's the closest to your web server, if you know it, otherwise the default they provide is fine. After that click "Create my app" button.

You should now see your newly created app. Now click on the "App keys" tab. Copy the credentials to the approate field in the .env.example file.

PUSHER_APP_ID=null
PUSHER_KEY=null
PUSHER_SECRET=null

Image of Pusher App Creation

Once completed, save the file in the same location as .env.example and name it .env, then upload the entire application to your webserver. Once uploaded you will need to modify some file and folder permissions. Change the files and folders permissions under storage recursively to 0777. This includes the storage folder itself. Also do this for the builds folder located at public/js/builds

Note

This application was designed to run on a subdomain and not from a folder from the TLD. Make sure to create a subdomain and if possible have domain point to the public folder that's located under the root folder. Not a redirect.

Now load up application in your web browser and it will begin the process of creating the tables. This process will take a few seconds to run on first load. When it completed you should see the dashboard.

Default login

Username: admin

Password: password

You can change the default username and password by clicking on Site Management > Users > Admin

If you have any questions or need help setting this up please post it here.

Please create a ticket for bugs/requests. here.

Installing from the command line

This method is only for those who have shell access to their web server or VPS. This will download and extract the files to your current directory. Make sure it's an empty directory.

If you have git installed you can just run the following command to install it. You must have composer and php command line installed.

Composer Method (preferred)

composer create-project --prefer-dist --no-scripts --keep-vcs adkgamers/bfadmincp .

Git Method

git clone https://github.com/Prophet731/BFAdminCP.git .
composer install --no-scripts

This will clone and install the dependency's need for the BFACP to work. This will checkout the master branch which is the stable version. If you would like to run the develop version you will need to run git checkout develop before you issue the composer command.

To update it all you will need to do is run git pull and it will pull the latest version on the current branch (master or develop).

To make this an automated process you can create a cron job for it.

* * * * * cd /path/to/bfacp; git pull >/dev/null 2>&1

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com.

Installing Dev Version

I will assume you already have a webspace setup for this. If not just follow directions above to get the basics setup then come back here. All you should need to do is follow the commands and you should be up and running.

Make sure the directory is empty.

cd /path/to/bfacp
git clone https://github.com/Prophet731/BFAdminCP.git .
git checkout dev-laravel5
composer install --no-scripts
chmod -R 0777 storage
chmod -R 0777 public/js/builds
cp .env.example .env

After you ran those command edit the file .env with the necessary information then save the file. Next enter these commands.

php artisan migrate --force
php artisan db:seed --force

If you were running a previous version then you will need to run this command as well.

php artisan bfacp:reseed

You should be good to go now. Make sure that you update the subdomain to point to the public folder for its directory (not a redirect). If you wish to update to the latest version of this branch just do a git pull.

Docker guide

Installation

  1. Install docker and docker-compose ;

  2. Copy docker-compose.yml file to your project root path, and edit it according to your needs ;

  3. From your project directory, start up your application by running:

docker-compose up
  1. If you want, you can run composer or artisan through docker. For instance:
docker-compose exec php composer install --no-scripts
docker-compose exec php php artisan migrate
  1. Assign roles

If you are updating from a version that didn't have bfacp_user_role table. You'll now be greeted with the Undefined offset: 0 error after login. It's because the new roles table doesn't have any roles assigned for your user.

Go and edit the bfacp_user_role database manually and assign a role for yourself.

After you have done that, you can assign other user roles from the panel.

  1. Permissions
cd /path/to/bfacp
chmod -R 0777 storage
chmod -R 0777 public/js/builds
  1. Add permissions for chat
-- Insert missing permissions when updating from below 2.1 version
INSERT IGNORE INTO `bfacp_permissions` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
  (39, 'admin.site.pusher.users.view', 'Allowed to see online users', NOW(), NOW()),
  (40, 'admin.site.pusher.chat.view', 'Allowed to see site chat', NOW(), NOW()),
  (41, 'admin.site.pusher.chat.talk', 'Allowed to send messages on site chat', NOW(), NOW());

-- Link missing permissions to administrator when updating from below 2.1 version
INSERT INTO `bfacp_permission_role` (`permission_id`, `role_id`) 
SELECT 39, 1 FROM DUAL 
WHERE NOT EXISTS (SELECT * FROM `bfacp_permission_role` 
      WHERE `permission_id` = 39 AND `role_id` = 1 LIMIT 1);
      
INSERT INTO `bfacp_permission_role` (`permission_id`, `role_id`) 
SELECT 40, 1 FROM DUAL 
WHERE NOT EXISTS (SELECT * FROM `bfacp_permission_role` 
      WHERE `permission_id` = 40 AND `role_id` = 1 LIMIT 1);
      
INSERT INTO `bfacp_permission_role` (`permission_id`, `role_id`) 
SELECT 41, 1 FROM DUAL 
WHERE NOT EXISTS (SELECT * FROM `bfacp_permission_role` 
      WHERE `permission_id` = 41 AND `role_id` = 1 LIMIT 1);

-- Assign roles again (because roles table has changed)
INSERT IGNORE INTO bfacp_user_role (user_id, role_id)
SELECT user_id, role_id
FROM bfacp_assigned_roles

About

A web based admin tool for Battlefield 3, Battlefield 4, and Battlefield Hardline integrated with AdKats and XPKillers Stat Logger plugins for ProCon.

https://myrcon.net/topic/452-battlefield-admin-control-panel-bfacp/


Languages

Language:JavaScript 44.4%Language:HTML 33.6%Language:PHP 17.3%Language:Blade 4.6%Language:Shell 0.1%Language:SCSS 0.0%