Page 15 of 16

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 12 Jan 2012 09:13
by xefil
No, and.... yes, this is the solution. Sorry for not having found before.

Cheers!

Simon

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 19 Feb 2012 23:59
by Ant
Just a quick note to say the example stats site (infact my server stats) is temporarily unavailable due to a server move - this should hopefully be resolved soon though.

Edit: Should be ok again now :thumbsup:

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 07 Jul 2013 06:07
by twizted
You guys still around developing this?

I got it all installed and working... mostly...

I've ran into the old Server offline and php_network_getaddresses problem

Code: Select all

The Gameserver is offline at the moment!

php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
I've been looking around and searching for hours on end and I've not been able to figure it out. Please help?

Centos 6.4
Apache 2.2.15
PHP 5.3.3
MySQL 5.1.69
Stats for XAseco + RASP - Version 3.6

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 07 Jul 2013 14:29
by twizted
Disregard, I'm a moron.... I forgot to set the server address/ip in the config.php

This is what I get for trying to make this work when I'm dead tired... Got up, went over everything and bam, found it...

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 16 Aug 2013 22:09
by Ant
Only just seen this, been away for a while - glad you got it working though :thumbsup:

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 03 Sep 2013 16:31
by askuri
Another mirror, one is left. That's not enaugh for such a great tool
https://dl.dropboxusercontent.com/u/653 ... s_v3_6.zip

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 24 Oct 2013 15:22
by Nitrous
Still wondering if this will ever work for TM2

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 25 Oct 2013 05:20
by askuri
It's nothing in work afaik. Try, if it works. The only things might not work are displaying Maps on server and Planets.
Anyway, someone will need to rework this. Maybe I'll do, if I'm really bored and have nothing else to do ;)

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 29 Dec 2014 14:19
by zebu
Hello,

Maybe this thread is now inactive but I try another question :

I just installed the Website Stats plugin v3.6.

Everyhting seems to work but the ranking is very strange as you can see on the attached screenshots :

General ranking is "reversed"
Image


Track ranking is not correct, according to time
Image

I just done a fresh install and didn't modifiy anything in the configuration files but the database connection paragraph

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 30 Dec 2014 09:56
by w1lla
Doesn't seem very right to me.

If you can send me a pm with your exported .sql file of xaseco i can check and see where it is wrong.

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 30 Dec 2014 10:26
by zebu
PM sent. :)

Thanks

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 30 Dec 2014 10:46
by w1lla
K update:

Players.php in pages folder needs a update:

Copy paste the following code:

Code: Select all

<?php
require("config.php");

print "<p class=\"tabletitle\">$lng_players_headline</p>";

if (!$pos) $pos = 0;
if (is_null($orderby)) $orderby = "rank";
if (is_null($sort)) $sort = "ASC";

$sorturl = "?serv=$serv&lang=$lang&page=$page&orderby=%s&sort=".(($sort == "ASC") ? "DESC" : "ASC");

print "<table width=\"100%\" border=\"0\" bgcolor=\"$bg4\" align=\"center\">
  <tr bgcolor=\"$resultbg\">
    <td width=\"60\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "rank")."\">$lng_players_rank</a></td>
    <td width=\"150\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "NickName")."\">$lng_players_nickname</a></td>
    <td width=\"150\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Login")."\">$lng_players_login</a></td>
    <td width=\"80\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "rank")."\">$lng_players_avg</a></td>
    <td width=\"120\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "TimePlayed")."\">$lng_players_timeplayed</a></td>
	<td width=\"120\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "UpdatedAt")."\">$lng_players_lastvisit</a></td>
    <td width=\"60\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Id")."\">$lng_players_id</a></td>
    <td width=\"50\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Nation")."\">$lng_players_nation</a></td>";
    if ($show_player_banners) print "<td width=\"50\" class=\"tablehead\">$lng_players_banner</td>";
print "</tr>";

$sql = "SELECT * FROM (
			SELECT t1.*, @r:=@r+1 AS rank
			FROM (
				SELECT p.*, r.avg, r.avg IS NULL AS norank
				FROM players p
				LEFT JOIN rs_rank r ON p.Id = r.playerID
				ORDER BY norank ASC, r.avg ASC
			) t1, (SELECT @r:=0) t2
		) t3
		ORDER BY $orderby $sort
		LIMIT $pos, $count";

if ($orderby == "rank") {
	$sql = sprintf($sql, "norank $sort, $orderby $sort");
} else {
	$sql = sprintf($sql, "$orderby $sort");
}

$result = mysql_query($sql) or die(mysql_error());
$totalrows = mysql_num_rows(mysql_query("SELECT * FROM players"));

if ($totalrows < 1) {
	print "<tr><td class=\"celltext\" colspan=\"10\">No results</td></tr>";
} else {
	$new_pos_next = $pos + $count;
	$new_pos_prev = $pos - $count;
	$link_next = ($new_pos_next >= $totalrows) ? "" : "?serv=$serv&lang=$lang&page=$page&pos=$new_pos_next&orderby=$orderby&sort=$sort";
	$link_prev = ($new_pos_prev < 0) ? "" : "?serv=$serv&lang=$lang&page=$page&pos=$new_pos_prev&orderby=$orderby&sort=$sort";

	$bg = $bg1;
	while($data = mysql_fetch_array($result))
	{
		$MwTime = $data['TimePlayed'];
		$lastvisited = $data['UpdatedAt'];
		$hours = floor($MwTime/3600);
		$minutes = floor(($MwTime/60-$hours*60));
		$seconds = substr($MwTime-$minutes*60-$hours*3600,-2);
		$time = sprintf("%02dh%02dm%02ds", $hours, $minutes, $seconds);
		if (!is_null($data['avg'])) {
			$avg = sprintf ("%.1f", $data['avg']/10000);
			$rank = $data['rank'];
		} else {
			$avg = "-";
			$rank = "-";
		}
		
		

		$bg = ($bg == $bg1) ? $bg2 : $bg1;
		echo "<tr bgcolor=".$bg." onMouseOver=\"this.style.backgroundColor='".$bg3."'\" onMouseOut=\"this.style.backgroundColor='".$bg."'\">";
		echo "<td class=\"celltext\">".$rank."</td>";
		if ($stunt[$serv]){
		echo "<td class=\"celltext\"><a href=\"?serv=".$serv."&lang=".$lang."&page=stprecords&plid=".$data['Id']."\" class=\"celltext\">".$cp->toHTML($data['NickName'])."</a></td></td>";
		} else {
		echo "<td class=\"celltext\"><a href=\"?serv=".$serv."&lang=".$lang."&page=precords&plid=".$data['Id']."\" class=\"celltext\">".$cp->toHTML($data['NickName'])."</a></td></td>";
		}
		echo "<td class=\"celltext\">".$data['Login']."</td>";
		echo "<td class=\"celltext\">".$avg."</td>";
		echo "<td class=\"celltext\">".$time."</td>";
		echo "<td class=\"celltext\">".$lastvisited."</td>";
		echo "<td class=\"celltext\">".$data['Id']."</td>";
		if($data['Nation']){
			echo "<td class=\"celltext\"><img src=\"img/flags/".$data['Nation'].".png\" alt=\"".$data['Nation']."\" title=\"".$data['Nation']."\"></td>";
		} else {
			echo "<td class=\"celltext\"><img src=\"img/flags/UKN.png\" alt=\"Unknown\" title=\"Unknown\"></td>";
		}
	    if ($show_player_banners) print "<td class=\"celltext\"><a href=\"?serv=".$serv."&lang=".$lang."&page=playerstatsbox&plid=".$data['Id']."\"><img src=\"img/stats.gif\" border=\"0\"></a></td>";
	    echo "</tr>";
	}
}

?>

</table>
This will hopefully solve the issue of Players.

The other one is based on Rank so it can not always be correct. Might need to see in sql what the issues are.

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 30 Dec 2014 10:57
by zebu
Sadly, still no changes on Players page...

http://89.156.83.201/?serv=0&lang=FRA&page=players

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 19 Jul 2015 16:10
by Hoerli
Following doesn't work:

Info-Page:
The Gameserver is offline at the moment!
php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

Tracks:
Track information
Table 'tm2-mm-aseco.challenges' doesn't exist

=> The Challenges-Table now called "maps" with xAseco2

Serverstats:
The Gameserver is offline at the moment!



I hope anyone is active and can fix this little problem :D

Re: (X)Aseco+RASP Website Stats v3.6

Posted: 24 Jul 2015 21:42
by w1lla
edit in /pages/tracks.php and copy paste the following:

Code: Select all

<?php
require("config.php");

print "<p class=\"tabletitle\">$lng_tracks_headline</p>";

if (!$pos) $pos = 0;
if (is_null($orderby)) $orderby = "Id";
if (is_null($sort)) $sort = "ASC";

$sorturl = "?serv=$serv&lang=$lang&page=$page&orderby=%s&sort=".(($sort == "ASC") ? "DESC" : "ASC");

if ($stunt[$serv]){
print "<table width=\"100%\" border=\"0\" bgcolor=\"$bg4\" align=\"center\">
  <tr bgcolor=\"$resultbg\">
    <td width=\"80\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Id")."\">$lng_tracks_id</a></td>
    <td width=\"150\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Name")."\">$lng_tracks_trackname</a></td>
    <td width=\"150\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Author")."\">$lng_tracks_author</a></td>
    <td width=\"100\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Environment")."\">$lng_tracks_envi</a></td>
    <td width=\"50\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "votes")."\">$lng_tracks_votes</a></td>
    <td width=\"50\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "karma")."\">$lng_tracks_karma</a></td>";
    if ($tmx_info) print "<td width=\"50\" class=\"tablehead\">".$lng_tracks_tmx."</td>";
	print "</tr>";
	} else {
print "<table width=\"100%\" border=\"0\" bgcolor=\"$bg4\" align=\"center\">
  <tr bgcolor=\"$resultbg\">
    <td width=\"80\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Id")."\">$lng_tracks_id</a></td>
    <td width=\"150\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Name")."\">$lng_tracks_trackname</a></td>
    <td width=\"150\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Author")."\">$lng_tracks_author</a></td>
    <td width=\"100\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "Environment")."\">$lng_tracks_envi</a></td>
    <td width=\"50\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "votes")."\">$lng_tracks_votes</a></td>
    <td width=\"50\" class=\"tablehead\"><a href=\"".sprintf($sorturl, "karma")."\">$lng_tracks_karma</a></td>
	<td width=\"50\" class=\"tablehead\">".$lng_tracks_dedi."</a></td>";
    if ($tmx_info) print "<td width=\"50\" class=\"tablehead\">".$lng_tracks_tmx."</td>";
	print "</tr>";
	}

$sql = "SELECT c.*, (
			SELECT COUNT(*)
			FROM rs_karma k
			WHERE k.ChallengeId = c.Id
		) votes, (
			SELECT COALESCE(SUM(Score),0)
			FROM rs_karma k
			WHERE k.ChallengeId = c.Id
		) karma
		FROM maps c
		ORDER BY $orderby $sort
		LIMIT $pos, $count";

$result = mysql_query($sql) or die(mysql_error());
$totalrows = mysql_num_rows(mysql_query("SELECT * FROM maps"));

if ($totalrows < 1) {
	print "<tr><td class=\"celltext\" colspan=\"10\">No results</td></tr>";
} else {
	$new_pos_next = $pos + $count;
	$new_pos_prev = $pos - $count;
	$link_next = ($new_pos_next >= $totalrows) ? "" : "?serv=$serv&lang=$lang&page=$page&pos=$new_pos_next&orderby=$orderby&sort=$sort";
	$link_prev = ($new_pos_prev < 0) ? "" : "?serv=$serv&lang=$lang&page=$page&pos=$new_pos_prev&orderby=$orderby&sort=$sort";

	$bg = $bg1;
	while($data = mysql_fetch_array($result))
	{
	    if ($stunt[$serv]){
		$bg = ($bg == $bg1) ? $bg2 : $bg1;
		 echo "<tr bgcolor=".$bg." onMouseOver=\"this.style.backgroundColor='".$bg3."'\" onMouseOut=\"this.style.backgroundColor='".$bg."'\">";
		 echo	"<td class=\"celltext\">".$data['Id']."</td>";
		 echo	"<td class=\"celltext\"><a href=\"?serv=".$serv."&lang=".$lang."&page=sttrecords&trid=".$data['Id']."\" class=\"celltext\">".$cp->toHTML($data['Name'])."</a></td>";
		 echo   "<td class=\"celltext\">".$data['Author']."</td>";
		 echo	"<td class=\"celltext\">".$data['Environment']."</td>";
		 echo	"<td class=\"celltext\">".$data['votes']."</td>";
		 echo	"<td class=\"celltext\">".$data['karma']."</td>";
		if ($tmx_info) echo "<td class=\"celltext\"><a href=\"?serv=$serv&lang=".$lang."&page=tmx_info&UId=".$data['Uid']."\" class=\"celltext\">info</td>";
		print "</tr>";
		} else {
		$bg = ($bg == $bg1) ? $bg2 : $bg1;
		 echo "<tr bgcolor=".$bg." onMouseOver=\"this.style.backgroundColor='".$bg3."'\" onMouseOut=\"this.style.backgroundColor='".$bg."'\">";
		 echo	"<td class=\"celltext\">".$data['Id']."</td>";
		 echo   "<td class=\"celltext\"><a href=\"?serv=".$serv."&lang=".$lang."&page=trecords&trid=".$data['Id']."\" class=\"celltext\">".$cp->toHTML($data['Name'])."</a></td>";
		 echo   "<td class=\"celltext\">".$data['Author']."</td>";
		 echo	"<td class=\"celltext\">".$data['Environment']."</td>";
		 echo	"<td class=\"celltext\">".$data['votes']."</td>";
		 echo	"<td class=\"celltext\">".$data['karma']."</td>";
		 echo   "<td class=\"celltext\"><a href=\"?serv=$serv&lang=".$lang."&page=dedimania_info&UId=".$data['Uid']."\" class=\"celltext\">Dedi_info</td>";
		if ($tmx_info) echo "<td class=\"celltext\"><a href=\"?serv=$serv&lang=".$lang."&page=tmx_info&UId=".$data['Uid']."\" class=\"celltext\">info</td>";
		print "</tr>";
		}
		
		
		
	}
}

?>

</table>
The other issue might be that you put a invalid ip adress in the config.php. Please send your config.php towards me in pm and i can check it out.