Jump to content

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


Recommended Posts

Originally Posted by MarcoV1980*:

 

Is there a easy way to reset all the stats as we want to start a fresh on the 1st Jan 2014.

Just empty the tables from mysqladmin or any other remote admin.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

Just empty the tables from mysqladmin or any other remote admin.

1) Stop your PRoCon layer server.

 

2) Empty or drop all tables using phpmyadmin or any other remote database connection program you are using.

 

drop_tables.jpg

 

 

If you drop tables, the tables will be gone and will be recreated by the plugin next time the plugin is started back up. If you empty the tables, the tables will still be there, but will have no data in them. It's up to you. Either way will work. I just think dropping the tables is more thorough.

 

 

NOTE: Due to foreign key constraints, you will not be able to drop all tables at once. It will try, but 3 tables will not drop. Just try again, and 1 table will drop. Then try a third time and the remaining tables should drop. Just keep dropping all tables as many times as necessary until all the tables are gone.

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

Originally Posted by mikedbom*:

 

ty_ger07,

 

is there any way to create a team page? like either a page that i can specify players or a filter based on tags? I like having the full server stats but would also like a page dedicated to just my community. great work btw.

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

Originally Posted by ty_ger07*:

 

ty_ger07,

 

is there any way to create a team page? like either a page that i can specify players or a filter based on tags? I like having the full server stats but would also like a page dedicated to just my community. great work btw.

Are these "tags" in their soldier name, or are they clan tags? Clan tags are not sent over rcon and therefore are unavailable.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

Y a t'il quelqu'un qui parle français et qui a créer ce genre de page? Et qui saurait m'aider pour en faire une? Merci d'avance.

I do not understand french.

 

Programming languages almost exclusively use english; PHP as well. So you will have to program it in english. It would be easier for you to just search through the code and translate the echoed words.

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

Originally Posted by mikedbom*:

 

they would be the clan tags. i've seen them appear in bfstats.com. if i cant filter by tags, maybe i can edit a page to pull data for specfic users that i can add manually? i could probably reverse engineer it but was just wondering if you had a solution in place. thread is very long to read each post.

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

Originally Posted by ty_ger07*:

 

they would be the clan tags. i've seen them appear in bfstats.com. if i cant filter by tags, maybe i can edit a page to pull data for specfic users that i can add manually? i could probably reverse engineer it but was just wondering if you had a solution in place. thread is very long to read each post.

The only way to get the clan tags is to query battlelog like bf4stats does (by permission I am sure). My code just gets the data from the database xpkiller's plugin provides via data from rcon, so no clan tags.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by mikedbom*:

 

The only way to get the clan tags is to query battlelog like bf4stats does (by permission I am sure). My code just gets the data from the database xpkiller's plugin provides via data from rcon, so no clan tags.

ok, thanks. i will see what i can do about creating my own page.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by Jamesonp*:

 

ok, thanks. i will see what i can do about creating my own page.

You could always just query the db with your clan members names and make a page that way..
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

yeah, just have to figure out how to do that

I think the hardest part is organizing your clan members. I can tell you how to grab a list of X players stats, but I can't tell you how to combat the urge players have to constantly change their soldier names and screw up the system.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by mikedbom*:

 

I think the hardest part is organizing your clan members. I can tell you how to grab a list of X players stats, but I can't tell you how to combat the urge players have to constantly change their soldier names and screw up the system.

I would appreciate a query...i think i would know how to do it but getting it into the page looks tough as you have a lot of conditionals in the code. I'm not worried about players changing names as they would understand their stats would reset as well. Unless you are capturing GUID and querying from that.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

If you are willing to do the work of finding their PlayerIDs, you will want to use their PlayerIDs in the query so that the information remains correct even if the player changes their name. You could search by SoldierName instead, but I would recommend using PlayerID since those will remain the same even if the player changes their name.

 

How do you find their PlayerIDs? Just do a search for their name in my stats page. Then look at their stats page.

 

For instance, if I search for "magsin", it brings me to his stats page:

http://open-web-community.com/bf4sta...&search=Search

 

Towards the bottom of that page, if you look at his signature, you will see that his signature image is "PID788FAV0.png". PID788 means that his PlayerID is 788.

 

Make a list of all the PlayerIDs you are after, then they can easily be added to a query.

 

I will give you an example page shortly after I make an example. :ohmy:

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

Originally Posted by ty_ger07*:

 

I would appreciate a query...i think i would know how to do it but getting it into the page looks tough as you have a lot of conditionals in the code. I'm not worried about players changing names as they would understand their stats would reset as well. Unless you are capturing GUID and querying from that.

Here's an example:

http://open-web-community.com/test/i...lclanmembers=1

 

In this example, it is looking for stats for PlayerID 1, 2, 3, or 4.

 

clanmembers.php has these queries:

 

Starting on Line 42 (server pagination query):

SELECT COUNT(tpd.`SoldierName`)

FROM `tbl_playerstats` tps

INNER JOIN `tbl_server_player` tsp ON tsp.`StatsID` = tps.`StatsID`

INNER JOIN `tbl_playerdata` tpd ON tsp.`PlayerID` = tpd.`PlayerID`

WHERE tsp.`ServerID` = {$ServerID}

AND tpd.`GameID` = {$GameID}

AND (tpd.`PlayerID` = 1 OR tpd.`PlayerID` = 2 OR tpd.`PlayerID` = 3 OR tpd.`PlayerID` = 4)

Starting on Line 57 (global pagination query):

SELECT SUM(tps.`Score`) AS Score

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` = {$GameID}

AND (tpd.`PlayerID` = 1 OR tpd.`PlayerID` = 2 OR tpd.`PlayerID` = 3 OR tpd.`PlayerID` = 4)

GROUP BY tpd.`PlayerID`

Starting on Line 148 (server stats query):

SELECT tpd.`SoldierName`, tpd.`PlayerID`, tps.`Score`, tps.`Kills`, tps.`Deaths`, (tps.`Kills`/tps.`Deaths`) AS KDR, tps.`Rounds`, tps.`Headshots`, (tps.`Headshots`/tps.`Kills`) AS HSR

FROM `tbl_playerstats` tps

INNER JOIN `tbl_server_player` tsp ON tsp.`StatsID` = tps.`StatsID`

INNER JOIN `tbl_playerdata` tpd ON tsp.`PlayerID` = tpd.`PlayerID`

WHERE tsp.`ServerID` = {$ServerID}

AND tpd.`GameID` = {$GameID}

AND (tpd.`PlayerID` = 1 OR tpd.`PlayerID` = 2 OR tpd.`PlayerID` = 3 OR tpd.`PlayerID` = 4)

ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}

LIMIT {$offset}, {$rowsperpage}

Starting on Line 164 (global stats query):

SELECT tpd.`SoldierName`, tpd.`PlayerID`, SUM(tps.`Score`) AS Score, SUM(tps.`Kills`) AS Kills, SUM(tps.`Deaths`) AS Deaths, (SUM(tps.`Kills`)/SUM(tps.`Deaths`)) AS KDR, SUM(tps.`Rounds`) AS Rounds, SUM(tps.`Headshots`) AS Headshots, (SUM(tps.`Headshots`)/SUM(tps.`Kills`)) AS HSR

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` = {$GameID}

AND (tpd.`PlayerID` = 1 OR tpd.`PlayerID` = 2 OR tpd.`PlayerID` = 3 OR tpd.`PlayerID` = 4)

GROUP BY tpd.`PlayerID`

ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}

LIMIT {$offset}, {$rowsperpage}

Note that in each of those queries are the lines

AND (tpd.`PlayerID` = 1 OR tpd.`PlayerID` = 2 OR tpd.`PlayerID` = 3 OR tpd.`PlayerID` = 4)

Change those PlayerIDs in all four queries to the PlayerIDs of interest and add as many PlayerIDs as you want separated by 'OR'.

 

 

You can download it here:

http://open-web-community.com/test/B...sTestStats.zip

 

Files changed:

index.php

common/index.php

 

Files added:

clanmembers.php

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

Originally Posted by mikedbom*:

 

ty_ger, you are awesome. thank you very much for doing this. i was digging through your code and i have to say it is very well laid out and well commented. I'm pretty good with HTML/CSS but PHP is a weak point of mine so it would have taken me days to figure it out if I could at all. I'm sure this will be a good feature to add for upcoming releases.

 

i'm also planning to add a link to BFStats.com so we can have the battlelog stats and our server stats in a central location. I'm sure you know you can create leaderboards there. It will be nice to see what everyone has done in the battlefield world as well as drive competition to play more on our own server and drive those stats up.

 

Again, thank you.

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

Originally Posted by Kinsman*:

 

Hehe, seems pretty standard to me, perhaps I missed something? Anyhow, thanks for the clan page, its great. :biggrin:

 

http://jw.servegame.org/bf4stats/ind...lclanmembers=1

 

Just a note, all references to "potw" need to become "clanmembers" on all the links.

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

Originally Posted by CptChaos*:

 

Fine, Fine, Fine...

 

I will....

 

But don't get mad at me if you see old cached versions of stats being displayed. It will be the user's job to view their player stats page from time to time to generate a more current version of their stats signature.

A fix is quite simple:

Create a (sub)folder, and place a script in it, but named as .png. Place an .htaccess file with it with following code:

Code:

AddType application/x-httpd-php .png
Now the .png file in the folder will be parsed as PHP. And yes, not what it should be, but hey, with proper headers you'd get a proper .png as well. :smile:
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by Kinsman*:

 

Yes, my original intent was just to use htaccess to name the link as a png file. I have to confess I don't fully understand why ezstats would create a single png file that is never updated, and I do not believe thats how it works.

 

http://www.junglewraiths.net/index.php_name=bf4stats

 

Everytime I check someones sigs, they are up to date.

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

Originally Posted by ty_ger07*:

 

Hehe, seems pretty standard to me, perhaps I missed something? Anyhow, thanks for the clan page, its great. :biggrin:

 

http://jw.servegame.org/bf4stats/ind...lclanmembers=1

 

Just a note, all references to "potw" need to become "clanmembers" on all the links.

Good point.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

A fix is quite simple:

Create a (sub)folder, and place a script in it, but named as .png. Place an .htaccess file with it with following code:

Code:

AddType application/x-httpd-php .png
Now the .png file in the folder will be parsed as PHP. And yes, not what it should be, but hey, with proper headers you'd get a proper .png as well. :smile:
Huh. That seems like sort of a hack, but if it works, that's interesting.

 

My code is caching images now anyway.

 

I have to confess I don't fully understand why ezstats would create a single png file that is never updated, and I do not believe thats how it works.

If it is up to date, then it must be getting updated by some method or another. Usually PHP code is only executed when a user looks at it and therefore you have to look at the player's stats page in my code to update the user's signature image. Perhaps ezstats makes a task to update all user's signatures every time any single page is looked at.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by TheBoomplayer*:

 

Hey

 

I have a Problem with my Website for this Plugin. I hope someone can help me. In the Config.php i set all correct settings, but when i go to my subdomain where i install this Plugins (http://zockerstube.silver-revenge.de/) it dont load the website.

 

Please help

 

Edit:

And when i set a fault IP the plugin is there with a error

 

Sorry my English is very bad...

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

Originally Posted by ty_ger07*:

 

Hey

 

I have a Problem with my Website for this Plugin. I hope someone can help me. In the Config.php i set all correct settings, but when i go to my subdomain where i install this Plugins (http://zockerstube.silver-revenge.de/) it dont load the website.

 

Please help

 

Edit:

And when i set a fault IP the plugin is there with a error

 

Sorry my English is very bad...

It is likely a DNS issue where you will need to wait.

 

Usually domain name and subdomain creations/changes take 4-6 hours to be available to route to your computer's browser. Since the code is internally referring to various subdirectories of that subdomain, it would manifest itself as a multifaceted issue (even if you manually use the correct ip address in your browser).

 

I think that it will work fine once the subdomain route is established by the DNS (domain name service host resolution). I think you will just have to wait a while and then try again.

 

Does it work fine in a sub-directory of http://silver-revenge.de/?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 1 reply
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Hi All,

      So seeing as Venice Unleased is released, I'm looking into if I should offer game hosting for it. I would like some feedback on this subject.

      VU - Experience Battlefield 3 like never before! (veniceunleashed.net)
      • 3 replies
    • So as the topic title says, should EZRCON offer general web hosting services?
      • 1 reply
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.