(X)Aseco+RASP Website Stats v3.6

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

xefil
pedestrian
pedestrian
Posts: 13
Joined: 15 Nov 2011 16:44
Owned TM-games: TMC

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

Post by xefil » 12 Jan 2012 09:13

No, and.... yes, this is the solution. Sorry for not having found before.

Cheers!

Simon

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

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

Post by Ant » 19 Feb 2012 23:59

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:

twizted
highway camper
highway camper
Posts: 2
Joined: 07 Jul 2013 06:00
Owned TM-games: TMNF

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

Post by twizted » 07 Jul 2013 06:07

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

twizted
highway camper
highway camper
Posts: 2
Joined: 07 Jul 2013 06:00
Owned TM-games: TMNF

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

Post by twizted » 07 Jul 2013 14:29

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

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

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

Post by Ant » 16 Aug 2013 22:09

Only just seen this, been away for a while - glad you got it working though :thumbsup:

askuri
road tourist
road tourist
Posts: 83
Joined: 21 Apr 2013 10:01
Owned TM-games: All except TMO
Manialink(s): im
Location: Germany/Rhineland-Palatinate
Contact:

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

Post by askuri » 03 Sep 2013 16:31

Another mirror, one is left. That's not enaugh for such a great tool
https://dl.dropboxusercontent.com/u/653 ... s_v3_6.zip

User avatar
Nitrous
pedestrian
pedestrian
Posts: 10
Joined: 01 Sep 2010 12:13
Owned TM-games: TMU, TMUF,TM²-Stadiu
Location: Greece
Contact:

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

Post by Nitrous » 24 Oct 2013 15:22

Still wondering if this will ever work for TM2
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

askuri
road tourist
road tourist
Posts: 83
Joined: 21 Apr 2013 10:01
Owned TM-games: All except TMO
Manialink(s): im
Location: Germany/Rhineland-Palatinate
Contact:

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

Post by askuri » 25 Oct 2013 05:20

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 ;)

zebu
highway camper
highway camper
Posts: 3
Joined: 29 Dec 2014 10:47
Owned TM-games: TMF

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

Post by zebu » 29 Dec 2014 14:19

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

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

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

Post by w1lla » 30 Dec 2014 09:56

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.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

zebu
highway camper
highway camper
Posts: 3
Joined: 29 Dec 2014 10:47
Owned TM-games: TMF

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

Post by zebu » 30 Dec 2014 10:26

PM sent. :)

Thanks

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

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

Post by w1lla » 30 Dec 2014 10:46

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.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

zebu
highway camper
highway camper
Posts: 3
Joined: 29 Dec 2014 10:47
Owned TM-games: TMF

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

Post by zebu » 30 Dec 2014 10:57

Sadly, still no changes on Players page...

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

Hoerli
highway camper
highway camper
Posts: 2
Joined: 19 Jul 2015 16:07
Owned TM-games: TMU, TMO, TM²S, TMT,
Contact:

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

Post by Hoerli » 19 Jul 2015 16:10

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

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

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

Post by w1lla » 24 Jul 2015 21:42

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.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

Post Reply