Jump to content

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


tyger07

Recommended Posts

  • Replies 1.7k
  • Created
  • Last Reply

Originally Posted by CptChaos*:

 

Both, actually, lol!

 

I managed to find the variables which are used multiple time. I've created a file for it, which sets these variables for all servers. :smile:

If anyone is interested, let me know! :smile: It makes configuration for the stats so much easier!

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

Originally Posted by TMiland*:

 

Both, actually, lol!

 

I managed to find the variables which are used multiple time. I've created a file for it, which sets these variables for all servers. :smile:

If anyone is interested, let me know! :smile: It makes configuration for the stats so much easier!

Just share them, and maybe it'll be added to the main package. :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Another tip, use valid HTML-code. The -tag has been deprecated for years now.

Don't get me wrong, I may be picky and jerky, I like this stats page a lot and I really appreciate the time you've spend on it. I really would like to help out, even on coding and such. But the code could be much better and better readable, rewriting it would cost me too much time.

 

EDIT:

With how many tables did you build this? Damn, I hardly can't find a thing if I want to change a thing.

Building a webpage with tables is sooo 1995... :/ (Sorry to put it that way)

Font is still valid in xhtml and so are tables. I would invite you to write your own code instead of complaining about mine.

 

http://validator.w3.org/check_uri=ht...org%2Fservices

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

Originally Posted by CptChaos*:

 

Font is still valid in xhtml and so are tables. I would invite you to write your own code instead of complaining about mine.

 

http://validator.w3.org/check_uri=ht...org%2Fservices

Well, as said, I would love to write my own code from yours as base, but the code is hard to read, with no intending at all. I am not saying that tables are deprecated, I meant that building a webpage with tables in tables in tables in tables was done in 1995, when Internet Explorer ruled the browser market.

 

So yes, I am willing to help (I'll be glad to), but the code which I use as base (being your code) is making it very difficult. Font tag is deprecated as of HTML 4.01: http://www.w3schools.com/tags/tag_font.asp. :smile: That a browser still knows the tag is because of backwards compatibility. :smile: (

 

That's why I suggested to move the code to something like github.com, in that way more users can contribute in this awesome project.

 

EDIT:

I did collect some variables in one file, I named it config.php:

Code:

<_php
$db_host	= 'localhost'; // database host
$db_port	= 3306; // database port. default is 3306
$db_name	= ''; // database name
$db_uname	= ''; // database user name
$db_pass	= ''; // database password
$banner_url	= 'http://URL'; // Banner URL
$index_link	= 'http://URL'; // Index URL
$clan_name	= 'Clan Name'; // Clan name
$stats_link		= array('ServerStats1.php','ServerStats2.php'); // Enter each server stats link.
$database_connect = $db_host . ':' . $db_port;
Then, in all the files, I replacedCode:
// 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
_>
from the top with

Code:

require_once('config.php');
And removed the variable declarations from the all the files.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Well, as said, I would love to write my own code from yours as base, but the code is hard to read, with no intending at all.

There is indentation already. :ohmy: To say that there isn't is a little insulting.

 

The indentation of the code currently is governed by php. It would either need to be indented by php or by html but can't be both. If you indent by html, the php would become unreadable. So you have to pick your preference. Since it is a PHP file, priority was placed on proper PHP indentation.

 

Of course splitting the html into its own separate template files parsed by the PHP file would be the solution, but the whole purpose of this project from the beginning was to make a simple and fast one-file stats page almost anyone could use. There are other stats pages made by others for you to use if you wish. You may like the appearance of the code in the other pages better, but I would argue that mine is the fastest and most error-free.

 

If you find my HTML completely intolerable, I would suggest that you could delete all text between echo ' and '; and then you would be left with only PHP. From there, you could insert your own HTML in any convention you wish.

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

Originally Posted by TMiland*:

 

Country flags on Scoreboard edit!

 

If you want to have country flags on the scoreboard like this:

 

Posted Image

 

Edit line 688 to 693 from:

Code:

echo '
						<tr>
						<td class="tablecontents" width="15%">          ' . $count . ':  </td>
						<td class="tablecontents" width="21%">     <a href="' . $_SERVER['PHP_SELF'] . '_player_name=' . $player . '&search_player=Search"><font size="2">' . $player . '</font></a></td>
						<td class="tablecontents" width="21%">     ' . $country_name . '</td>
						';
To:

Code:

$country_flag = $scoreboard_row['CountryCode'];
						$country_flag = "flags/" . $country_flag . ".png";
						echo '
						<tr>
						<td class="tablecontents" width="15%">          ' . $count . ':  </td>
						<td class="tablecontents" width="21%">     <a href="' . $_SERVER['PHP_SELF'] . '_player_name=' . $player . '&search_player=Search"><font size="2">' . $player . '</font></a></td>
						<td class="tablecontents" width="21%"><img src=' . $country_flag . '>   ' . $country_name . '</td>
						';
Add the flags in this attachement to your root folder: flags.zip

 

Enjoy! :biggrin:

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

Originally Posted by CptChaos*:

 

@TMiland: I had to alter some things at line 663? And did somewhat the same above it, to determine the needed filename in case Procon / the DB doesn't have the user's IP. I have used this code:Code:

if(empty($scoreboard_row['CountryCode']))
						{
							$country_img = 'none.png';
						}
						else
						{
							$country_img = strtolower($country) .'.png';	
						}
						
						
						echo '
						<td class="tablecontents" width="26%" style="text-align:left"><img src="flags/'. $country_img .'"> ' . $country_name . '</img></td>
@ty_ger07: I'll see what I'll do. For now I'll dive in the code as I just don't have the time (anymore) to code my own... That's why I think something like github could come in handy. That way a lot of people can contribute as well and you can merge it as a patch with a click.

 

I'll also try to create a 'pie' for the map stats. :smile:

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

Originally Posted by TMiland*:

 

I just changed line 663 to this:Code:

<td class="tablecontents" width="26%" style="text-align:left"><img src="flags/'. strtolower($country) .'.png"> ' . $country_name . '</img></td>
.

I still used your flags.zip though.

 

ty_ger07: I'll see what I'll do. For now I'll dive in the code as I just don't have the time (anymore) to code my own...

Yeah, that does the job too :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Good. This is cool!

 

Map images where maps are referenced. Flags where countries are referenced. Weapons images where weapons are referrenced?

 

These were things I considered but never implemented because I was focusing on performance as a priority.

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

Originally Posted by CptChaos*:

 

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

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

Originally Posted by ty_ger07*:

 

This is really bigger than me and my limited time. I plan to release an update tomorrow with some popular requests and improvements you have offered, but then after that, I will be very busy for two weeks.

 

How does one go about managing this better? I offered the code and of course encourage people to modify it and make it better, but other than offering your improvements here like you are doing, is there a better way? As it is, this is creating fragmentation.

 

As you can probably tell, I have no formal training and my profession is in an entirely different field. This is a hobby for me and sometimes turns into an unwanted distraction. I need someone with experience to offer their advice in how this project could move forward in a unified way. Or perhaps it may be determined that it should be killed off and other stats pages should be used instead. Fragmentation is my root concern and collective backing behind one project would be preferable.

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

Originally Posted by TMiland*:

 

This is really bigger than me and my limited time. I plan to release an update tomorrow with some popular requests and improvements you have offered, but then after that, I will be very busy for two weeks.

 

How does one go about managing this better? I offered the code and of course encourage people to modify it and make it better, but other than offering your improvements here like you are doing, is there a better way? As it is, this is creating fragmentation.

 

As you can probably tell, I have no formal training and my profession is in an entirely different field. This is a hobby for me and sometimes turns into an unwanted distraction. I need someone with experience to offer their advice in how this project could move forward in a unified way. Or perhaps it may be determined that it should be killed off and other stats pages should be used instead. Fragmentation is my root concern and collective backing behind one project would be preferable.

You should add your project to github, so others can fork the project, so the fragments can be easily merged if wanted. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by CptChaos*:

 

Like there weren't enough countries, I had a player from Guernsey on our server... From where? Guernsey! Is that near the moon? No, not at all... It appears to be near France! Long message short: I added that country to the array of countries and made a flag picture for it.

 

Code:

// make an array of country names
$country_array = array('Null'=>'','Unknown'=>'--','Afghanistan'=>'AF','Albania'=>'AL','Algeria'=>'DZ','American Samoa'=>'AS','Andorra'=>'AD','Angola'=>'AO','Anguilla'=>'AI','Antarctica'=>'AQ','Antigua'=>'AG','Argentina'=>'AR','Armenia'=>'AM','Aruba'=>'AW','Australia'=>'AU','Austria'=>'AT','Azerbaijan'=>'AZ','Bahamas'=>'BS','Bahrain'=>'BH','Bangladesh'=>'BD','Barbados'=>'BB','Belarus'=>'BY','Belgium'=>'BE','Belize'=>'BZ','Benin'=>'BJ','Bermuda'=>'BM','Bhutan'=>'BT','Bolivia'=>'BO','Bosnia'=>'BA','Botswana'=>'BW','Bouvet Island'=>'BV','Brazil'=>'BR','Indian Ocean'=>'IO','Brunei Darussalum'=>'BN','Bulgaria'=>'BG','Burkina Faso'=>'BF','Burundi'=>'BI','Cambodia'=>'KH','Cameroon'=>'CM','Canada'=>'CA','Cape Verde'=>'CV','Cayman Islands'=>'KY','Central Africa'=>'CF','Chad'=>'TD','Chile'=>'CL','China'=>'CN','Christmas Island'=>'CX','Cocos Islands'=>'CC','Columbia'=>'CO','Comoros'=>'KM','Congo'=>'CG','Republic of Congo'=>'CD','Cook Islands'=>'CK','Costa Rica'=>'CR','Ivory Coast'=>'CI','Croatia'=>'HR','Cuba'=>'CU','Cyprus'=>'CY','Czech Repuplic'=>'CZ','Denmark'=>'DK','Djibouti'=>'DJ','Dominica'=>'DM','Dominican Republic'=>'DO','East Timor'=>'TP','Ecuador'=>'EC','Egypt'=>'EG','El Salvador'=>'SV','Equatorial Guinea'=>'GQ','Eritrea'=>'ER','Estonia'=>'EE','Ethiopia'=>'ET','Falkland Islands'=>'FK','Faroe Islands'=>'FO','Fiji'=>'FJ','Finland'=>'FI','France'=>'FR','Metropolitan France'=>'FX','French Guiana'=>'GF','French Polynesia'=>'PF','French Territories'=>'TF','Gabon'=>'GA','Gambia'=>'GM','Georgia'=>'GE','Germany'=>'DE','Ghana'=>'GH','Gibraltar'=>'GI','Greece'=>'GR','Greenland'=>'GL','Grenada'=>'GD','Guadeloupe'=>'GP','Guam'=>'GU','Guatemala'=>'GT','Guinea'=>'GN','Guinea-Bissau'=>'GW','Guyana'=>'GY','Haiti'=>'HT','McDonald Islands'=>'HM','Vatican City'=>'VA','Honduras'=>'HN','Hong Kong'=>'HK','Hungary'=>'HU','Iceland'=>'IS','India'=>'IN','Indonesia'=>'ID','Iran'=>'IR','Iraq'=>'IQ','Ireland'=>'IE','Israel'=>'IL','Italy'=>'IT','Jamaica'=>'JM','Japan'=>'JP','Jordan'=>'JO','Kazakstan'=>'KZ','Kenya'=>'KE','Kiribati'=>'KI','North Korea'=>'KP','South Korea'=>'KR','Kuwait'=>'KW','Kyrgyzstan'=>'KG','Lao'=>'LA','Latvia'=>'LV','Lebanon'=>'LB','Lesotho'=>'LS','Liberia'=>'LR','Libya'=>'LY','Liechtenstein'=>'LI','Lithuania'=>'LT','Luxembourg'=>'LU','Macau'=>'MO','Macedonia'=>'MK','Madagascar'=>'MG','Malawi'=>'MW','Malaysia'=>'MY','Maldives'=>'MV','Mali'=>'ML','Malta'=>'MT','Marshall Islands'=>'MH','Martinique'=>'MQ','Mauritania'=>'MR','Mauritius'=>'MU','Mayotte'=>'YT','Mexico'=>'MX','Micronesia'=>'FM','Moldova'=>'MD','Monaco'=>'MC','Mongolia'=>'MN','Montserrat'=>'MS','Morocco'=>'MA','Mozambique'=>'MZ','Myanmar'=>'MM','Namibia'=>'NA','Nauru'=>'NR','Nepal'=>'NP','Netherlands'=>'NL','Netherlands Antilles'=>'AN','New Caledonia'=>'NC','New Zealand'=>'NZ','Nicaragua'=>'NI','Niger'=>'NE','Nigeria'=>'NG','Niue'=>'NU','Norfolk Island'=>'NF','Mariana Islands'=>'MP','Norway'=>'NO','Oman'=>'OM','Pakistan'=>'PK','Palau'=>'PW','Palestine'=>'PS','Panama'=>'PA','Papua New Guinea'=>'PG','Paraguay'=>'PY','Peru'=>'PE','Philippines'=>'PH','Pitcairn'=>'PN','Poland'=>'PL','Portugal'=>'PT','Puerto Rico'=>'PR','Qatar'=>'QA','Reunion'=>'RE','Romania'=>'RO','Russia'=>'RU','Rwanda'=>'RW','Saint Helena'=>'SH','Saint Kitts'=>'KN','Saint Lucia'=>'LC','Saint Pierre'=>'PM','Saint Vincent'=>'VC','Samoa'=>'WS','San Marino'=>'SM','Sao Tome'=>'ST','Saudi Arabia'=>'SA','Senegal'=>'SN','Seychelles'=>'SC','Sierra Leone'=>'SL','Singapore'=>'SG','Slovakia'=>'SK','Slovenia'=>'SI','Solomon Islands'=>'SB','Somalia'=>'SO','South Africa'=>'ZA','Sandwich Islands'=>'GS','Spain'=>'ES','Sri Lanka'=>'LK','Sudan'=>'SD','Suriname'=>'SR','Svalbard'=>'SJ','Swaziland'=>'SZ','Sweden'=>'SE','Switzerland'=>'CH','Syria'=>'SY','Taiwan'=>'TW','Tajikistan'=>'TJ','Tanzania'=>'TZ','Thailand'=>'TH','Togo'=>'TG','Tokelau'=>'TK','Tonga'=>'TO','Trinidad'=>'TT','Tunisia'=>'TN','Turkey'=>'TR','Turkmenistan'=>'TM','Turks Islands'=>'TC','Tuvalu'=>'TV','Uganda'=>'UG','Ukraine'=>'UA','United Arab Emirates'=>'AE','United Kingdom'=>'GB','United States'=>'US','US Minor Outlying Islands'=>'UM','Uruguay'=>'UY','Uzbekistan'=>'UZ','Vanuatu'=>'VU','Venezuela'=>'VE','Vietnam'=>'VN','Virgin Islands (British)'=>'VG','Virgin Islands (US)'=>'VI','Wallis and Futuna'=>'WF','Western Sahara'=>'EH','Yemen'=>'YE','Yugoslavia'=>'YU','Zambia'=>'ZM','Zimbabwe'=>'ZW', "Guernsey" => "GG");
And I also uploaded the flag: Posted Image
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by CptChaos*:

 

I can't sign up because my email address contains invalid characters? Since when does a website only allow you to have certain email addresses?

I know a few (computer) communities which disallow certain domains, not characters. An e-mail addy is only a-z, 0-9 and - or _.

 

The detailed map rotation log I am building is finally getting some shape:

Posted Image

I still have a lot to tweak and have much ideas coming for it, but I have to tweak it a lot, even the columns which are most usefull and the like. :ohmy: So no release of the code as of yet, because it's far from done. :biggrin: For bigger, click: http://i.imgur.com/9Tw3x0d.jpg

 

As you can clearly see, the looks aren't the same as the stats do, but I will fix that... But I have to go to sleep at some point today, lol! :ohmy:

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

Originally Posted by ty_ger07*:

 

Github won't let me create an account because I have an underscore in my email address. Since when is an underscore in an email address disallowed? I might have to create a new email address to sign up to github because my other email address has a period in it which I assume they also disallow.

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

Originally Posted by ty_ger07*:

 

The detailed map rotation log I am building is finally getting some shape:

Posted Image

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...tats/index.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).

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

Originally Posted by MorpheusX(AUT)*:

 

Github won't let me create an account because I have an underscore in my email address. Since when is an underscore in an email address disallowed? I might have to create a new email address to sign up to github because my other email address has a period in it which I assume they also disallow.

No problem with periods in the email addresses, at least I got my myrcon address registered there (which includes [email protected]).
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Kinsman*:

 

Ok I did some work on the index for you, added some server totals, and the nice map images from previous pages.

 

I can post a zip with the index and buttons etc if anybody wants it, also note i moved the maps into their own folder.

 

http://jw.servegame.org/bf4stats/index.php

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

Originally Posted by kcuestag*:

 

Working on a e107 plugin, with a sidebar menu:

 

Posted Image

 

And the index:

 

Posted Image

 

This is great! :biggrin:

Are you going to release this publicly? I'd love having it on our site since we also use e107.
* 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.