Jump to content

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


tyger07

Recommended Posts

Originally Posted by Kinsman*:

 

Ah well, worth a try then, just because those forums are popular, does not make them secure, so no it does not work on ours.

 

Ezstats is just reading from our database what was stored there from BF4stats, so I thought it would be possible to read our own stats and generate png files was all.

* Restored post. It could be that the author is no longer active.
Link to post
  • Replies 1.7k
  • Created
  • Last Reply

Originally Posted by ty_ger07*:

 

Ah well, worth a try then, just because those forums are popular, does not make them secure, so no it does not work on ours.

It does not work on yours? Your answer was kind of confusing.

 

Ezstats is just reading from our database what was stored there from BF4stats, so I thought it would be possible to read our own stats and generate png files was all.

It is generating an image the same way as my code generates an image, but then it is saving the image to your server and giving you a link to it. The thing I don't like is every time you view a 'generate signature' link, an image is generated and saved to your server and it will just keep creating more and more images even if they aren't actually used by anyone.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

Code in first post updated!

 

Changes:

- Added stats signature generator

- Added pagination to player of the week pages

- Added player stats signatures to player stats pages

- Added weapon images to player stats pages

 

Example:

http://open-web-community.com/bf4sta...ID=20&search=1

 

http://open-web-community.com/bf4stats/player-stats/signature/signature.php_PlayerID=20&GameID=1&FAV=0

http://open-web-community.com/bf4stats/player-stats/signature/signature.php_PlayerID=20&GameID=1&FAV=1

 

The stats images option is soldier rank or favorite weapon.

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

Originally Posted by Kinsman*:

 

Oops!

 

I suppose the clan name should be in the signature also.

 

EDIT: Fixed

Looks great but we cannot use php images on our site. Perhaps you could weave some magic and just rename the output to png?

 

heres how ezstats seems to be doing just that.

 

/* Variables */

$filename = $this->id."_".$type.".png";

$filename = $filename;

 

/* Create the picture */

imagepng($this->image, $path.'signatures/'.$filename);

imagedestroy($this->image);

That would remove any compatability issues for all sites. :biggrin:

 

Attached Files:

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

Originally Posted by ty_ger07*:

 

Looks great but we cannot use php images on our site. Perhaps you could weave some magic and just rename the output to png?

 

heres how ezstats seems to be doing just that.

 

 

 

That would remove any compatability issues for all sites. :biggrin:

My code already creates the image in the same way. The only difference is ezstats stores the image on the server instead of ouputting the image directly to the client.

As already explained, it would create potentially thousands or hundreds of thousands of unused images.

 

Have you checked to see if there is a way to allow your forum to use this in its bbcode?

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

Originally Posted by Kinsman*:

 

I believe ezstats uses a htaccess file to time out the ones not being used. But I didnt mean create 100's of images, i meant just rename the image you have created to .png.

 

Sure I can modify our bbcode img tag, i have no idea to what, as I cannot just download vbulletin to compare. The point is if they were png they are then universally acceptable on any site, not just a lucky few.

 

If its not feasible to simply rename your image to end in .png then I will try to download a board that works and have a look at their bbcode i guess.

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

Originally Posted by ty_ger07*:

 

I believe ezstats uses a htaccess file to time out the ones not being used. But I didnt mean create 100's of images, i meant just rename the image you have created to .png.

My images ARE PNG files already (as I have already said). Right-click one and save it. You'll see that it is a PNG file.

 

Sure I can modify our bbcode img tag, i have no idea to what, as I cannot just download vbulletin to compare. The point is if they were png they are then universally acceptable on any site, not just a lucky few.

 

If its not feasible to simply rename your image to end in .png then I will try to download a board that works and have a look at their bbcode i guess.

I don't think you understand.

 

The problem you are having is that your forum apparently is not trusting the PHP file which is creating the PNG image and is assuming that a PHP file couldn't possibly output as a PNG image.

 

There is no way that the htaccess file could automatically delete unused images. There is no way for it to know which images are used or not used and no way of guessing when one which hasn't been used for a while will be used again.

 

 

Let me summarize:

 

What my code does:

 

PHP file creates PNG image every time a user's signature is viewed -> PNG image is sent directly to user's computer

 

What EZstats does:

 

PHP file creates PNG image every time a signature preview is generated -> PNG image is saved to server in a folder -> PNG image may be used later in someone's signature or may sit unused forever.

 

I certainly could cache the PNG image to the server to rectify your problem, I just am concerned over the implications of saving two PNG images to the server every time a new user's player stats page is viewed. If you have a robot searching through your stats page, it might view 100 player stats pages in a short period of time which means your server would have to absorb the load of generating and saving 200 images to a folder in a short period of time.

 

Another issue is keeping the image up to date. If the image is cached to the web server, a user's signature is a PNG image and there is nothing which will trigger it to be recreated. If you reference the PHP file directly as I do, you are sure to generate a new up-to-date version every time it is called. But if you use a cached image, there is no feedback back to the server to tell it to update an outdated cached image.

 

It certainly would be possible, I am just concerned about the extra storage space used and the issue of keeping old server cached images up to date somehow.

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

Originally Posted by ty_ger07*:

 

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.

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

Originally Posted by ty_ger07*:

 

Code in first post has been updated!

 

Changes:

- Changed stats signature output to cached PNG file on server for compatibility reasons.

- Fixed error which caused signature image displayed to link to the wrong website.

 

Example:

 

http://open-web-community.com/bf4stats/player-stats/signature/signature.php_PlayerID=1869&GameID=1&FAV=0

 

http://open-web-community.com/bf4sta...ID1869FAV1.png

 

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

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

Originally Posted by ty_ger07*:

 

Cool!, have I done something wrong? maybe my webserver config perhaps?

 

http://jw.servegame.org/stuff/signat...ID1660FAV0.png

I don't know. I don't know what you have done.

 

I would suggest that you delete all files and all sub-directories in the stuff folder and then start over from scratch.

 

Edit: Looks like you got it working.

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

Originally Posted by Jaffaman*:

 

I know this might be asking a lot is there a way to to do a list of top 10's?

Example top 10 players,KDR,Deaths,Headshots, Top10 Player for the specific Weapon and top 10 dog tags.

 

I am not a coder so i do not know how hard this might be thanks in advance Jaffaman.

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

Originally Posted by ty_ger07*:

 

I know this might be asking a lot is there a way to to do a list of top 10's?

Example top 10 players,KDR,Deaths,Headshots, Top10 Player for the specific Weapon and top 10 dog tags.

 

I am not a coder so i do not know how hard this might be thanks in advance Jaffaman.

There already is a list of top players. It is on the home page.

 

It shows the top players in pages of 25 at a time, but just look at the first 10 if you don't care about 11 through 5000. If you click on the column heading, you can organize it by top score (default), top rounds played, top kills, top deaths, top KDR, top Headshots, top Headshot Ratio, or player name in alphabetic order.

 

For example:

 

Top score:

http://open-web-community.com/bf4sta...ore&order=DESC

 

Top rounds played:

http://open-web-community.com/bf4sta...nds&order=DESC

 

Top Kills:

http://open-web-community.com/bf4sta...lls&order=DESC

 

Top Deaths:

http://open-web-community.com/bf4sta...ths&order=DESC

 

Top Kill/Death Ratio:

http://open-web-community.com/bf4sta...KDR&order=DESC

 

Top Headshots:

http://open-web-community.com/bf4sta...ots&order=DESC

 

Top Headshot Ratio:

http://open-web-community.com/bf4sta...HSR&order=DESC

 

Players in alphabetic order:

http://open-web-community.com/bf4sta...Name&order=ASC

 

So only thing missing there from what you requested are dogtags and weapons. I had weapon ranks on the player stats page, but removed them because weapon ranking really slows everything down when you are checking every weapon in a huge database with a lot of players. I think you would have to have a different page for each weapon to make it not incredibly slow in a huge database. But how could you afford the space of fitting a link to top 10 players for every weapon in the page menu? There are many weapons and many links would be necessary. It's a design/navigation problem more than a coding problem. The code itself is rather simple. Dogtags once again is a design/navigation problem. Where is a good place to put that information? Should number of dogtags be in the top players table?

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

Originally Posted by Kinsman*:

 

I don't know. I don't know what you have done.

 

I would suggest that you delete all files and all sub-directories in the stuff folder and then start over from scratch.

 

Edit: Looks like you got it working.

Yes, I deleted the htaccess file and all good now. I will set up a bat file and schedule it to mt the directory every few days, should take care of the caching problem.

 

Thanks for the excellent update, and Merry Christmas. :biggrin:

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

Originally Posted by ty_ger07*:

 

Yes, I deleted the htaccess file and all good now. I will set up a bat file and schedule it to mt the directory every few days, should take care of the caching problem.

 

Thanks for the excellent update, and Merry Christmas. :biggrin:

You won't want to delete the images, otherwise everyone's signatures will quit working every time you delete their images. Once their signature quits working, they will have to go to their player stats page to regenerate the image.

 

Like I said, their is no way for you to know which images aren't being used anywhere and which images are being used somewhere.

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

Originally Posted by Jaffaman*:

 

There already is a list of top players. It is on the home page.

 

It shows the top players in pages of 25 at a time, but just look at the first 10 if you don't care about 11 through 5000. If you click on the column heading, you can organize it by top score (default), top rounds played, top kills, top deaths, top KDR, top Headshots, top Headshot Ratio, or player name in alphabetic order.

 

For example:

 

Top score:

http://open-web-community.com/bf4sta...ore&order=DESC

 

Top rounds played:

http://open-web-community.com/bf4sta...nds&order=DESC

 

Top Kills:

http://open-web-community.com/bf4sta...lls&order=DESC

 

Top Deaths:

http://open-web-community.com/bf4sta...ths&order=DESC

 

Top Kill/Death Ratio:

http://open-web-community.com/bf4sta...KDR&order=DESC

 

Top Headshots:

http://open-web-community.com/bf4sta...ots&order=DESC

 

Top Headshot Ratio:

http://open-web-community.com/bf4sta...HSR&order=DESC

 

Players in alphabetic order:

http://open-web-community.com/bf4sta...Name&order=ASC

 

So only thing missing there from what you requested are dogtags and weapons. I had weapon ranks on the player stats page, but removed them because weapon ranking really slows everything down when you are checking every weapon in a huge database with a lot of players. I think you would have to have a different page for each weapon to make it not incredibly slow in a huge database. But how could you afford the space of fitting a link to top 10 players for every weapon in the page menu? There are many weapons and many links would be necessary. It's a design/navigation problem more than a coding problem. The code itself is rather simple. Dogtags once again is a design/navigation problem. Where is a good place to put that information? Should number of dogtags be in the top players table?

Thanks a lot i will try and get our web admin to but them in some sort of blocks so we can put them in a widget on the homepage of our website.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by Narf!*:

 

Hi and Merry Christmas to all first :smile:

 

I think the new Stats Banner thing is buggy. I've got about 2,5k kills for example, but the banner says I've got 647 kills. Score, rounds, headschots, etc. stats are wrong, too. Just click here to see :smile:

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

Originally Posted by ty_ger07*:

 

Hi and Merry Christmas to all first :smile:

 

I think the new Stats Banner thing is buggy. I've got about 2,5k kills for example, but the banner says I've got 647 kills. Score, rounds, headschots, etc. stats are wrong, too. Just click here to see :smile:

I will have to dig deeper into this. There seems that for some reason, some players have different PlayerIDs in different servers which causes their stats not to be calculated consistently in certain situations.

 

For the majority of players, their stats should be correct, and only the minority with multiple PlayerIDs should have stats which don't agree with eachother.

 

 

 

I posted a question for XpKiller on this subject here:

myrcon.net/...chat-guid-stats-and-mapstats-logger#entry45212

 

 

EDIT:

 

In your situation, it looks like you may also have another problem. It looks like you may have had weapon stats disabled for quite a while which causes the accurate breakdown of stats to fail.

 

A player's Kills, Deaths, Headshots, ... are all stored generically in the playerstats table but my code relies on the more accurate breakdown of stats for each individual weapon. If the server counted 2000 generic kills with weapon stats disabled and then counted 200 accurate kills with weapon stats enabled, my code will only show 200 kills in the signature image.

 

Look at your page here for example:

 

http://koksnutten.net/stats1/index.p...&search=Search

 

See that the player has 15856 kills but no weapon stats and no stats signature image.

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

Originally Posted by ty_ger07*:

 

Do you have any images in http://gwg-clan.eu/gwg-stats/signature/cache/ ? Does that directory exist? Does your PHP installation include the GD extension? Have you tried deleting the .htaccess file in the signature cache folder to see if that makes a difference?
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by Narf!*:

 

I will have to dig deeper into this. There seems that for some reason, some players have different PlayerIDs in different servers which causes their stats not to be calculated consistently in certain situations.

 

For the majority of players, their stats should be correct, and only the minority with multiple PlayerIDs should have stats which don't agree with eachother.

 

 

 

I posted a question for XpKiller on this subject here:

myrcon.net/...chat-guid-stats-and-mapstats-logger#entry45212

 

 

EDIT:

 

In your situation, it looks like you may also have another problem. It looks like you may have had weapon stats disabled for quite a while which causes the accurate breakdown of stats to fail.

 

A player's Kills, Deaths, Headshots, ... are all stored generically in the playerstats table but my code relies on the more accurate breakdown of stats for each individual weapon. If the server counted 2000 generic kills with weapon stats disabled and then counted 200 accurate kills with weapon stats enabled, my code will only show 200 kills in the signature image.

 

Look at your page here for example:

 

http://koksnutten.net/stats1/index.p...&search=Search

 

See that the player has 15856 kills but no weapon stats and no stats signature image.

Yes, I've disabled weapon stats because of there were many weapon keys missing in Procon, so I thought it would maybe better to disable this. We plan a reset of our stats at the beginning of 2014 and then weapon stats will be re-enabled. But this was only on 1 server, the other 3 servers have never enabled weapon stats.

 

But if it maybe would help you, I could send you a backup of our sql database.

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

Originally Posted by Berndel*:

 

Do you have any images in http://gwg-clan.eu/gwg-stats/signature/cache/ ? Does that directory exist? Does your PHP installation include the GD extension? Have you tried deleting the .htaccess file in the signature cache folder to see if that makes a difference?

php5-gd is already the newest version.

directory exist? yes no images ,if i delete .htaccess this not help

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

Originally Posted by ty_ger07*:

 

Yes, I've disabled weapon stats because of there were many weapon keys missing in Procon, so I thought it would maybe better to disable this. We plan a reset of our stats at the beginning of 2014 and then weapon stats will be re-enabled. But this was only on 1 server, the other 3 servers have never enabled weapon stats.

 

But if it maybe would help you, I could send you a backup of our sql database.

I don't need a backup. With weapon stats disabled, weapon stats and signatures will be messed up and there is nothing I could do to artificially try to correct the data. The stats and signature images can only be as accurate as the data in the database.
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by ty_ger07*:

 

php5-gd is already the newest version.

directory exist? yes no images ,if i delete .htaccess this not help

Can you run this query in phpmyadmin and verify that you get a proper output?

 

SELECT tw.Friendlyname, SUM(tws.Kills) AS weaponKills, tpd.SoldierName, tpd.GlobalRank, 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_playerstats tps

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

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

INNER JOIN tbl_weapons_stats tws ON tws.StatsID = tps.StatsID

INNER JOIN tbl_weapons tw ON tw.WeaponID = tws.WeaponID

WHERE tpd.PlayerID = 9

GROUP BY Friendlyname

ORDER BY weaponKills DESC

LIMIT 1

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

Archived

This topic is now archived and is closed to further replies.


  • 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.
      • 5 replies
    • 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
    • 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
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 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.