Jump to content

Stats webpage for XpKiller's plugin


Borzywit

Recommended Posts

Hi there!

Some of you are using XpKiller's Chat, GUID, Stats and Mapstats Logger ( https://forum.myrcon.com/showthread.php?6698 ). For this plugin you may setup a Stats webpage for XpKiller's Stats Logger Plugin ( https://forum.myrcon.com/showthread.php?6854 ). This looks awesome !!! Just check it: http://cnpc.org.pl/stats/

For those who are using stats page I have "developed" two small changes:

file: root/index.php

Find:

<?php
// server stats page by Ty_ger07 at http://open-web-community.com/

// DON'T EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING

Add after:

//timezone fix
date_default_timezone_set('Europe/Warsaw');

Please refer to PHP valid timezones and use it at your discrettion. Not going after that fix may cause PHP errors on several pages.

file: root/common/player.php

FIND:

<tr>
<td width="33%" style="text-align: center"><font class="information">Battlelog Stats: </font><a href="http://battlelog.battlefield.com/bf4/user/' . $SoldierName . '" target="_blank">www.Battlelog.Battlefield.com</a></td>
<td width="33%" style="text-align: center"><font class="information">BF4 Stats: </font><a href="http://bf4stats.com/pc/' . $SoldierName . '" target="_blank">www.BF4stats.com</a></td>
<td width="33%" style="text-align: center"><font class="information">Metabans: </font><a href="http://metabans.com/search/' . $SoldierName . '" target="_blank">www.Metabans.com</a></td>
</tr>

REPLACE WITH:

<tr>
<td width="25%" style="text-align: center"><font class="information">Battlelog Stats: </font><a href="http://battlelog.battlefield.com/bf4/user/' . $SoldierName . '" target="_blank">www.Battlelog.Battlefield.com</a></td>
<td width="25%" style="text-align: center"><font class="information">BF4 Stats: </font><a href="http://bf4stats.com/pc/' . $SoldierName . '" target="_blank">www.BF4stats.com</a></td>
<td width="25%" style="text-align: center"><font class="information">Metabans: </font><a href="http://metabans.com/search/' . $SoldierName . '" target="_blank">www.Metabans.com</a></td>';
$Find_guid = @mysqli_query($BF4stats,"
SELECT `PBGUID`
FROM `tbl_playerdata`
WHERE `PlayerID` = {$PlayerID}
AND `GameID` = {$GameID}
");
if (@mysqli_num_rows($Find_guid) == 1)
{
$PlayerPB = @mysqli_fetch_assoc($Find_guid);
$PbGuid = $PlayerPB['PBGUID'];
echo '<td width="25%" style="text-align: center"><font class="information">Gametracker PB: </font><a href="http://www.gametracker.com/server_info/173.199.83.18:30000/punkbuster/?query=' . $PbGuid . '&submit=Search+by+GUID" target="_blank">www.GameTracker.com</a></td>';
}
else
{
echo '<td width="25%" style="text-align: center"><font class="information">Gametracker PB: </font><a href="http://www.gametracker.com/server_info/173.199.83.18:30000/punkbuster/?query=' . $SoldierName . '&submit=Search+by+Name" target="_blank">www.GameTracker.com</a></td>';
}
echo '</tr>

FIND:

}
?>

ADD BEFORE:

// free up PB guid query memory
@mysqli_free_result($Find_guid);

This will add a gametracker PB screens search link on right side of MetaBans link at player detailed stats page. This also overrides PBguid search link with player name search link, if player is not recorded on database.

Updraded player.php file is downloadable form: http://cnpc.org.pl/stats/player.rar

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.