Jump to content

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


tyger07

Recommended Posts

Originally Posted by scarecr0w12*:

 

Is there anyway to have this only report stats per the month. So basically it would only show stats from Feburary 1st-28th, and then start fresh the next month, or more preferably, show all-time stats aswell as per-month.

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

Originally Posted by ty_ger07*:

 

Is there anyway to have this only report stats per the month. So basically it would only show stats from Feburary 1st-28th, and then start fresh the next month, or more preferably, show all-time stats aswell as per-month.

This is something only XpKiller's plugin can do. My stats page cannot control the information saved in the database.

 

The only way for XpKiller's plugin to log one month worth of data is if you delete all the data every month and start over. There is no way to retrieve only one month worth of stats. Session stats can be collected over a specified period of time, but session stats are quite inaccurate and very incomplete (no weapon stats, maps stats, dog tags, etc in session stats).

 

Another clan has already done what you are interested in doing.

 

What they did:

You need two instances of XpKiller's plugin running at the same time and saving to separate databases. One database you empty every month to reset a months worth of data, and the other one you let build up data without resetting it.

 

To run two separate instances of XpKiller's plugin, you need to either:

1) run each instance of the plugin on a separate machine/layer

or

2) rename the plugin and some data inside the plugin so that it appears to your layer server as if they are two different plugins.

 

If you want to try this solution and need help with option #2, let us know.

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

Originally Posted by ty_ger07*:

 

i added the banner as standard bbcode since our "news" plugin can use that

our page is powered by ILCH clan script (if thats what you meant by "engine")

This means that your site's BBcode wasn't passing on the query string values to the image output.

 

Since you file_get_contents is now working for you, it isn't anything you need to be concerned of.

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

Originally Posted by Killermike007*:

 

I become this error,

 

"The game 'BF4' was not found in this database! Please notify this website's administrator.

 

If you are the administrator, please seek assistance here."

 

What does it wrong?

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

Originally Posted by ty_ger07*:

 

I become this error,

 

"The game 'BF4' was not found in this database! Please notify this website's administrator.

 

If you are the administrator, please seek assistance here."

 

What does it wrong?

Are you using XpKiller's plugin version 1.0.0.2? Is the plugin working and can you get your stats in the game with no problem? Is your server a BF4 server?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Killermike007*:

 

Are you using XpKiller's plugin version 1.0.0.2? Is the plugin working and can you get your stats in the game with no problem? Is your server a BF4 server?

Plugin Version is BF3 Chat, GUID, Stats and Map Logger - 1.1.0.1

plugin works, i can get stats ingame

Yes BF4 server

 

Gameserver, Proco-Layer and SQL all on gamed.de

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

Originally Posted by ColColonCleaner*:

 

1.0.0.2

 

That's why it isn't working. See the preresequites in the first post.

Those old versions really need to be moved to a reference-only/replaced forum section so people stop downloading incorrect versions for new installs. Obviously still keep the threads around for support but they need to be moved out of the main section if the original author has a working replacement.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by scarecr0w12*:

 

This is something only XpKiller's plugin can do. My stats page cannot control the information saved in the database.

 

The only way for XpKiller's plugin to log one month worth of data is if you delete all the data every month and start over. There is no way to retrieve only one month worth of stats. Session stats can be collected over a specified period of time, but session stats are quite inaccurate and very incomplete (no weapon stats, maps stats, dog tags, etc in session stats).

 

Another clan has already done what you are interested in doing.

 

What they did:

You need two instances of XpKiller's plugin running at the same time and saving to separate databases. One database you empty every month to reset a months worth of data, and the other one you let build up data without resetting it.

 

To run two separate instances of XpKiller's plugin, you need to either:

1) run each instance of the plugin on a separate machine/layer

or

2) rename the plugin and some data inside the plugin so that it appears to your layer server as if they are two different plugins.

 

If you want to try this solution and need help with option #2, let us know.

Right on, thanks for the tip there, i should be able to handle the editing myself, but if i do need help i'll give a shout.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ChironeX-BF3*:

 

Hello,

 

I am using this page for our BF3 server, most of the time the "signature" with player's favorite weapon aren't working so i was wondering if someone could help to change this:

 

Capture2.JPG

 

To:

 

Capture.JPG

 

I tried to edit it myself on the player.php but i am not able to do it :sad:

 

Thank you

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

Originally Posted by ty_ger07*:

 

Hello,

 

I am using this page for our BF3 server, most of the time the "signature" with player's favorite weapon aren't working so i was wondering if someone could help to change this:

 

Capture2.JPG

 

To:

 

Capture.JPG

 

I tried to edit it myself on the player.php but i am not able to do it :sad:

 

Thank you

You just want to remove the broken one completely? By the way, the reason the right one is broken is because the BF3 weapon image is missing.

 

To remove the right one, in ./common/player/player.php, change this:

Code:

// show signature images
		echo '
		</div>
		<table class="prettytable">
		<tr>
		<td class="tablecontents" style="text-align: left; padding: 20px;" valign="top" width="50%">
		Stats image with player\'s rank:
		';
		// include signature.php image
		echo '
		<a href="' . $host . $file . '_p=player&pid=' . $PlayerID . '" target="_blank"><img src="./common/signature/signature.png_pid=' . $PlayerID . '" style="height: 100px; width: 400px;" alt="signature" /></a>
		
		<span class="information">BBcode:</span>
		
		<table class="prettytable">
		<tr>
		<td class="tablecontents">
		<span style="font-size: 10px;">[url=http://.%20%24host%20.%20%24file%20.%20%26#39%3B_p%3Dplayer%26amp%3Bpid%3D%26#39%3B%20.%20%24PlayerID%20.][img=' . $host . $dir . '/common/signature/signature.png_pid=' . $PlayerID . '][/url]</span>
		</td>
		</tr>
		</table>
		</td>
		<td class="tablecontents" style="text-align: left; padding: 20px;" valign="top" width="50%">
		Stats image with player\'s favorite weapon:
		';
		// include signature.php image
		echo '
		<a href="' . $host . $file . '_p=player&pid=' . $PlayerID . '" target="_blank"><img src="./common/signature/signature.png_pid=' . $PlayerID . '&fav=1" style="height: 100px; width: 400px;" alt="signature" /></a>
		
		<span class="information">BBcode:</span>
		
		<table class="prettytable">
		<tr>
		<td class="tablecontents">
		<span style="font-size: 10px;">[url=http://.%20%24host%20.%20%24file%20.%20%26#39%3B_p%3Dplayer%26amp%3Bpid%3D%26#39%3B%20.%20%24PlayerID%20.][img=' . $host . $dir . '/common/signature/signature.png_pid=' . $PlayerID . '&fav=1][/url]</span>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		';
to this:

Code:

// show signature images
		echo '
		</div>
		<table class="prettytable">
		<tr>
		<td class="tablecontents" style="text-align: left; padding: 20px;" valign="top" width="100%">
		Stats image with player\'s rank:
		';
		// include signature.php image
		echo '
		<a href="' . $host . $file . '_p=player&pid=' . $PlayerID . '" target="_blank"><img src="./common/signature/signature.png_pid=' . $PlayerID . '" style="height: 100px; width: 400px;" alt="signature" /></a>
		
		<span class="information">BBcode:</span>
		
		<table class="prettytable">
		<tr>
		<td class="tablecontents">
		<span style="font-size: 10px;">[url=http://.%20%24host%20.%20%24file%20.%20%26#39%3B_p%3Dplayer%26amp%3Bpid%3D%26#39%3B%20.%20%24PlayerID%20.][img=' . $host . $dir . '/common/signature/signature.png_pid=' . $PlayerID . '][/url]</span>
		</td>
		</tr>
		</table>
		</td>
		</tr>
		</table>
		';
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

How can I change CN team to US team (live mode)?

The team names are specified in ./common/home/scoreboard-live.php.

 

Code:

// change team name displayed on scoreboard based on team number and game mode
if(($mode == 'ConquestLarge0') OR ($mode == 'ConquestSmall0') OR ($mode == 'Domination0') OR ($mode == 'Elimination0') OR ($mode == 'Obliteration') OR ($mode == 'TeamDeathMatch0') OR ($mode == 'AirSuperiority0') OR ($mode == 'CaptureTheFlag0'))
{
	if($this_team == 1)
	{
		if(($map == 'MP_Abandoned') OR ($map == 'MP_Damage') OR ($map == 'MP_Journey') OR ($map == 'MP_TheDish'))
		{
			$team_name = 'RU Army';
		}
		elseif(($map == 'MP_Flooded') OR ($map == 'MP_Naval') OR ($map == 'MP_Prison') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'US Army';
		}
		else
		{
			$team_name = 'US Army';
		}
	}
	elseif($this_team == 2)
	{
		if($map == 'MP_Abandoned')
		{
			$team_name = 'US Army';
		}
		elseif(($map == 'MP_Damage') OR ($map == 'MP_Flooded') OR ($map == 'MP_Journey') OR ($map == 'MP_Naval') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_TheDish') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront'))
		{
			$team_name = 'CN Army';
		}
		elseif(($map == 'MP_Prison') OR ($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'RU Army';
		}
		else
		{
			$team_name = 'CN Army';
		}
	}
	// something unexpected occurred and a correct team name was not found
	// just name the team based on team number instead
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif($mode == 'RushLarge0')
{
	if($this_team == 1)
	{
		if(($map == 'MP_Abandoned') OR ($map == 'MP_Damage') OR ($map == 'MP_Flooded') OR ($map == 'MP_Journey') OR ($map == 'MP_Naval') OR ($map == 'MP_Prison') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_TheDish') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'US Attackers';
		}
		else
		{
			$team_name = 'Attackers';
		}
	}
	elseif($this_team == 2)
	{
		if(($map == 'MP_Abandoned') OR ($map == 'MP_Damage') OR ($map == 'MP_Flooded') OR ($map == 'MP_Journey') OR ($map == 'MP_Naval') OR ($map == 'MP_Prison') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_TheDish') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront'))
		{
			$team_name = 'CN Defenders';
		}
		elseif(($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'RU Defenders';
		}
		else
		{
			$team_name = 'Defenders';
		}
	}
	// something unexpected occurred and a correct team name was not found
	// just name the team based on team number instead
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif(($mode == 'SquadDeathMatch0'))
{
	if($this_team == 1)
	{
		$team_name = 'Alpha';
	}
	elseif($this_team == 2)
	{
		$team_name = 'Bravo';
	}
	elseif($this_team == 3)
	{
		$team_name = 'Charlie';
	}
	elseif($this_team == 4)
	{
		$team_name = 'Delta';
	}
	// something unexpected occurred and a correct team name was not found
	// just name the team based on team number instead
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif(($mode == 'CarrierAssaultLarge0') OR ($mode == 'CarrierAssaultSmall0'))
{
	if($this_team == 1)
	{
		$team_name = 'US Attackers';
	}
	elseif($this_team == 2)
	{
		$team_name = 'CN Defenders';
	}
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif($mode == 'Chainlink0')
{
	if($this_team == 1)
	{
		$team_name = 'US Attackers';
	}
	elseif($this_team == 2)
	{
		$team_name = 'CN Defenders';
	}
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
// something unexpected occurred and a correct team name was not found
// just name the team based on team number instead
else
{
	$team_name = 'Team ' . $this_team;
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by UKF_HHA*:

 

The team names are specified in ./common/home/scoreboard-live.php.

 

Code:

// change team name displayed on scoreboard based on team number and game mode
if(($mode == 'ConquestLarge0') OR ($mode == 'ConquestSmall0') OR ($mode == 'Domination0') OR ($mode == 'Elimination0') OR ($mode == 'Obliteration') OR ($mode == 'TeamDeathMatch0') OR ($mode == 'AirSuperiority0') OR ($mode == 'CaptureTheFlag0'))
{
	if($this_team == 1)
	{
		if(($map == 'MP_Abandoned') OR ($map == 'MP_Damage') OR ($map == 'MP_Journey') OR ($map == 'MP_TheDish'))
		{
			$team_name = 'RU Army';
		}
		elseif(($map == 'MP_Flooded') OR ($map == 'MP_Naval') OR ($map == 'MP_Prison') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'US Army';
		}
		else
		{
			$team_name = 'US Army';
		}
	}
	elseif($this_team == 2)
	{
		if($map == 'MP_Abandoned')
		{
			$team_name = 'US Army';
		}
		elseif(($map == 'MP_Damage') OR ($map == 'MP_Flooded') OR ($map == 'MP_Journey') OR ($map == 'MP_Naval') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_TheDish') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront'))
		{
			$team_name = 'CN Army';
		}
		elseif(($map == 'MP_Prison') OR ($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'RU Army';
		}
		else
		{
			$team_name = 'CN Army';
		}
	}
	// something unexpected occurred and a correct team name was not found
	// just name the team based on team number instead
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif($mode == 'RushLarge0')
{
	if($this_team == 1)
	{
		if(($map == 'MP_Abandoned') OR ($map == 'MP_Damage') OR ($map == 'MP_Flooded') OR ($map == 'MP_Journey') OR ($map == 'MP_Naval') OR ($map == 'MP_Prison') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_TheDish') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'US Attackers';
		}
		else
		{
			$team_name = 'Attackers';
		}
	}
	elseif($this_team == 2)
	{
		if(($map == 'MP_Abandoned') OR ($map == 'MP_Damage') OR ($map == 'MP_Flooded') OR ($map == 'MP_Journey') OR ($map == 'MP_Naval') OR ($map == 'MP_Prison') OR ($map == 'MP_Resort') OR ($map == 'MP_Siege') OR ($map == 'MP_TheDish') OR ($map == 'MP_Tremors') OR ($map == 'XP1_001') OR ($map == 'XP1_002') OR ($map == 'XP1_003') OR ($map == 'XP1_004') OR ($map == 'XP3_MarketPl') OR ($map == 'XP3_Prpganda') OR ($map == 'XP3_UrbanGdn') OR ($map == 'XP3_WtrFront'))
		{
			$team_name = 'CN Defenders';
		}
		elseif(($map == 'XP0_Caspian') OR ($map == 'XP0_Firestorm') OR ($map == 'XP0_Metro') OR ($map == 'XP0_Oman') OR ($map == 'XP2_001') OR ($map == 'XP2_002') OR ($map == 'XP2_003') OR ($map == 'XP2_004') OR ($map == 'XP4_Arctic') OR ($map == 'XP4_SubBase') OR ($map == 'XP4_Titan') OR ($map == 'XP4_Wlkrftry'))
		{
			$team_name = 'RU Defenders';
		}
		else
		{
			$team_name = 'Defenders';
		}
	}
	// something unexpected occurred and a correct team name was not found
	// just name the team based on team number instead
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif(($mode == 'SquadDeathMatch0'))
{
	if($this_team == 1)
	{
		$team_name = 'Alpha';
	}
	elseif($this_team == 2)
	{
		$team_name = 'Bravo';
	}
	elseif($this_team == 3)
	{
		$team_name = 'Charlie';
	}
	elseif($this_team == 4)
	{
		$team_name = 'Delta';
	}
	// something unexpected occurred and a correct team name was not found
	// just name the team based on team number instead
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif(($mode == 'CarrierAssaultLarge0') OR ($mode == 'CarrierAssaultSmall0'))
{
	if($this_team == 1)
	{
		$team_name = 'US Attackers';
	}
	elseif($this_team == 2)
	{
		$team_name = 'CN Defenders';
	}
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
elseif($mode == 'Chainlink0')
{
	if($this_team == 1)
	{
		$team_name = 'US Attackers';
	}
	elseif($this_team == 2)
	{
		$team_name = 'CN Defenders';
	}
	else
	{
		$team_name = 'Team ' . $this_team;
	}
}
// something unexpected occurred and a correct team name was not found
// just name the team based on team number instead
else
{
	$team_name = 'Team ' . $this_team;
}
Thanks buddy
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

is there a function to reset the whole leaderboard or do i have to delte the stats db?

The stats page just shows what is in the database. If you want to reset everything, you have to do it in the database by emptying the tables.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ChironeX-BF3*:

 

Thank you ty_ger07 :ohmy:

 

You just want to remove the broken one completely? By the way, the reason the right one is broken is because the BF3 weapon image is missing.

I took every BF3 weapon and replaced them on the /common/images/weapons folder :/
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Thank you ty_ger07 :ohmy:

 

I took every BF3 weapon and replaced them on the /common/images/weapons folder :/

Some name must be wrong in ./common/constants.php or some image must be missing. The image name in constants.php has to exactly match the image file name.

 

constants.php says:

// make an array of weapon names

// the left value is the name which will be displayed on the stats page

// the image filename in /images/weapons/ must match the right value for each weapon (otherwise the image will appear broken)

What it doesn't say is that the right value is the name of the weapon in the database. I guess I assumed that it would be clear. The right value is the name of the weapon in the database AND should be the exact name of the weapon image in /images/weapons/. The only exception to that rule is the "VehicleCustom" array values which can be either the weapon name in the database or the weapon category in the database in different circumstances. But you won't be worrying about vehicle stats in BF3 (since there are no vehicle stats in BF3), so you don't have to worry about the "VehicleCustom" exception.
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by DevilOmaxe*:

 

Hello, Thanks for this Awesome Plugin and Web Page..

 

I am a complete noob in this stuff and i need some help regarding this..

I want to know if Database actually saves the "Time Played" on the server? If yes how can i possibly make it appear on the Leaderboards instead of HS/K?

 

If Time Played is not possible to Display then i want to know a method to Display "Rounds Played" on Leaderboards.

 

Please help me with this.

 

DevilOmaxe

Battlefield India

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

Originally Posted by ty_ger07*:

Time played is saved in the database, but the number saved is very inaccurate.

Rounds played is also saved and used to be displayed, but was removed from the leaderboard because it isn't a very important number and was decreasing performance needlessly.

How do you add it to the leaderboard?  You would need to edit ./common/leaders/leaders.php.

https://github.com/tyger07/BF4-Serve...rs/leaders.php

Some things to pay attention to:

Code:

// get current rank query details
if(!empty($rank))
{
    // filter out SQL injection
    if($rank != 'SoldierName' AND $rank != 'Score' AND $rank != 'Kills' AND $rank != 'KDR' AND $rank != 'HSR')
    {
        // unexpected input detected
        // use default instead
        $rank = 'Score';
    }
}
Above, you would need to add whatever else you want as a valid input of $rank, otherwise it would ignore it.

Code:
elseif(!empty($player))
{
    // if there is a ServerID, this is a server stats page
    if(!empty($ServerID))
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, tps.`Score`, tps.`Kills`, (tps.`Kills`/tps.`Deaths`) AS KDR, (tps.`Headshots`/tps.`Kills`) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tsp.`ServerID` = {$ServerID}
            AND tpd.`GameID` = {$GameID}
            AND tpd.`SoldierName` LIKE '%{$player}%'
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT 10
        ");
    }
    // or else this is a global stats page
    else
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, SUM(tps.`Score`) AS Score, SUM(tps.`Kills`) AS Kills, (SUM(tps.`Kills`)/SUM(tps.`Deaths`)) AS KDR, (SUM(tps.`Headshots`)/SUM(tps.`Kills`)) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tpd.`GameID` = {$GameID}
            AND tsp.`ServerID` IN ({$valid_ids})
            AND tpd.`SoldierName` LIKE '%{$player}%'
            GROUP BY tpd.`PlayerID`
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT 10
        ");
    }
}
// or else just display every player the normal way
else
{
    // if there is a ServerID, this is a server stats page
    if(!empty($ServerID))
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, tps.`Score`, tps.`Kills`, (tps.`Kills`/tps.`Deaths`) AS KDR, (tps.`Headshots`/tps.`Kills`) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tsp.`ServerID` = {$ServerID}
            AND tpd.`GameID` = {$GameID}
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT {$offset}, {$rowsperpage}
        ");
    }
    // or else this is a global stats page
    else
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, SUM(tps.`Score`) AS Score, SUM(tps.`Kills`) AS Kills, (SUM(tps.`Kills`)/SUM(tps.`Deaths`)) AS KDR, (SUM(tps.`Headshots`)/SUM(tps.`Kills`)) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tpd.`GameID` = {$GameID}
            AND tsp.`ServerID` IN ({$valid_ids})
            GROUP BY tpd.`PlayerID`
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT {$offset}, {$rowsperpage}
        ");
    }
}
Above, you need to add additional field(s) to the sql queries.

Code:
<table class="prettytable" style="margin-top: -2px;">
    <tr>
    <th width="5%" class="countheader">#</th>
    ';
    // player column
    pagination_headers('Player',$ServerID,'leaders','19','r',$rank,'SoldierName','o',$order,'ASC',$nextorder,$currentpage,'',$player,'');
    // score column
    pagination_headers('Score',$ServerID,'leaders','19','r',$rank,'Score','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    // kills column
    pagination_headers('Kills',$ServerID,'leaders','19','r',$rank,'Kills','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    // kdr column
    pagination_headers('Kill / Death',$ServerID,'leaders','19','r',$rank,'KDR','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    // hsr column
    pagination_headers('Headshot / Kill',$ServerID,'leaders','19','r',$rank,'HSR','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    echo '
    </tr>
    </table>
Above, you need to add the additional field(s) to the table header.

Code:
<table class="prettytable" style="margin-top: -2px; position: relative;">
            <tr>
                <td width="5%" class="count">
                    <div style="position: absolute; z-index: 2; width: 100%; height: 100%; top: 0; left: 0; padding: 0px; margin: 0px;">
                        <a class="fill-div" style="padding: 0px; margin: 0px;" href="' . $link . '"></a>
                    </div>
                    <span class="information">' . $count . '</span>
                </td>
                <td width="19%" class="tablecontents"><a href="' . $link . '">' . $SoldierName . '</a></td>
                <td width="19%" class="tablecontents">' . $Score . '</td>
                <td width="19%" class="tablecontents">' . $Kills . '</td>
                <td width="19%" class="tablecontents">' . $KDR . '</td>
                <td width="19%" class="tablecontents">' . $HSR . '<span class="information"> %</span></td>
            </tr>
        </table>
Lastly, above, you need to add the additional field(s) to the output.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by DevilOmaxe*:

 

Time played is saved in the database, but the number saved is very inaccurate.

Rounds played is also saved and used to be displayed, but was removed from the leaderboard because it isn't a very important number and was decreasing performance needlessly.

How do you add it to the leaderboard?  You would need to edit ./common/leaders/leaders.php.

https://github.com/tyger07/BF4-Serve...rs/leaders.php

Some things to pay attention to:

Code:
// get current rank query details
if(!empty($rank))
{
    // filter out SQL injection
    if($rank != 'SoldierName' AND $rank != 'Score' AND $rank != 'Kills' AND $rank != 'KDR' AND $rank != 'HSR')
    {
        // unexpected input detected
        // use default instead
        $rank = 'Score';
    }
}
Above, you would need to add whatever else you want as a valid input of $rank, otherwise it would ignore it.

Code:
elseif(!empty($player))
{
    // if there is a ServerID, this is a server stats page
    if(!empty($ServerID))
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, tps.`Score`, tps.`Kills`, (tps.`Kills`/tps.`Deaths`) AS KDR, (tps.`Headshots`/tps.`Kills`) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tsp.`ServerID` = {$ServerID}
            AND tpd.`GameID` = {$GameID}
            AND tpd.`SoldierName` LIKE '%{$player}%'
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT 10
        ");
    }
    // or else this is a global stats page
    else
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, SUM(tps.`Score`) AS Score, SUM(tps.`Kills`) AS Kills, (SUM(tps.`Kills`)/SUM(tps.`Deaths`)) AS KDR, (SUM(tps.`Headshots`)/SUM(tps.`Kills`)) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tpd.`GameID` = {$GameID}
            AND tsp.`ServerID` IN ({$valid_ids})
            AND tpd.`SoldierName` LIKE '%{$player}%'
            GROUP BY tpd.`PlayerID`
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT 10
        ");
    }
}
// or else just display every player the normal way
else
{
    // if there is a ServerID, this is a server stats page
    if(!empty($ServerID))
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, tps.`Score`, tps.`Kills`, (tps.`Kills`/tps.`Deaths`) AS KDR, (tps.`Headshots`/tps.`Kills`) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tsp.`ServerID` = {$ServerID}
            AND tpd.`GameID` = {$GameID}
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT {$offset}, {$rowsperpage}
        ");
    }
    // or else this is a global stats page
    else
    {
        // get the info from the db
        $Players_q  = @mysqli_query($BF4stats,"
            SELECT tpd.`SoldierName`, tpd.`PlayerID`, SUM(tps.`Score`) AS Score, SUM(tps.`Kills`) AS Kills, (SUM(tps.`Kills`)/SUM(tps.`Deaths`)) AS KDR, (SUM(tps.`Headshots`)/SUM(tps.`Kills`)) AS HSR
            FROM `tbl_playerdata` tpd
            INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
            INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
            WHERE tpd.`GameID` = {$GameID}
            AND tsp.`ServerID` IN ({$valid_ids})
            GROUP BY tpd.`PlayerID`
            ORDER BY {$rank} {$order}, tpd.`SoldierName` {$nextorder}
            LIMIT {$offset}, {$rowsperpage}
        ");
    }
}
Above, you need to add additional field(s) to the sql queries.

Code:
<table class="prettytable" style="margin-top: -2px;">
    <tr>
    <th width="5%" class="countheader">#</th>
    ';
    // player column
    pagination_headers('Player',$ServerID,'leaders','19','r',$rank,'SoldierName','o',$order,'ASC',$nextorder,$currentpage,'',$player,'');
    // score column
    pagination_headers('Score',$ServerID,'leaders','19','r',$rank,'Score','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    // kills column
    pagination_headers('Kills',$ServerID,'leaders','19','r',$rank,'Kills','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    // kdr column
    pagination_headers('Kill / Death',$ServerID,'leaders','19','r',$rank,'KDR','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    // hsr column
    pagination_headers('Headshot / Kill',$ServerID,'leaders','19','r',$rank,'HSR','o',$order,'DESC',$nextorder,$currentpage,'',$player,'');
    echo '
    </tr>
    </table>
Above, you need to add the additional field(s) to the table header.

Code:
<table class="prettytable" style="margin-top: -2px; position: relative;">
            <tr>
                <td width="5%" class="count">
                    <div style="position: absolute; z-index: 2; width: 100%; height: 100%; top: 0; left: 0; padding: 0px; margin: 0px;">
                        <a class="fill-div" style="padding: 0px; margin: 0px;" href="' . $link . '"></a>
                    </div>
                    <span class="information">' . $count . '</span>
                </td>
                <td width="19%" class="tablecontents"><a href="' . $link . '">' . $SoldierName . '</a></td>
                <td width="19%" class="tablecontents">' . $Score . '</td>
                <td width="19%" class="tablecontents">' . $Kills . '</td>
                <td width="19%" class="tablecontents">' . $KDR . '</td>
                <td width="19%" class="tablecontents">' . $HSR . '<span class="information"> %</span></td>
            </tr>
        </table>
Lastly, above, you need to add the additional field(s) to the output.
Ok so i sorted 1, 3 and 4 are easy but i can't figure how to put 2nd one.. Also what is name for Rounds Played Queer? "RoundPlayed"?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

For some reason, it says that DevilOmaxe replied most recently today, but his post doesn't show up for me.... Huh.

I saw the same thing. I think he may have replied and then deleted his post.

 

Sent from Samsung Galaxy S5 using Tapatalk

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

Originally Posted by DevilOmaxe*:

 

For some reason, it says that DevilOmaxe replied most recently today, but his post doesn't show up for me.... Huh.

I saw the same thing. I think he may have replied and then deleted his post.

 

Sent from Samsung Galaxy S5 using Tapatalk

I repled but i think some MOD Removed my Post.

 

Coming back to Topic, Ty_ger Editing/Adding Code 1,3 and 4 seems easy but i am not sure about 2nd one.. I have hosted another Stats page on my own domain for testing but i am failing till now.. You can just say i am too bad in this.

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

Originally Posted by ty_ger07*:

 

hi

 

how do I get this working for BF3?

I am not sure how many times I can say this over and over again.

 

In ./common/connect.php, change `GameID` from 'BF4' to 'BF3'.

 

https://github.com/tyger07/BF4-Serve...on/connect.php

 

In ./common/constants.php, change map names, mode names, weapon names, and ranks as necessary.

 

https://github.com/tyger07/BF4-Serve.constants.php

 

In ./common/images/, change map images, rank images, and weapon images as necessary.

 

https://github.com/tyger07/BF4-Serve.common/images

 

Adjust elsewhere as necessary (change background image and text that says BF4 to BF3 as necessary).

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

Originally Posted by iraqiboy90*:

 

I am not sure how many times I can say this over and over again.

 

In ./common/connect.php, change `GameID` from 'BF4' to 'BF3'.

 

https://github.com/tyger07/BF4-Serve...on/connect.php

 

In ./common/constants.php, change map names, mode names, weapon names, and ranks as necessary.

 

https://github.com/tyger07/BF4-Serve.constants.php

 

In ./common/images/, change map images, rank images, and weapon images as necessary.

 

https://github.com/tyger07/BF4-Serve.common/images

 

Adjust elsewhere as necessary (change background image and text that says BF4 to BF3 as necessary).

I'm sorry lol :smile:

I already searched like over 20 pages (with the search function) before I gave up and asked...

Cant you put it on post one or two? :smile:

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

Originally Posted by clanbfb*:

 

Error!

 

WebPage

 

Unable to access stats database. Please notify this website's administrator.

 

If you are the administrator, please seek assistance here.

 

Error: Access denied for user 'clanbfb' (using password: YES)

PROCON

 

[statslogger]Error: getUpdateServerID1: MySql.Data.MySqlClient.MySqlException: Host '178.9.135.230' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

em MySql.Data.MySqlClient.MySqlStream.ReadPacket()

em MySql.Data.MySqlClient.NativeDriver.Open()

em MySql.Data.MySqlClient.Driver.Open()

em MySql.Data.MySqlClient.Driver.Create(MySqlConnecti onStringBuilder settings)

em MySql.Data.MySqlClient.MySqlPool.GetPooledConnecti on()

em MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()

em MySql.Data.MySqlClient.MySqlPool.GetConnection()

em MySql.Data.MySqlClient.MySqlConnection.Open()

em PRoConEvents.CChatGUIDStatsLogger.getUpdateServerI D(CServerInfo csiServerInfo)

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