Jump to content

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


tyger07

Recommended Posts

Originally Posted by ty_ger07*:

 

Bummer, as that's really all I wanted.

 

maybe you could post the query and I can work it out from there?

The day is not over. I will when I publish the update today. I will try github again too.

 

EDIT: The issue is that I am remodeling a house and have another full time job. This is only a hobby and I cannot provide dedicated support.

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

Originally Posted by CptChaos*:

 

A detailed log of maps could get quite out of hand. There could be thousands of lines of information. And is it information people are really interested in? I would suggest that if such a thing were implemented, that pagination would be used to scroll through pages of of data.

 

This is where I am currently:

http://open-web-community.com/bf4sta...erverStats.php

 

No, I have not worked on the index page yet. :sad: Adding total server stats on the index page should be simple and I am not worried about whether or not I will have time to do so when I release my update tomorrow (err... later today).

Ah, I limited it to the last 50 rounds (but it's configurable). Why would someone see ALL the rounds from the past? :ohmy:

 

If you like, I can create an e-mail forwarder for you, something like [email protected], to any emailaddress you'd like, let me know if you want something like that. :smile:

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

Originally Posted by Cermit*:

 

It would be possible to modify it to use different databases. Right now it assumes that the servers will all be in the same database. Do you need help with the php to edit the code for creating a second database connection link?

Sorry for asking once again, but is there already some solution for running 2 servers on 2 different databases?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Sorry for asking once again, but is there already some solution for running 2 servers on 2 different databases?

Each stats page could run on its own database currently if you wished. Your issue is that you want the index page to show contents from two different databases which it currently doesn't. Yes, it is possible, but no, it has not been implemented yet. I would say that your solution would not be implemented as a normal release but would be something custom for you particularly since it is circumstance which is not common and the code would become unnecessarily complex to suit this uncommon issue.

 

I am in the process of releasing a final update for the near future and am hoping that this project will branch out and others will do well with it.

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

Originally Posted by Cermit*:

 

@Cermit

how about run both server in the same db?

 

The plugin is supporting up tp 65000 servers in one db.

 

And please DONT use a table suffix.

Yes running both in the same DB would be the easiest solution, but using that way causes one of the 2 servers to lose all stats (collected so far) when moving it to the DB on which one of the servers is running.

That would not be the best thing in my interest, as both servers have been full almost 24/7 since release.

That´s why I asked if it could be possible to simply read 2 different databases, and maybe not be forced to move everything to 1 DB...

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

Originally Posted by p19blo*:

 

Yes running both in the same DB would be the easiest solution, but using that way causes one of the 2 servers to lose all stats (collected so far) when moving it to the DB on which one of the servers is running.

That would not be the best thing in my interest, as both servers have been full almost 24/7 since release.

That´s why I asked if it could be possible to simply read 2 different databases, and maybe not be forced to move everything to 1 DB...

im a mysql noob but cant you export 1 of the servers tables import the information into the "communal database" ?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Cermit*:

 

I also thought about that already, but as both databases are separate each server has ID 1, and so all players only were playing on the server with the ID 1. I think that won´t work without mixing everything up...

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

Originally Posted by Kinsman*:

 

Its feasible, you would prob need to edit the sql first so they are not both server1 though, so a bit of work. Do an sql dump, look for all instances of serverid 1 and replace with 2 perhaps.

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

Originally Posted by ty_ger07*:

 

Yes running both in the same DB would be the easiest solution, but using that way causes one of the 2 servers to lose all stats (collected so far) when moving it to the DB on which one of the servers is running.

That would not be the best thing in my interest, as both servers have been full almost 24/7 since release.

That´s why I asked if it could be possible to simply read 2 different databases, and maybe not be forced to move everything to 1 DB...

EDIT: It would be REALLY hard to combine the servers together I think since not only would the server IDs need to be changed, but all the player stats IDs would have to be reconstructed because stats IDs would need to be offset depending on which server ID they are referencing.

 

But if you want to edit the code in StatsMain.php instead...

 

In the database connection info area, replace:

 

// DATABASE INFORMATION

$db_host = ''; // database host

$db_port = '3306'; // database port. default is 3306

$db_name = ''; // database name

$db_uname = ''; // database user name

$db_pass = ''; // database password

With:

 

// DATABASE 1 INFORMATION

$db_host1 = ''; // database host

$db_port1 = '3306'; // database port. default is 3306

$db_name1 = ''; // database name

$db_uname1 = ''; // database user name

$db_pass1 = ''; // database password

$db1_connect = $db_host1 . ':' . $db_port1;

$db1 = @mysql_connect($db1_connect, $db_uname1, $db_pass1, true);

 

// DATABASE 2 INFORMATION

$db_host2 = ''; // database host

$db_port2 = '3306'; // database port. default is 3306

$db_name2 = ''; // database name

$db_uname2 = ''; // database user name

$db_pass2 = ''; // database password

$db2_connect = $db_host2 . ':' . $db_port2;

$db2 = @mysql_connect($db2_connect, $db_uname2, $db_pass2, true);

 

 

$db_number = array("$db1","$db2");

Then, on Line 107 through 109, delete this (no longer necessary):

 

// connect to the database if not already done

@mysql_connect($db_connect, $db_uname, $db_pass);

@mysql_select_db($db_name) or die ("Unable to access stats database. Please notify this website's administrator.If you are the administrator, please seek assistance http://www.phogue.net/forumvb/showthread.php_3756-BF3-Server-Stats-page-for-XpKiller-s-BF3-Chat-GUID-Stats-and-Mapstats-Logger'>here.

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

Originally Posted by ty_ger07*:

 

Looks really good. Would this be classified as server info or map stats (will map names be added)?

 

I will get this on github soon and let you guys do as you wish. I am just finishing up an update.

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

Originally Posted by CptChaos*:

 

Looks really good. Would this be classified as server info or map stats (will map names be added)?

I am actually not quite sure what I'll do with it, but I plan on making more graphs. I use pChart for it btw, so I actually generate and grab the code for it. I am doing the SQL part on my own.

 

I'll also think I've tweaked it enough for the looks now:

Posted Image

I will get this on github soon and let you guys do as you wish. I am just finishing up an update.

Can't wait to do some additions! :smile:

I could add mapnames as well, but problem is, there isn't much space for text.

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

Originally Posted by ty_ger07*:

 

A lot of the code is not showing up for me, Not sure if its because im using the latest version found here*, or if it is something do do with my settings in procon. No matter what the case hoping someone can take a look at the page and help me figure out why nothing else is logging, Would love to modify the site but want to get all the queries working first. Below is a link to my site so you can see from the first page whats going on.

 

On the main page it does not show the Players Logged, Total Score or Total Kills then on the next page it doesn't show Top Players, Country Stats or Map Stats

 

http://stats.thedecoy.net

 

help me please i'm begging on my knees... not really but sounded good.

What are your plugin settings in PRoCon? Are you using table suffixes? Do you have a lot of logging options disabled in the plugin?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

I added this project to GitHub.

 

https://github.com/tyger07/BF4-Server-Stats

 

I hope that this will help the project moving forward, solve issues and poor implementations, and keep things less fragmented.

 

I am new to GitHub, so please feel free to offer suggestions if I am doing something wrong or should be doing something better in a different way.

 

Thanks!

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

Originally Posted by lordicon*:

 

Too bad Dice didn't release a webkit or something like that, lol!

 

I've also modded the country flags in the player stats from a server. :smile:

 

Code:

// search the country array for the country code of interest and assign the full name to a variable
			$country = array_search($CountryCode,$country_array);
			
			if(empty($CountryCode))
			{
				$country_img = 'none.png';
				$country = 'Undetermined';
			}
			else
			{
				$country_img = strtolower($CountryCode) .'.png';	
			}
and Code:
<td width="30%" style="text-align: left;"> <font class="information">Country: <img src="flags/'. strtolower($CountryCode) .'.png" /> </font>' . $country . '
is the code I used for it, around line 1330, somewhere there, not sure where exactly as I didn't track the exact line.

 

Posted Image

I just added two new images to the flag folder called ".png" and "--.png" with this image .png seemed to have worked as well and less coding :P
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

I just added two new images to the flag folder called ".png" and "--.png" with this image .png seemed to have worked as well and less coding :P

This is the method I used for slightly less code and less size:

if(($country == '') OR ($country == '--'))

{

$country_img = './images/flags/none.png';

}

else

{

$country_img = './images/flags/' . strtolower($country) . '.png';

}

https://github.com/tyger07/BF4-Serve...erverStats.php
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Because many divs use multiple backgrounds...

 

background-image: url("images/50.png"), linear-gradient(170deg, rgba(100,000,000,0.5), rgba(000,000,100,0.3), rgba(000,000,100,0.1));

The page looks all screwed up in old browsers which don't support multiple backgrounds in the same element / IE compatibility view. Maybe someone wants to work on splitting these up into separate layered divs.

 

Alright, have fun guys!

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

Originally Posted by ty_ger07*:

 

Another late update:

 

More directory changes.

A common.php file in the common folder has the shared stats page info so less info has to be changed on each individual stats page.

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

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.