Jump to content

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


tyger07

Recommended Posts

  • Replies 1.7k
  • Created
  • Last Reply

Originally Posted by ty_ger07*:

 

Hey where can I change the background color. I do not like the purple blue style.

 

THX

It's all in common/stats.css.

 

Background color of what exactly?

 

If you are talking about the diagonal linear gradient of red at top left and blue at bottom right, it's these such lines here:

Code:

background-image: linear-gradient(170deg, rgba(100,000,000,0.4), rgba(000,000,100,0.4), rgba(000,000,100,0.3));
The first rgba(100,000,000,0.4) is red in top left. The second rgba(000,000,100,0.4) is blue in the middle. The third rgba(000,000,100,0.3) is more transparent blue in bottom right.

 

There are these sort of lines scattered around in different places with different levels of color and transparency. I am not sure which specific area you are wanting to change.

 

100,000,000 : first three numbers are red, second three numbers are gree, and third three numbers are blue. In other words: 100 out of 255 of red, 0/255 of green, and 0/255 of blue. ,0.3 after those numbers for instance is 0.3 out of 1.0 of opacity (70% transparent).

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

Originally Posted by ty_ger07*:

 

Hey thanks, I'm still testing now, exactly what I was looking for, how do I integrate a favicon?

 

Nice Work very THX

 

LG Level

This is all just standard HTML stuff.

 

In the head of the HTML document, you can specify a different favicon.

 

Code:

<link rel="icon" href="favicon.ico" type="image/x-icon" /> 
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
It will use your domain's default favicon in your domain root unless you specify a different one manually.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Signature cache folder

How can decrease image sizes/amounts

Folder size becomes bigger and bigger

You can delete the images, but you risk breaking the images for anyone who may be using the image in their signature somewhere.

 

I feel like going back to on-demand images with no cache may be prudent.

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

Originally Posted by tobi13*:

 

Hi at first the best work and look ever ,

my question #1 is i have the follow errors in context

Warning: imagepng() [function.imagepng]: Unable to open './signature/cache/PID234FAV0.png' for writing: Permission denied in /var/www/vhosts/XXXXX/httpdocs/stats/common/functions.php on line 1208

 

Warning: imagecreatefrompng(./images/weapons/A91.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1168

 

Warning: imagecopy(): supplied argument is not a valid Image resource in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1171

 

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1172

 

Warning: imagepng() [function.imagepng]: Unable to open './signature/cache/PID234FAV1.png' for writing: Permission denied in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1208

 

It is because of permission leeks?

 

 

 

greetz

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

Originally Posted by ty_ger07*:

 

Hi at first the best work and look ever ,

my question #1 is i have the follow errors in context

Warning: imagepng() [function.imagepng]: Unable to open './signature/cache/PID234FAV0.png' for writing: Permission denied in /var/www/vhosts/XXXXX/httpdocs/stats/common/functions.php on line 1208

 

Warning: imagecreatefrompng(./images/weapons/A91.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1168

 

Warning: imagecopy(): supplied argument is not a valid Image resource in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1171

 

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1172

 

Warning: imagepng() [function.imagepng]: Unable to open './signature/cache/PID234FAV1.png' for writing: Permission denied in /var/www/vhosts/XXXXX.de/httpdocs/stats/common/functions.php on line 1208

 

It is because of permission leeks?

 

 

 

greetz

Look at your folder permissions. Your /signature/cache folder doesn't have write permission.

 

I am planning to get rid of the need for cached images by the way. They are more trouble than they are worth.

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

Originally Posted by ty_ger07*:

 

Code linked to in first post updated.

 

Changes:

- Bug fixes

- Code size reduction

- Added map pie chart to maps page and moved daily player quantity data chart from maps page to server info page

- Reverted back to on-demand signature images instead of caching signature images on the server (for server space usage reasons and to ensure up-to-date data is displayed)

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

Originally Posted by GR101*:

 

Code linked to in first post updated.

 

Changes:

- Bug fixes

- Code size reduction

- Added map pie chart to maps page and moved daily player quantity data chart from maps page to server info page

- Reverted back to on-demand signature images instead of caching signature images on the server (for server space usage reasons and to ensure up-to-date data is displayed)

Excellent work ty_ger07 and thanks for the update.

 

Could I suggest for a future update a 'Hall of Fame' page, showing the following if at all possible without too much SQL load?

 

Please feel free to tweak as appropriate.

 

 

Hall of Fame

 

Best Recon (score)

Best Support (score)

Best Engineer (score)

Best Assault (score)

Best Commander

 

Most Dogtags Taken

Most Defibrillator Kills

Most Hand Grenade Kills

Most CLAYMORE Kills

Most Kills

Most Deaths

 

Thanks in advance

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

Originally Posted by ty_ger07*:

 

Excellent work ty_ger07 and thanks for the update.

 

Could I suggest for a future update a 'Hall of Fame' page, showing the following if at all possible without too much SQL load?

 

Please feel free to tweak as appropriate.

 

 

Hall of Fame

 

Best Recon (score)

Best Support (score)

Best Engineer (score)

Best Assault (score)

Best Commander

 

Most Dogtags Taken

Most Defibrillator Kills

Most Hand Grenade Kills

Most CLAYMORE Kills

Most Kills

Most Deaths

 

Thanks in advance

There is no more room in the menu. :huh:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by cdd3068*:

 

While this is this a great plugin that I truly love...I'm thinking of the future where people only join maybe once or even twice that causes some stats to not be retained as others.

 

Does anyone have a monthly cron job to (for example) drop players from the database that have played

 

Another question...is there a way force people to come through a specific website (perhaps a fourm) to view the stats. I was thinking such as something like referral URL must be "abcd" where "abcd" is your clan website.

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

Originally Posted by ty_ger07*:

 

While this is this a great plugin that I truly love...I'm thinking of the future where people only join maybe once or even twice that causes some stats to not be retained as others.

 

Does anyone have a monthly cron job to (for example) drop players from the database that have played

I am not aware of anyone doing such at thing up to this point.

 

This query should work:

 

DELETE tsp.*, tps.*, tws.*, tss.*

FROM `tbl_server_player` tsp

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

INNER JOIN `tbl_weapons_stats` tws ON tsp.`StatsID` = tws.`StatsID`

INNER JOIN `tbl_sessions` tss ON tsp.`StatsID` = tss.`StatsID`

WHERE tps.`Rounds`

 

That query should still keep the player's data in the database so that any stats they have in servers with 3 or more rounds played are still available but stats in servers where they have 2 or less round played are erased. It should also reduce database size due to delete freed up sessions, weapons, and playerstats data.

 

After running the above query, you would want to run another query to optimize those tables to free up resources.

 

OPTIMIZE TABLE `tbl_server_player`, `tbl_playerstats`, `tbl_weapons_stats`, `tbl_sessions`

 

You would just have to create your own cron job or execute it manually from time to time with phpmyadmin or some other remote database access tool.

 

I just tested the two queries above, and for size comparisons, after doing both of the above queries, the demo database I have dropped from 110 MB to 95 MB.

 

Another question...is there a way force people to come through a specific website (perhaps a fourm) to view the stats. I was thinking such as something like referral URL must be "abcd" where "abcd" is your clan website.

That doesn't seem like it would be a common request. I assume this request is for the stats page only, right? You aren't trying to accomplish the same on your game server, are you? I mean, if someone in your server wants to check their stats with !stats, do you want them to need to visit your site first?

 

As far as the stats page is concerned, you could encase your stats output inside the following IF statement:

 

if(!empty($_GET['referer']) AND ($_GET['referer'] == 'abcd'))

{

// page code in here

}

else

{

// display error text here

}

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

Originally Posted by cdd3068*:

 

I am not aware of anyone doing such at thing up to this point.

 

This query should work:

 

DELETE tsp.*, tps.*, tws.*, tss.*

FROM `tbl_server_player` tsp

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

INNER JOIN `tbl_weapons_stats` tws ON tsp.`StatsID` = tws.`StatsID`

INNER JOIN `tbl_sessions` tss ON tsp.`StatsID` = tss.`StatsID`

WHERE tps.`Rounds`

 

That query should still keep the player's data in the database so that any stats they have in servers with 3 or more rounds played are still available but stats in servers where they have 2 or less round played are erased. It should also reduce database size due to delete freed up sessions, weapons, and playerstats data.

 

After running the above query, you would want to run another query to optimize those tables to free up resources.

 

OPTIMIZE TABLE `tbl_server_player`, `tbl_playerstats`, `tbl_weapons_stats`, `tbl_sessions`

 

You would just have to create your own cron job or execute it manually from time to time with phpmyadmin or some other remote database access tool.

 

I just tested the two queries above, and for size comparisons, after doing both of the above queries, the demo database I have dropped from 110 MB to 95 MB.

Thank you...the query looks good, I updated it to be less that 4 (because it will then do 1,2,3). I will give this shot for now. I would expect the pages on the website to trim these users as well? However, I'm still see players that have

 

That doesn't seem like it would be a common request. I assume this request is for the stats page only, right? You aren't trying to accomplish the same on your game server, are you? I mean, if someone in your server wants to check their stats with !stats, do you want them to need to visit your site first?

 

As far as the stats page is concerned, you could encase your stats output inside the following IF statement:

 

if(!empty($_GET['referer']) AND ($_GET['referer'] == 'abcd'))

{

// page code in here

}

else

{

// display error text here

}

Yes, only on the stats page itself, nothing to do with the game server. I want people to go through my fourm to view stats, not be able to directly go to the stats page without FIRST coming from the fourm link.

 

I tried putting:

Code:

if(!empty($_GET['referer']) AND ($_GET['referer'] == 'http://www.nosnipersbf4.com'))
{
    // page code in here
}
else
{
    echo 'error!!!';
}
This always reproduced the "error" output of course. I'm not sure which file to edit to include this; I was modifying the index.php...Could you clarify exactly where you would put it and also the referer link format?

 

To be honest, I don't think $_GET['referer'] is being set, because I also tried to echo this out to the front page. Do I need to edit another page so that "referer" get set?

 

Are we sure its referer and not referrer ?

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

Originally Posted by ty_ger07*:

 

Thank you...the query looks good, I updated it to be less that 4 (because it will then do 1,2,3). I will give this shot for now. I would expect the pages on the website to trim these users as well? However, I'm still see players that have

Maybe I missed something. I sure hope that you created a backup of your database first just in case.

 

It worked for me. But it is a bit of a hack because the player data is not removed for those players. Only those player's stats, weapon stats, and session stats are removed for those players in any of your servers which have less than 3 rounds played. In other words, if you had two servers, and the player played 50 times in one server and 2 times in the other server, they would still have 50 rounds of stats in one server but no stats in the other server. If you had only 1 server, they should have no stats remaining if they played less than 3 rounds in your only server, but their player data would still exist identifying their name and GUIDs and stuff.

 

Yes, only on the stats page itself, nothing to do with the game server. I want people to go through my fourm to view stats, not be able to directly go to the stats page without FIRST coming from the fourm link.

 

I tried putting:

Code:

if(!empty($_GET['referer']) AND ($_GET['referer'] == 'http://www.nosnipersbf4.com'))
{
    // page code in here
}
else
{
    echo 'error!!!';
}
This always reproduced the "error" output of course. I'm not sure which file to edit to include this; I was modifying the index.php...Could you clarify exactly where you would put it and also the referer link format?
$_GET['referer'] means that it is looking at the URL query string for a query named 'referer' and the value of referer. It is looking for text in the URL which says _referer=abcd.

 

_referer=http://www.nosnipersbf4.com would not work since you can't have an un-encoded url inside of a url. The second URL would have to be encoded so that special characters are converted.

 

For example, this would work:

 

Code:

http://stats.nosnipersbf4.com/index.php_ServerID=1&referer=http%3A%2F%2Fwww.nosnipersbf4.com
But of course the problem is that all subsequent links would not function because the referer data is not provided in any of the subsequent URLs. You would have to set a session variable or a cookie to remember that the correct referer code was provided initially.

 

Code:

// start session
session_start();

// initialize default to false
$session['ok'] = 0;

// check if a successful submission was provided previously
if(!empty($_SESSION['success']))
{
    $session['ok'] = $_SESSION['success'];
}

if((!empty($_GET['referer']) AND ($_GET['referer'] == 'http://www.nosnipersbf4.com')) OR ($session['ok'] == 1))
{
    $_SESSION['success'] = 1;
    // page code in here
}
else
{
    echo 'error!!!';
}
The above code will look for:

Code:

http://stats.nosnipersbf4.com/index.php_referer=http%3A%2F%2Fwww.nosnipersbf4.com
in the URL.

 

And once it finds that referer=http%3A%2F%2Fwww.nosnipersbf4.com the first time for the client visiting the site, it will remember and let them view any of the stats pages (of course this has to be in index.php) until the client closes their browser window.

 

If the client closed their browser windows, they would have to provide the correct referer again the next time they tried to visit the page.

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

Originally Posted by cdd3068*:

 

Maybe I missed something. I sure hope that you created a backup of your database first just in case.

 

It worked for me. But it is a bit of a hack because the player data is not removed for those players. Only those player's stats, weapon stats, and session stats are removed for those players in any of your servers which have less than 3 rounds played. In other words, if you had two servers, and the player played 50 times in one server and 2 times in the other server, they would still have 50 rounds of stats in one server but no stats in the other server. If you had only 1 server, they should have no stats remaining if they played less than 3 rounds in your only server, but their player data would still exist identifying their name and GUIDs and stuff.

 

 

 

$_GET['referer'] means that it is looking at the URL query string for a query named 'referer' and the value of referer. It is looking for text in the URL which says _referer=abcd.

 

_referer=http://www.nosnipersbf4.com would not work since you can't have an un-encoded url inside of a url. The second URL would have to be encoded so that special characters are converted.

 

For example, this would work:

 

Code:

http://stats.nosnipersbf4.com/index.php_ServerID=1&referer=http%3A%2F%2Fwww.nosnipersbf4.com
But of course the problem is that all subsequent links would not function because the referer data is not provided in any of the subsequent URLs. You would have to set a session variable or a cookie to remember that the correct referer code was provided initially.

 

Code:

// start session
session_start();

// initialize default to false
$session['ok'] = 0;

// check if a successful submission was provided previously
if(!empty($_SESSION['success']))
{
    $session['ok'] = $_SESSION['success'];
}

if((!empty($_GET['referer']) AND ($_GET['referer'] == 'http://www.nosnipersbf4.com')) OR ($session['ok'] == 1))
{
    $_SESSION['success'] = 1;
    // page code in here
}
else
{
    echo 'error!!!';
}
The above code will look for:

Code:

http://stats.nosnipersbf4.com/index.php_referer=http%3A%2F%2Fwww.nosnipersbf4.com
in the URL.

 

And once it finds that referer=http%3A%2F%2Fwww.nosnipersbf4.com the first time for the client visiting the site, it will remember and let them view any of the stats pages (of course this has to be in index.php) until the client closes their browser window.

 

If the client closed their browser windows, they would have to provide the correct referer again the next time they tried to visit the page.

Got it! I had to tweak a few more items and tweak the link for obvious reasons :smile: Thank you very much! I have so much more to learn! You're awesome! :biggrin:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Hey THX nice Update ^^

 

how can I add more servers? I have two BF4 Server.

How can you add more servers? Buy more servers?

 

The servers are added to the stats page automatically. Is one of them not appearing for you or something?

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

Originally Posted by Borzywit*:

 

Hi there!

 

This little mod will change stats webpage by adding map graphics on server background and BF3 BL style buttons. You can view example at http://cnpc.org.pl/stats/index.php.

 

All you have to do is download archive http://cnpc.org.pl/stats/upgradeV2.rar and extract it to your root folder of stats web page.

 

If You want to put changes manually

Files to edit:

root/common/displayservers.php

root/common/stats.css

 

EDIT:

root/common/displayservers.php

 

FIND:

Code:

    echo '
    <tr>
    <td width="100%" style="text-align: left;">
    
    <div class="shadowcontent">
    <table width="95%" align="center" border="0">
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '"><font size="3">' . $ServerName . '</font></a>
    </td>
    <td width="22%">
    <font class="information">Current Players In Server:</font> ' . $players . '
    </td>
    <td width="22%">
    <font class="information">Current Map:</font> ' . $map_name . '
    </td>
    <td width="21%">
    <font class="information">Users Viewing Stats:</font> ' . $sessions . '
    </td>
    </tr>
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '"><img src="./images/viewstatsbtn.png" alt="view stats" class="imagebutton" /></a>  
    <a href="http://battlelog.battlefield.com/bf4/servers/pc/_filtered=1&expand=0&useAdvanced=1&q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/joinbtn.png" alt="join" class="imagebutton" /></a>
    </td>
    <td width="22%">
    <font class="information">Players Logged:</font> ' . $total_players . '
    </td>
    <td width="22%">
    <font class="information">Total Score:</font> ' . $score . '
    </td>
    <td width="21%">
    <font class="information">Total Kills:</font> ' . $kills . '
    </td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    ';
REPLACE WITH:

Code:

    echo '
    <tr>
    <td width="100%" style="text-align: left; padding-left: 25px; padding-right: 25px;">
    
    <div style="background-position: left center; background-repeat: repeat; background-size: 100% auto; border-radius: 10px; box-shadow: 2px 2px 20px 2px rgba(0,0,0,0.5); background-image: url(./images/maps/' . $CurrentMap_r['mapName'] . '.png)">
    <div class="shadowcontent">
    <table width="95%" align="center" border="0">
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '" style="color: white !important;"><font size="3">' . str_replace('[OPBC] ', '', $ServerName) . '</font></a>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Current Players In Server:</font> <span style="font-weight: 700;">' . $players . '</span></div>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Current Map:</font> <span style="font-weight: 700;">' . $map_name . '</span></div>
    </td>
    <td width="21%">
    <div class="bloczek"><font class="information">Users Viewing Stats:</font> <span style="font-weight: 700;">' . $sessions . '</span></div>
    </td>
    </tr>
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '"><img src="./images/view-stats.png" alt="" /></a>  
    <a href="http://battlelog.battlefield.com/bf4/pl/servers/pc/_filtered=1&expand=0&useAdvanced=1&q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/join-server.png" alt="" /></a>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Players Logged:</font> <span style="font-weight: 700;">' . $total_players . '</span></div>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Total Score:</font> <span style="font-weight: 700;">' . $score . '</span></div>
    </td>
    <td width="21%">
    <div class="bloczek"><font class="information">Total Kills:</font> <span style="font-weight: 700;">' . $kills . '</span></div>
    </td>
    </tr>
    </table>
    </div>
    </div>
    </td>
    </tr>
    ';
EDIT:

root/common/stats.css

 

AT THE END OF FILE ADD:

Code:

.bloczek {
    padding: 5px;
    background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.7);
    float: left;
    border-radius: 5px;
}
Upload content of root/images/ from given archive to you images folder of stats page.

 

Refresh and enjoy!

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

Originally Posted by ty_ger07*:

 

Hi there!

 

This little mod will change stats webpage by adding map graphics on server background and BF3 BL style buttons. You can view example at http://cnpc.org.pl/stats/index.php.

 

All you have to do is download archive http://cnpc.org.pl/stats/upgradeV2.rar and extract it to your root folder of stats web page.

 

If You want to put changes manually

Files to edit:

root/common/displayservers.php

root/common/stats.css

 

EDIT:

root/common/displayservers.php

 

FIND:

Code:

    echo '
    <tr>
    <td width="100%" style="text-align: left;">
    
    <div class="shadowcontent">
    <table width="95%" align="center" border="0">
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '"><font size="3">' . $ServerName . '</font></a>
    </td>
    <td width="22%">
    <font class="information">Current Players In Server:</font> ' . $players . '
    </td>
    <td width="22%">
    <font class="information">Current Map:</font> ' . $map_name . '
    </td>
    <td width="21%">
    <font class="information">Users Viewing Stats:</font> ' . $sessions . '
    </td>
    </tr>
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '"><img src="./images/viewstatsbtn.png" alt="view stats" class="imagebutton" /></a> *
    <a href="http://battlelog.battlefield.com/bf4/servers/pc/_filtered=1&expand=0&useAdvanced=1&q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/joinbtn.png" alt="join" class="imagebutton" /></a>
    </td>
    <td width="22%">
    <font class="information">Players Logged:</font> ' . $total_players . '
    </td>
    <td width="22%">
    <font class="information">Total Score:</font> ' . $score . '
    </td>
    <td width="21%">
    <font class="information">Total Kills:</font> ' . $kills . '
    </td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    ';
REPLACE WITH:

Code:

    echo '
    <tr>
    <td width="100%" style="text-align: left; padding-left: 25px; padding-right: 25px;">
    
    <div style="background-position: left center; background-repeat: repeat; background-size: 100% auto; border-radius: 10px; box-shadow: 2px 2px 20px 2px rgba(0,0,0,0.5); background-image: url(./images/maps/' . $CurrentMap_r['mapName'] . '.png)">
    <div class="shadowcontent">
    <table width="95%" align="center" border="0">
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '" style="color: white !important;"><font size="3">' . str_replace('[OPBC] ', '', $ServerName) . '</font></a>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Current Players In Server:</font> <span style="font-weight: 700;">' . $players . '</span></div>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Current Map:</font> <span style="font-weight: 700;">' . $map_name . '</span></div>
    </td>
    <td width="21%">
    <div class="bloczek"><font class="information">Users Viewing Stats:</font> <span style="font-weight: 700;">' . $sessions . '</span></div>
    </td>
    </tr>
    <tr>
    <td width="35%">
    <a href="' . $_SERVER['PHP_SELF'] . '_ServerID=' . $this_ServerID . '"><img src="./images/view-stats.png" alt="" /></a> *
    <a href="http://battlelog.battlefield.com/bf4/pl/servers/pc/_filtered=1&expand=0&useAdvanced=1&q=' . urlencode($ServerName) . '" target="_blank"><img src="./images/join-server.png" alt="" /></a>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Players Logged:</font> <span style="font-weight: 700;">' . $total_players . '</span></div>
    </td>
    <td width="22%">
    <div class="bloczek"><font class="information">Total Score:</font> <span style="font-weight: 700;">' . $score . '</span></div>
    </td>
    <td width="21%">
    <div class="bloczek"><font class="information">Total Kills:</font> <span style="font-weight: 700;">' . $kills . '</span></div>
    </td>
    </tr>
    </table>
    </div>
    </div>
    </td>
    </tr>
    ';
EDIT:

root/common/stats.css

 

AT THE END OF FILE ADD:

Code:

.bloczek {
    padding: 5px;
    background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.7);
    float: left;
    border-radius: 5px;
}
Upload content of root/images/ from given archive to you images folder of stats page.

 

Refresh and enjoy!

 

I had it appear that way previously but removed it. I personally think it is not attractive and does not agree with the rest of the page's style.

 

BTW, for the background image, you might want to do:

 

if(in_array($CurrentMap_r['mapName'],$map_array))

{

...

}

 

To verify that a DLC hasn't just released and make sure that non-existent resources aren't attempted to be loaded.

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

Originally Posted by Level*:

 

How can you add more servers? Buy more servers?

 

The servers are added to the stats page automatically. Is one of them not appearing for you or something?

The BF4 servers have different database server.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

The BF4 servers have different database server.

If they are in different databases, you will have to handle them as different pages. You can make multiple copies of my code in different folders -- one for each server.

 

Normally, you should avoid splitting your servers up into different databases.

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

Originally Posted by IBA_DR_DEATH*:

 

i have the chat logger working now, now im trying to get stats web page to work. hopefully this can be solve like the other.

 

http://www.iba-gaming.com/bf4stats/

 

 

// DATABASE INFORMATION

DEFINE('HOST', ''); localhost or IP that data base is on i tried both // database host address

DEFINE('PORT', '3306'); // database port - default is 3306

DEFINE('NAME', 'bf4stats'); // database name

DEFINE('USER', 'xxxxxxx'); // database user name

DEFINE('PASS', 'xxxxxxx'); // database password

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

Originally Posted by ty_ger07*:

 

i have the chat logger working now, now im trying to get stats web page to work. hopefully this can be solve like the other.

 

http://www.iba-gaming.com/bf4stats/

 

 

// DATABASE INFORMATION

DEFINE('HOST', ''); localhost or IP that data base is on i tried both // database host address

DEFINE('PORT', '3306'); // database port - default is 3306

DEFINE('NAME', 'bf4stats'); // database name

DEFINE('USER', 'xxxxxxx'); // database user name

DEFINE('PASS', 'xxxxxxx'); // database password

Since you are storing the database on your computer, your computer has to be accessible from the internet in order for your website to connect to your computer's database.

 

'localhost' and '127.0.0.1' will not work. You would need to know what IP address your ISP has given you and your IP address would have to never change. Also, your home network would have to be configured to allow internet traffic in.

 

It's really a huge security risk to turn your computer into a web server and allow anyone over the internet to connect to your computer. You shouldn't do it unless you know what you are doing (which I don't).

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

Originally Posted by Regafr0sch*:

 

The new Weapons won't be in my Webstats log.... Procon read it out of the BF4.def and added it to the DB - but there is no killcount for them. example the ASVal.

 

Anyone else this problem?

 

What should i do?

* 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.