Jump to content

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


tyger07

Recommended Posts

  • 4 weeks later...
  • Replies 1.7k
  • Created
  • Last Reply

Originally Posted by Armymech*:

 

Thanks for the help ty_ger07,

 

I had an issue that was giving me an error. I had placed my web address into the host spot. Seeing as how my database and website are together Ty_ger instructed me to remove the website as the host and replace it with localhost. I did as instructed and all works well now. thanks a ton Ty_ger.

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

Originally Posted by ty_ger07*:

 

I am working on creating more optimizations, speed improvements, bug fixes, and adding some more features to the BF3 and BF4 stats webpages. One of the things I am working on is adding AdKats player ban status highlighting to all places where a player name is listed.

 

Optimizing and consolidating is getting out of control. Lol.

Code:

// is adkats information available_
if($adkats_available)
{
	$Messages_q = @mysqli_query($BF3stats,"
		SELECT cl.`logDate`, cl.`logSoldierName`, TRIM(cl.`logMessage`) AS Message, cl.`logSubset`, sub.`PlayerID`, sub.`ban_status`
		FROM `tbl_chatlog` cl
		LEFT JOIN
		(
			SELECT tpd.`PlayerID`, adk.`ban_status`, tpd.`SoldierName`
			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`
			LEFT JOIN `adkats_bans` adk ON adk.`player_id` = tpd.`PlayerID`
			WHERE tpd.`GameID` = {$GameID}
			AND tsp.`ServerID` = {$ServerID}
		) sub ON sub.`SoldierName` = cl.`logSoldierName`
		WHERE cl.`ServerID` = {$ServerID}
		AND (cl.`logMessage` LIKE '%{$query}%'
		OR cl.`logSoldierName` LIKE '%{$query}%')
		ORDER BY {$rank} {$order}, `logDate` DESC
		LIMIT {$offset}, {$rowsperpage}
	");
}
else
{
	$Messages_q = @mysqli_query($BF3stats,"
		SELECT cl.`logDate`, cl.`logSoldierName`, TRIM(cl.`logMessage`) AS Message, cl.`logSubset`, sub.`PlayerID`
		FROM `tbl_chatlog` cl
		LEFT JOIN
		(
			SELECT tpd.`PlayerID`, tpd.`SoldierName`
			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` = {$ServerID}
		) sub ON sub.`SoldierName` = cl.`logSoldierName`
		WHERE cl.`ServerID` = {$ServerID}
		AND (cl.`logMessage` LIKE '%{$query}%'
		OR cl.`logSoldierName` LIKE '%{$query}%')
		ORDER BY {$rank} {$order}, `logDate` DESC
		LIMIT {$offset}, {$rowsperpage}
	");
}
A query with a LEFT JOINed sub-query which contains two INNER JOINs and an additional LEFT JOIN. Lol. Tickles me. What would that Venn diagram look like?
* Restored post. It could be that the author is no longer active.
Link to comment
  • 2 weeks later...

Originally Posted by )RAG()N*:

 

looks interesting ty_ger07.

 

I have ran into a problem with my site, a few days ago my site was website suspended for a couple days and now it buck up and running when I go to the stats page all I get is the background pic, no stats or any writing at all the the page.

The plugin for the server is running find I have double checked the config file and it all looks find.

 

I also tried uploading a fresh copy of the site and it still done the same thing. any ideas ?

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

Originally Posted by ty_ger07*:

 

Sorry, I have no idea. I have to assume that there must be a web server issue with your PHP configuration. Are other php webpages working fine? Did the PHP version get downgraded or updated during the process?

If PHP was functioning properly and if there were a problem encountered with my stats page, it should always at least display some sort of error message.

 

If you create a PHP file on your webserver called test.php and type this in the file, what do you see when you open it in your browser?

Code:

<_php
phpinfo();
_>
A bunch of php information? A blank page? An error message?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

For information only....

 

I am working on creating more optimizations, speed improvements, bug fixes, and adding some more features to the BF3 and BF4 stats webpages. One of the things I am working on is adding AdKats player ban status highlighting to all places where a player name is listed.

 

...

On 11-26-2016, I posted this update to the BF3 stats page code:

Updated posted.

 

Changes:

- Added basic AdKats integration to highlight a player if they are banned or warned.

- Optimizations and improvements.

Sorry, but those above optimizations, improvements, and added features are not yet rolled over into this BF4 stats page. The BF3 and BF4 stats pages are essentially identical in many ways, but different in other ways and I don't want to accidentally break stuff by being in a hurry and merely copying and pasting code between the two. It will take me some time (when I have time) to carefully bring the above changes into this BF4 stats page.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by )RAG()N*:

 

Sorry, I have no idea. I have to assume that there must be a web server issue with your PHP configuration. Are other php webpages working fine? Did the PHP version get downgraded or updated during the process?

If PHP was functioning properly and if there were a problem encountered with my stats page, it should always at least display some sort of error message.

 

If you create a PHP file on your webserver called test.php and type this in the file, what do you see when you open it in your browser?

Code:

<_php
phpinfo();
_>
A bunch of php information? A blank page? An error message?
I'm getting a bunch of info starting with "PHP Version 5.6.24"
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by GR101*:

 

Currently using version: 8-29-2016

 

Getting the following error message on main page:-

 

Warning: Missing argument 5 for session_count(), called in /home/content/13/8915213/html/.com/bf4stats/index.php on line 307 and defined in /home/content/13/8915213/html/.com/bf4stats/common/functions.php on line 1450

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

Originally Posted by ty_ger07*:

 

Currently using version: 8-29-2016

 

Getting the following error message on main page:-

 

Warning: Missing argument 5 for session_count(), called in /home/content/13/8915213/html/.com/bf4stats/index.php on line 307 and defined in /home/content/13/8915213/html/.com/bf4stats/common/functions.php on line 1450

Ok?

Code:

$ses = session_count($userip,$ServerID,$valid_ids,$GameID,$BF4stats);
Code:
function session_count($userip, $ServerID, $valid_ids, $GameID, $BF4stats)
They both have the same 5 arguments. I don't see one missing. I don't understand.

 

It looks like you are using index.php version 8-29-16 but using ./common/functions.php version 8-28-16 or older.

 

Make sure that all your files are updated to the same version.

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

Originally Posted by ty_ger07*:

 

I think I might of found the problem but have no idea on how to fix it.

 

For some reason my host does not have mysqli enabled.

That is possible.

 

The mysqli extension is the improved and preferred version of the mysql extension. The mysqli extension became completely standard by php version 5.3.0. I would ask your server host why they aren't staying up to date. Yiu have php version 5.6.24; why would they disable or not include the mysqli extension?

 

You could edit the code to use the mysql extension instead of the mysqli extension.

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

Originally Posted by thunderje*:

 

hi guys

can anyone help with this error I'm getting

 

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

If you are the administrator, please seek assistance here.

Error: php_network_getaddresses: getaddrinfo failed: Name or service not known

 

Attached Files:

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

Originally Posted by ty_ger07*:

 

I believe that error means that you provided the wrong URL as your database host in config.php.

 

What did you enter as "host" in the following area?

Code:

DEFINE('HOST', '');
It should be something like:

Code:

DEFINE('HOST', 'localhost');
or

 

Code:

DEFINE('HOST', '192.168.1.1');
It should NOT be something like:

 

Code:

DEFINE('HOST', 'my gaming provider');
or

 

Code:

DEFINE('i3d', 'my gaming provider');
or anything like that.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by GR101*:

 

Ok?

Code:

$ses = session_count($userip,$ServerID,$valid_ids,$GameID,$BF4stats);
Code:
function session_count($userip, $ServerID, $valid_ids, $GameID, $BF4stats)
They both have the same 5 arguments. I don't see one missing. I don't understand.

 

It looks like you are using index.php version 8-29-16 but using ./common/functions.php version 8-28-16 or older.

 

Make sure that all your files are updated to the same version.

Season's Greetings.

 

I fixed it by deleting destination files and uploading latest files. Thanks for the support.

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

Originally Posted by ty_ger07*:

 

hi TY

i entered ogv.site.nfoservers.com for host

That is definitely not correct.

 

I entered ogv.site.nfoservers.com into my browser and that is your stats website address. You are creating a network loop from the web server, out to the world wide web, to the DNS agent, and back to itself? Try 'localhost' instead, or ask nfo servers what your database address is, or figure out the database address based on the database address displayed in phpmyadmin.

 

The below attachment is an example of how to figure out the database address by using phpmyadmin.

 

db.jpg

 

In example above, the correct host address to enter would be '50.63.226.53'; entered as:

Code:

DEFINE('HOST', '50.63.226.53');
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

all is good now ty_ger07

one other question, how can I change the background on the main page, thank you for the help

The image is located at:

http://ogv.site.nfoservers.com/commo...es/BF4back.jpg

 

Replace that image with whichever image you desire.

 

Additionally, you have more control over the appearance by modifying the stylesheet.

http://ogv.site.nfoservers.com/common/stats.css

 

For example, this section:

Code:

/* body and background */
body{
	margin: 0px 0px 0px 0px;
	padding: 0;
	text-align: left;
	height: 100%;
	width: 100%;
	background: #4d5d5d;
	background-image: url("./images/BF4back.jpg");
	background-position: center 142px;
	background-repeat: no-repeat;
	background-attachment: fixed;
	font-family: Arial, Arial, Arial, sans-serif;
	font-size: 14px;
	font-weight: normal;
	color: #BBBBBB;
}
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

all is good now ty_ger07

one other question, how can I change the background on the main page, thank you for the help

Umm.... down towards the bottom of your webpage:

 

[ ] [ ]

Ok? Is there a reason why you like to use people's hours or years of work for free and not give them the credit they deserve?

 

Get lost!

 

Your site is unusable due to your poor editing and poor choices. It is unreadable and has a 404 error.

 

Compare:

useless.jpgopacity.jpg

 

Maybe you would rather force your clan members' names in your visitors' faces instead of giving your visitors a webpage they can actually read and use.

 

Have a good day. Don't bother posting or responding here any more. You can try; in such a case, maybe someone else will help.

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

Originally Posted by Wurmfutter*:

 

Hello Tyger,

 

thanks for publishing this ready-to-go stats webpage! We are using it here:

http://alte-knochen.de/index.php_p=home&sid=1

 

Now my question - could you add an extra section in future versions where we can add custom text, like server rules or -announcements?

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

Originally Posted by ty_ger07*:

 

Hello Tyger,

 

thanks for publishing this ready-to-go stats webpage! We are using it here:

http://alte-knochen.de/index.php_p=home&sid=1

 

Now my question - could you add an extra section in future versions where we can add custom text, like server rules or -announcements?

My stats page is not a CMS (content management system). It has no administrative login or configuration control panel. Yes, those types of features could be added, but I have little interest in adding those types of features at the moment for something which is a hobby and creates virtually no income.

 

I would recommend editing the HTML content to suite your needs.

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

Originally Posted by ty_ger07*:

 

Is there anyone who thinks that displaying the server IP address in the server banner image is a security issue? I figured that it may be a security issue enabling script kiddies to do low-life DoS attacks against the server. But I also figured that it makes no difference since any real cracker with any real network knowledge can easily figure out the server's IP address simply by playing in the server for a couple seconds.

 

Thoughts? Should the server IP address information be removed from the stats page? Or does it make no difference?

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

Originally Posted by GR101*:

 

Is there anyone who thinks that displaying the server IP address in the server banner image is a security issue? I figured that it may be a security issue enabling script kiddies to do low-life DoS attacks against the server. But I also figured that it makes no difference since any real cracker with any real network knowledge can easily figure out the server's IP address simply by playing in the server for a couple seconds.

 

Thoughts? Should the server IP address information be removed from the stats page? Or does it make no difference?

Could you remove IP address as this has been removed from Battlelog after a lot of complaints?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Could you remove IP address as this has been removed from Battlelog after a lot of complaints?

It is a valid fear even though a person could figure out the game server's IP address within seconds of connecting to the game server; and there is no way to prevent that from happening?

 

Like Battlelog did, I will probably remove the IP addresses just to make people happy. Even though I know that it makes zero difference.

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




×
×
  • 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.