Jump to content

Photo

[BF4] Stats webpage for XpKiller's Stats Logger Plugin

BF4

  • Please log in to reply
1663 replies to this topic

#1
tyger07

tyger07

    Newbie

  • Community Contributor
  • Pip
  • 4 posts

The full-featured stats webpage!


BF4 Stats Web Page Overview

Attached File  web_stats_index.jpg   64.83KB   3 downloads

Attached File  web_stats_demo.jpg   66.54KB   2 downloads

Attached File  web_stats_banner.jpg   69.2KB   3 downloads

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.

Demo

https://egc-la.evga....field/index.php

Prerequisites

This webpage code requires the use of a stats database which is created by XpKiller's BF4 Chat, GUID, Stats and Mapstats Logger Plugin version 1.0.0.2 or newer. If you need help with XpKiller's stats logging plugin, you must seek assistance in XpKiller's thread.

For best compatibility with this code, use the following settings in XpKiller's PRoCon logging plugin:

  • "Enable Statslogging_" : Yes
  • "Enable Weaponstats_" : Yes
  • "Enable Livescoreboard in DB_" : Yes
  • "tableSuffix" : None (empty)
  • "MapStats ON_" : Yes
  • "Session ON_" : Yes
  • "Save Sessiondata to DB_" : Yes
  • "Log playerdata only (no playerstats)_" : No

This webpage code also requires that you have access to a web server running a modern version of PHP and that you have permission to modify files on the web server.

Additional Info

GitHub:
http://tyger07.githu...F4-Server-Stats


Installation Steps:

Download the following file:
https://github.com/t.../zipball/master

Extract the files.

You may change the appearance of the page by modifying the stats.css file in the common folder.


Fill in the required parameters before using this code. You must place the necessary data between the following single quotation marks ('').

Note: You may not include single quotation marks (') in the following fields. For instance, you may not call your clan 'Ty_ger07's Clan' as it will create a PHP compilation error.
For example, this would not work:

// CLAN NAME
$clan_name = 'Ty_ger07's Clan'; // your gaming clan or organization name

You must use a PHP delimiter if you wish to use single quotes within the following fields.

For example, this would work:
 

// CLAN NAME
$clan_name = 'Ty_ger07's Clan'; // your gaming clan or organization name

You must fill in the following information in the config.php file found in the config folder


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

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

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 (such as GoDaddy) 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.
 

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

For example:

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

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

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

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

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

Enjoy!

(if you want to donate, ask me how)

Changelog:
Refer to: https://github.com/t.../commits/master



#2
TheClown

TheClown

    Newbie

  • Active Members
  • Pip
  • 6 posts

My Clan is using this (www.lawclan.co.za)

Its AWESOME!!.

Thanx Killer



#3
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

The full featured stats webpage!


BF4 Stats Web Page Overview

web_stats_index.jpg

web_stats_demo.jpg

web_stats_banner.jpg

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.

Demo

https://egc-la.evga....field/index.php

Prerequisites

This webpage code requires the use of a stats database which is created by XpKiller's BF4 Chat, GUID, Stats and Mapstats Logger Plugin* version 1.0.0.2 or newer. If you need help with XpKiller's stats logging plugin, you must seek assistance in XpKiller's thread.

For best compatibility with this code, use the following settings in XpKiller's PRoCon logging plugin:
"Enable Statslogging_" : Yes
"Enable Weaponstats_" : Yes
"Enable Livescoreboard in DB_" : Yes
"tableSuffix" : None (empty)
"MapStats ON_" : Yes
"Session ON_" : Yes
"Save Sessiondata to DB_" : Yes
"Log playerdata only (no playerstats)_" : No

This webpage code also requires that you have access to a web server running a modern version of PHP and that you have permission to modify files on the web server.

Additional Info

GitHub:
http://tyger07.githu...F4-Server-Stats


Installation Steps:

Download the following file:
https://github.com/t....zipball/master

Extract the files.

You may change the appearance of the page by modifying the stats.css file in the common folder.


Fill in the required parameters before using this code. You must place the necessary data between the the following single quotation marks ('').

Note: You may not include single quotation marks (') in the following fields. For instance, you may not call your clan 'Ty_ger07's Clan' as it will create a PHP compilation error.
For example, this would not work:

// CLAN NAME
$clan_name = 'Ty_ger07's Clan'; // your gaming clan or organization name

You must use a PHP delimiter if you wish to use single quotes within the following fields.
For example, this would work:

// CLAN NAME
$clan_name = 'Ty_ger07's Clan'; // your gaming clan or organization name

You must fill in the following information in the config.php file found in the config folder


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

Code:
// DATABASE INFORMATION
DEFINE('HOST', '');			// database host address
DEFINE('PORT', '3306');		// database port - default is 3306
DEFINE('NAME', '');			// database name
DEFINE('USER', '');			// database user name - sometimes the same as the database name
DEFINE('PASS', '');			// database password
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 (such as GoDaddy) 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.

Code:
// CLAN NAME
$clan_name		= ''; // your gaming clan or organization name
For example:

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

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

Code:
// PAGE BANNER
$banner_image	= './images/bf4-logo.png'; // your desired page banner
4) Enter the URL which you would like users to redirect to if they click your banner image.

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

(if you want to donate, ask me how)

Changelog:
Refer to: https://github.com/t....commits/master
* Restored post. It could be that the author is no longer active.

#4
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Some time I will add more statistics columns such as deaths, suicides, smoke launcher kills, etc., and make the top 25 players list able to be ordered by score or kills or deaths or suicides, etc.

I might even move away from the super simple fast design to a more complex and visually appealing style with more images instead of just a bunch of text.
* Restored post. It could be that the author is no longer active.

#5
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Kinsman*:

Thanks a bunch, have updated. :smile:

Also added a Join Server Button to the index.

http://jw.servegame....stats/index.php

Could you post how to get the Current Map for the index, I can't quite work it out, and I wanted to add that so we can do 4x columns and 2 rows neatly.
* Restored post. It could be that the author is no longer active.

#6
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Yep, yep, yep. Good idea! I will update soon. I want to play a little BF4 though first since it has been a couple weeks since I played.

Any other suggestions?
* Restored post. It could be that the author is no longer active.

#7
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Pvtjohntowle*:

How do I add this to my website with Enjin? I don't have access to files
* Restored post. It could be that the author is no longer active.

#8
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

How do I add this to my website with Enjin? I don't have access to files

You need access to files. I could host it on my web space, but you would still need enough access on your website to create a page link.
* Restored post. It could be that the author is no longer active.

#9
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

You could host your page here for instance:
http://open-web-comm....table=projects

(the purpose of my website is to host PHP files for free)
* Restored post. It could be that the author is no longer active.

#10
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Pvtjohntowle*:

You need access to files. I could host it on my web space, but you would still need enough access on your website to create a page link.

I can create links on my website OK

Can you help me with this ?

What do I need to give you?

That would be fantastic !!!

OK I have created an account there on that community website , now what do I need to do?

I am on TS bf4banditos.enjinvoice.com
* Restored post. It could be that the author is no longer active.

#11
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

I can create links on my website OK

Can you help me with this ?

What do I need to give you?

That would be fantastic !!!

OK I have created an account there on that community website , now what do I need to do?

I am on TS bf4banditos.enjinvoice.com

Since my website uses different formatting and syntax, the code is slightly different.

Here is the code:

http://open-web-comm....php&t=projects

You would just copy and paste that code into your own file which you create at this page:

http://open-web-comm....e=site-content

You would want to save the file without read permission so that users can't see your database connection info.

And of course you would have to modify the database connection info.
(this stuff):

// DATABASE INFORMATION
$db_host = ''; // database host
$db_port = ''; // database port. default is 3306
$db_name = ''; // database name
$db_uname = ''; // database user name
$db_pass = ''; // database password
...

Lastly, you would have to edit all the links in the code

From this (in bold):
&table=projects

To whatever name you call your file.
* Restored post. It could be that the author is no longer active.

#12
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Kinsman*:

new Index looks great. :biggrin:

http://jw.servegame....stats/index.php

Would it be possible to add an Totals Block to the Index, under the servers. As in total scores across all servers.

Our servers as setup in groups of 1 if that helps, as in Server1 is in ServerGroup1, Server 2 is in ServerGroup2 and so on.
* Restored post. It could be that the author is no longer active.

#13
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

I am not familiar with what XpKiller has done with server groups. Could you describe what a server group is and what I need to do in order to accommodate using server groups?
Also, could you confirm whether or not xpkiller removed table suffixes from the plugin options?
Lastly, can someone clear up the team names for me? When is the team china or russia or us? Do they all have different numbers, or are ghey always team 1 and team 2 but change name based on the map?

In Progress:
Teams in scoreboard in side by side orientation instead of stacked so that less vertical space is wasted.
More user statistics shown on top 25 scoreboard and ability to arrange top 25 scoreboard by various metrics instead of just by score.
Ability to see player rank in player page based on other metrics instead of just ranked by score.
Weapon columns in player page have more data including deaths.
Weapon stats will rank player with each weapon versus other players with same weapon.
Data shown in tables in general will be re-arranged with column name in table head instead of in each row of data.
Add filter to chat page to search for specific things.

...

These should be good changes.
* Restored post. It could be that the author is no longer active.

#14
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Does anyone know which teams are which?

Is US always 1, Russia always 2, and China always 3, or do the team names change depending on the current map and current game mode?
* Restored post. It could be that the author is no longer active.

#15
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Pvtjohntowle*:

I have just decided to use GameMe for Stats Tracking I finding SQL database configuration too involved and costs more But thanks anyway.

http://bf4banditos.gameme.com/
* Restored post. It could be that the author is no longer active.

#16
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Kinsman*:

On Having Overall Stats, I found this post by XP.

The stats are always separated. The servergroup is only relevant for calculating rankings over multiply servers.


* Restored post. It could be that the author is no longer active.

#17
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

On Having Overall Stats, I found this post by XP.

Has he gotten rid of the option to add table suffixes in the BF4 plugin? I assume that he did since he didn't like using them.
* Restored post. It could be that the author is no longer active.

#18
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Progress so far:

- Server join button at top of every page.
- Server scoreboard displays teams side by side to save vertical space.
- "Top Players" ranking can be ordered by name, score, kills, deaths, headshots, headshot ratio, kill death ratio and ascending or descending and pagination still functions scrolling through pages.

http://open-web-comm....tats/index.php
* Restored post. It could be that the author is no longer active.

#19
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by p19blo*:

Hello great to see a bf4 version of this.

is there a way to show these stats monthly ?

for example
last 3 months

sept
oct
nov (currrent)

and see who was best at each month ?

this is something i really could benefit from

someone did make a slight change to the code for it to work, but it bugged everything out and stats for players eneded up missing.
* Restored post. It could be that the author is no longer active.

#20
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Hello great to see a bf4 version of this.

is there a way to show these stats monthly ?

for example
last 3 months

sept
oct
nov (currrent)

and see who was best at each month ?

this is something i really could benefit from

someone did make a slight change to the code for it to work, but it bugged everything out and stats for players eneded up missing.

Because the stats do not have a time stamp associated with each data point, it is not possible to filter out the stats for a certain time period. You would have to ask XpKiller for that feature to be added to his plugin so that each stat has a timestamp associated with it for filtering purposes.

Without a timestamp, the only option is for you to go and delete your stats completely every month or however often you wish and start the stats over whenever you want them to start over.
* Restored post. It could be that the author is no longer active.

#21
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by p19blo*:

ok, thanks for the info. i will ask xp and see what he says, if he says.
* Restored post. It could be that the author is no longer active.

#22
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Kinsman*:

Is there a download for the new sorting method yet?

Heres a larger dataset for you, should have stats from all servers.

On having Over All Stats for all servers I found this. It would be awesome to have Overall Stats on the index page.

...*

Attached Files:

* Restored post. It could be that the author is no longer active.

#23
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Code in first post updated.

More stats than ever.
* Restored post. It could be that the author is no longer active.

#24
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Kinsman*:

Thanks for the update, I added $battelog to the server pages. Any news on Server Totals?
* Restored post. It could be that the author is no longer active.

#25
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Thanks for the update, I added $battelog to the server pages. Any news on Server Totals?

Yeah, server totals should be pretty easy. I wasn't really working on the index page now.
* Restored post. It could be that the author is no longer active.

#26
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Kinsman*:

Excellent, is the css ok now? I used all the files from your download.

http://jw.servegame....stats/index.php

Also I always change the battlelog link, so that I only have to put the server codes into the array.

Join the Server
* Restored post. It could be that the author is no longer active.

#27
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by GR101*:

A simple but extremely effective BF4 stats website, excellent work guys.

Suggestions for future add-ons:

1. Top 20 player stats per weapon type and vehicles (if applicable).
2. Top 20 player stats per kit (Assault, Engineer, Support, Recon)
3. Top 20 stats for commanders.
4. Display who are commanders and spectators on the server.

Thanks in advance.
* Restored post. It could be that the author is no longer active.

#28
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by Jamesonp*:

Thanks!
* Restored post. It could be that the author is no longer active.

#29
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

A simple but extremely effective BF4 stats website, excellent work guys.

Suggestions for future add-ons:

1. Top 20 player stats per weapon type and vehicles (if applicable).
2. Top 20 player stats per kit (Assault, Engineer, Support, Recon)
3. Top 20 stats for commanders.
4. Display who are commanders and spectators on the server.

Thanks in advance.

Top 20 per weapon is a good idea. I don't think it is possible to do top 20 per vehicle due to rcon limitations preventing vehicle stats from being accurate.
Top 20 stats per kit would be pretty cool and also possibly somewhat irrelevant due to so many "all kit" weapons. Top 20 stats per weapon class (assault rifle, shotgun, sniper rifle, etc.) might create more relevant data.
It doesn't appear that commander stats are stored in the database, so top 20 commanders doesn't look possible.
I am not sure if commanders are stored in the current player data. Maybe someone could confirm since I am borrowing a database which doesn't appear to have commanders in it, and don't have a database of my own.

Heres a larger dataset for you, should have stats from all servers.

Could you save a copy of the database while there are a significant number of players in at least one of your servers so that I don't have to create bogus current player data? I may find some additional useful information in the process. Thanks!
* Restored post. It could be that the author is no longer active.

#30
ImportBot

ImportBot

    Advanced Member

  • Friendly Neighborhood Bot
  • 52428 posts
Originally Posted by ty_ger07*:

Updated scoreboard primarily adding tickets and other minor changes.
* Restored post. It could be that the author is no longer active.



Also tagged with one or more of these keywords: BF4

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users