Giter VIP home page Giter VIP logo

bf4-server-stats's Introduction

BF4 Server Stats Webpage Overview

Download the most recent release and view the most recent release notes: https://github.com/tyger07/BF4-Server-Stats/releases/latest
View the pretty overview page: http://tyger07.github.io/BF4-Server-Stats/

Sample

(Example Images) Not affiliated with 'Banzore'

Features

  • Easy setup.
  • Individual server or combined server stats.
  • Country stats.
  • Map stats.
  • Player stats.
  • Weapon stats.
  • Dog tag stats.
  • Game server stats.
  • Live scoreboard.
  • Top players list / leaderboard.
  • Player name search.
  • Top players of the Week.
  • Suspicious players search.
  • Server chat log.
  • Stats signature images.
  • Gametracker-style server banners.
  • Battlelog theme.

Requirements

This web page code requires the use of a stats database which is created by XpKiller's Procon "Chat, GUID, Stats and Mapstats Logger" Plugin. If you need help setting up and using XpKiller's Stats Logger plugin, you must seek assistance in XpKiller's plugin thread: https://myrcon.net/topic/162-chat-guid-stats-and-mapstats-logger-1003/

For best compatibility with this web stats page, use the following settings in XpKiller's Procon Stats Logging plugin:

  • "Enable Statslogging?" : Yes
  • "Enable Weaponstats?" : Yes
  • "Enable Livescoreboard in DB?" : Yes
  • "tableSuffix" : None
  • "MapStats ON?" : Yes
  • "Session ON?" : Yes
  • "Save Sessiondata to DB?" : Yes
  • "Log playerdata only (no playerstats)?" : No

This webpage code requires that you have access to an Apache web server running a modern version of php and requires that you have read and write permission to add and modify files and directories on that web server.

Help and Support

For help with this web stats page code, visit the following forum thread: https://myrcon.net/topic/166-bf4-stats-webpage-for-xpkillers-stats-logger-plugin/ Or, submit a "New Issue" using GitHub: https://github.com/tyger07/BF4-Server-Stats/issues/new

Installation Steps

  1. Download the following file: https://github.com/tyger07/BF4-Server-Stats/zipball/master

  2. Extract the files. (maintain the original folder structure)

  3. Fill in the required parameters in ./config/config.php. For help with properly modifying the config.php file, see additional instructions further down in this readme file.

    Note: You may not include single quotation marks (') in the config.php fields without also using an appropriate php delimiter. For instance, you may not call your clan 'Ty_ger07's Clan' as it would cause a php compilation error due to the unequal and ambiguously placed single quotation marks.

    Using an appropriate php delimiter, when required, would cause it to work properly. For example:

    $clan_name = 'Ty_ger07\'s Clan';

  4. Upload the entire contents to your php-enabled web server and enjoy!

You must fill in the following information in config.php which is in the config folder.

  1. Input your stats database host, stats database user name, stats database password, and stats database name.

    For example:

    // DATABASE INFORMATION
    DEFINE('HOST', '100.200.300.400'); // database host address
    DEFINE('PORT', '3306');            // database port - default is 3306
    DEFINE('NAME', 'database');        // database name
    DEFINE('USER', 'user');		// database user name - sometimes the same as the database name
    DEFINE('PASS', 'pass');		// database password
    

    Note: Some web server providers use the same value for database name and database user name.

  2. Input your clan name as you would like it to appear in the stats pages.

    For example:

    $clan_name = 'MyClan'; // your gaming clan or organization name

  3. Input your desired banner image URL if you want one other than the default banner image to be displayed.

    $banner_image = './images/bf4-logo.png'; // your desired page banner

  4. Enter the URL which you would like users to redirect to when they click your banner image.

    $banner_url = 'http://tyger07.github.io/BF4-Server-Stats/'; // where clicking the banner will take you

Additional Information

A .sql file is included in the ./test-database/ folder for users to set up a dummy test database to test this web page when they otherwise have not yet set up a server or have not yet got XpKiller's Stats Logger plugin and database working.

Changelog

Refer to commmit history on GitHub: https://github.com/tyger07/BF4-Server-Stats/commits/master

Enjoy!

bf4-server-stats's People

Contributors

jonathanspw avatar pwk avatar tyger07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bf4-server-stats's Issues

Request: Listing Stats per Weapon

Expected Behavior:

Hello, is it possible to implement a Function to request the listing of Weaponstats, a Leadingboard for each listed Weapon?

Actual Behavior:

No option to get a List for special Weapon

Steps Performed to Reproduce this Behavior:

No Option given.

Es werden Keine Spieler Daten im BF4-Server-Stats angezeigt

Expected Behavior:

Hallo , Ich habe das Procon installiert , Spieler werden in der Datenbank gespeichert , aber sie werden nicht auf der HP angezeigt . Habe allei einstellungen gemacht .

Hier der Link http://dfc-funclan.de/bf4stats/index.php

Was könnte das sein ? oder können sie mir da weiter helfen

Hello, I installed the Procon, players are stored in the database, but they are not displayed on the HP. Alone I made attitudes.
Here is the link http://dfc-funclan.de/bf4stats/index.php
What could that be ? or can you help me further

Actual Behavior:

Steps Performed to Reproduce this Behavior:

Nginx support

Is it possible to have Nginx support for the signature generation? Can't seem to get it to work.

Problems with the unfair BAN

Good afternoon!
Some time ago, when connecting to your favorite server, "! [EGL] HARDCORE TDM CLASSICS ALL WEAPONS" received a message: Game is disabled: you have been excluded by the administrator. Reason specified: [BF4DB] Multihack. Appeal at https://bf4db.com/player/ban/10046681 [perm] [BF4DB].

I've never used cheats. I turned to the bf4DB.com administration and received a confirmation that I did not have a ban. I am attaching a screenshot of the correspondence with advice to contact the Administrator of your site. My son MBL2010 has a similar problem.

I am attaching a screen with my statistics and with the statistics of my son on bf4DB.com.

Please help resolve the issue and let me and my son to continue playing on your server.

Stats MBL2010
Dialog with the BF4DB
Stats Bred1982

Showing deleted server as if it is still there and online with conecred clients

Expected Behavior:

I was expecting I could set the server ID to 1 and it would continue using the stats from that server using the stats plugin.
Instead it created a new server ID wish I can not change.
I expected this to sync over or at the very least not show a server that is offline.

Actual Behavior:

Now it is showing an extra server and the original one is also still showing as if it is still online, player count and everything is still showing.

https://vps.deadfriendsgaming.com/bf4stats/

Steps Performed to Reproduce this Behavior:

delete one of your servers hosted and add it again with a new server port.

Clan Page

Hey, first i want to thank you for your creat work )

I have a question regarding the Stats Page:
I know the Procon Plugin does not provide Clan Tags, but i have inserted them manually in the database, Is it possible to Add a sortable Column in the Stats view Top Players for the Clan Tag?

XSS Attacks

This status page is vulnerable to xss attacks
few examples. they will only show up in firefox any other browser probably won't show if you're using chrome etc
1st
/stats/index.php?o=ASC_</script><script>prompt(993968)</script>&p=leaders&r=SoldierName&sid=15

2nd example
/stats/common/countries/countries.php?c=DE%2cRU%2cGB%2cFR%2cPL%2cSE%2cNL%2cTR%2cIT%2cES%2cFI%2cDK%2cAT%2cUA%2cBE%2cCZ%2cNO%2cCH%2cHU%2cIL'%22()%26%25<ScRiPt%20>prompt(902136)</ScRiPt>&gid=1&sid=15

index page code is cumbersome

The code should find all available servers in the database so users don't need to do this work. The user should be able to only need to enter database connection info and let the code find available servers.

spelling ( Titak Headshots: )

unbenannt
ok i am German and my English is horror but i think that is an spelling error ?
Titak Headshots: better is Total Headshots:

Phantom kill is not shown

I want to see phantom kill counts in player detail of leaderboard but I couldn't find it. So could you add data of phantom?

caching should be disabled for small server sizes

Caching data has little performance benefit for small servers. It has more of a negative impact because small servers have small stats where small changes in stats has a more noticeable affect on the overall stats.
Caching data should be disabled by default for servers with stats smaller than some size.

Search Chat by Time, Time Range, and by Player

As a server owner, using the chat log is extremely helpful to mediate issues between players, as well as check for abusive chat. Presently it's difficult to navigate through the chat pages, and we would love to see an ability to search chat by time, by using a time range, or by player name. That would make things worlds easier. Thanks :)

PHP Notice: Undefined index: weaponkills

I can not seem to get signatures to work. Server banners are ok, Player profiles are fine just no sig.
Stock fresh install running XAMP on windows.

[18-Apr-2016 18:17:59 Australia/Sydney] PHP Notice: Undefined index: weaponkills in E:\wwwdata\stats\common\signature\signature.php on line 126

pchart Images are Sometimes Broken

Expected Behavior:

Images which use the pchart API (map stats image, server info images, server banner image) appear correctly.

Actual Behavior:

With newer versions of PHP (how new? PHP 7 and up?), the official pchart doesn't work. Images return code 500 errors.

Proposed Solution:

Since pchart support has apparently ended, consider updating to and implementing an unofficial version of pchart designed to solve this issue. For example: https://github.com/bozhinov/pChart2.0-for-PHP7

Lots of CREATE TABLE IF NOT EXISTS queries

There are a lot of CREATE TABLE IF NOT EXISTS queries starting out various functionality. It would probably be faster to do a request to information_schema to see if the table exists first, and then create table if necessary.

database time versus web server time mismatch can cause issues

If the database time is different than the web server time, some issues may be noticed. Most noticeable is that if you search for a recent message time (or click on a recent message time link) in the chat log to view only messages which occurred near that time, if that time appears to the web server as occurring in the future (because the web server is in a later time zone where the time is currently earlier than the database's time zone), it will not give you the content you were expecting to see.
I should consider using mysql> SELECT NOW(); in order to get the time from the database and do filtering based on that time.

Possible SQL Injection

Is there any reason the soldierName couldn't be malicious and used for SQL injectikon?

Split Live stats and Top players

I would like to see the Top Players on a separate page instead of on the first page with the live stats to make the page shorter for mobile use and so on.

Live Scoreboard is broken on new Ubuntu 16.04 install

I just decided to install fresh everything on a new host running Ubuntu 16.04 and move my DB over and install this software while I'm about it (been running the stats logger, but not with the spiffy web interface). Live Scoreboard doesn't work. Seems mysql has changed a little and now rejects one of the SELECT requests in live-scoreboard.php .

Actual Behavior: Player data is missing on Live Scoreboard

Steps Performed to Reproduce this Behavior:

MYSQLD version 5.7.22-0ubuntu0.16.04.1

From a mysql command line connected to and using your DB...

This works: SELECT cp.Soldiername, cp.Score, cp.Kills, cp.Deaths, cp.TeamID, cp.SquadID, cp.CountryCode, sub.PlayerID FROM tbl_currentplayers cp LEFT JOIN ( SELECT tpd.PlayerID, tpd.SoldierName FROM tbl_playerdata tpd INNER JOIN tbl_server_player tsp ON tsp.PlayerID = tpd.PlayerID INNER JOIN tbl_playerstats tps ON tps.StatsID = tsp.StatsID WHERE tpd.GameID = 1 AND tsp.ServerID = 10) sub ON sub.SoldierName = cp.SoldierName WHERE cp.ServerID = 10 AND cp.TeamID = 1 GROUP BY cp.SoldierName, sub.PlayerID ORDER BY Score DESC;

This fails: SELECT cp.Soldiername, cp.Score, cp.Kills, cp.Deaths, cp.TeamID, cp.SquadID, cp.CountryCode, sub.PlayerID FROM tbl_currentplayers cp LEFT JOIN ( SELECT tpd.PlayerID, tpd.SoldierName FROM tbl_playerdata tpd INNER JOIN tbl_server_player tsp ON tsp.PlayerID = tpd.PlayerID INNER JOIN tbl_playerstats tps ON tps.StatsID = tsp.StatsID WHERE tpd.GameID = 1 AND tsp.ServerID = 10) sub ON sub.SoldierName = cp.SoldierName WHERE cp.ServerID = 10 AND cp.TeamID = 1 GROUP BY cp.SoldierName ORDER BY Score DESC;

The error is:

ERROR 1055 (42000): Expression #8 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sub.PlayerID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

It's upset that sub.PlayerID is not in the GROUP BY. I'm not positive my solution of just sticking it in there will fix it correctly, but it seems to.

I changed common/home/scoreboard-live.php to modify the select which begins: "SELECT cp.Soldiername, cp.Score, cp.Kills, cp.Deaths, cp.TeamID, cp.SquadID, cp.CountryCode, sub.PlayerID..." to put ", sub.'PlayerID'" on the GROUP BY clause and it works.

Rank

Rank image is missing for people with 110+ ranks on the stats image.

Leaderboard isnt pulling "Top Players"

Not sure whats up with my stats page but our leaderboard doesn't show top players, it does however show top 20 players this week. Is there a certain way i need to set the settings in procon to get this to work right?

Broken breadcrum link

broken index text above the breadcrumb image. only the tiny word "index" is clickable.

image

BF4 Stats is Down

The BF4Stats link at the bottom of the player stats page serves no purpose since BF4stats.com shut down.

Deprecated on Php8 - Actually Fixed in this post as well

Deprecated: Implicit conversion from float 3.6 to int loses precision in path/to/player.php on line 441
^^ change $Playminutes = floor(($Playtime / 60) % 60); to $Playminutes = floor($Playtime / 60);

Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in path/to/player.php on line 451
^^ change $KDR = round($PlayerData_r['KDR'],2); to $KDR = round(($PlayerData_r['KDR']*1),2);

Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in path/to/player.php on line 455
^^ change $WLR = round($PlayerData_r['WLR'],2) * 100; to $WLR = round(($PlayerData_r['WLR']*100),2);

Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in path/to/functions.php on line 2589
^^ change $content = str_replace(array(''', '"', '\', ''), '',htmlspecialchars(strip_tags($content))); to $content = str_replace(array('\'', '"', '\\', ''), '',htmlspecialchars(strip_tags((string) $content)));

Fatal error: Uncaught mysqli_sql_exception: Unknown column 'tps.Score' in 'order clause' in path/to/html-banner-content.php:339 Stack trace: #0 path/to/html-banner-content.php(339): mysqli_query() #1 {main} thrown in path/to/html-banner-content.php on line 339
^^ This one says line 339 but when I change ORDER BY tps.Score DESC, tpd.SoldierName ASC LIMIT 10 to
ORDER BY Score DESC, SoldierName ASC LIMIT 10 it no longer gives the Fatal error

This is for Php8 and above

Migration of forum topic

Hey, since we couldn't get a backup of the forums so that another person can hold the web admin torch, colon and I created a new forum. It's domain is https://myrcon.net/

We're going to slowly bring the topics back into that forum for each plugin, going to take time since it has to be done manually.

Since I didn't have another way of letting you know thought I pass it off here.

If you want to remake yours under your name you can, I can edit the post with whatever snapshot we had of it at the time.

Sent from my OnePlus5T using FastHub

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.