(X)Aseco+RASP Website Stats v2.3

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

Moderators: Xymph, TM-Patrol

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

Post by Nitrous » 21 Nov 2010 04:37

I've got the ENG.php and simply translated it.
http://ultimatef1racing.com/tmstats/languages/GRE.zip
The link to my web-site is http://ultimatef1racing.com/ you can find the stats under the Server stats on menu. :)
If i change from firefox the character encoding to Greek ISO-8859-7 is working fine.
But wouldn't it be better to change on it's own?
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

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

Post by Ant » 21 Nov 2010 05:21

The file seems ok, but at the moment, your stats don't seem to even connect to your database. I think you should check the configs before anything else man.

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

Post by Nitrous » 21 Nov 2010 05:22

I'm waiting for the server info for config.php from my gameserver host since the web-site & game server are located in different hosts.
So i thought that i can proceed with the design/translation first.

P.s. i'm using Xaseco 1.12 dunno if it's compatible with V2.3
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

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

Post by Ant » 21 Nov 2010 20:31

Nitrous wrote:
P.s. i'm using Xaseco 1.12 dunno if it's compatible with V2.3
Yeah man, Xaseco v1.12 is what I use with these stats as well.

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

Post by Nitrous » 22 Nov 2010 07:28

arghhhh he sent me the config.php file but still didn't worked i'm doomed to type the statistics on my own.. like i did before..
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

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

Post by Ant » 22 Nov 2010 16:33

Looks like something in the config is wrong then, and also have you setup the datafetcher config in the includes folder ?

Double check login and passwords and ports etc and try again. To be fair though, your host really should know what they're doing !

Edit: you also get this on your stats page

Code: Select all

Access denied for user 'apache'@'localhost' (using password: NO)
which suggests that you don't have all the privileges set properly for that user in your database too. (Make sure all privileges are granted)
Last edited by Ant on 25 Nov 2010 22:03, edited 1 time in total.

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

Post by Nitrous » 22 Nov 2010 21:08

Ant wrote:Looks like something in the config is wrong then, and also have you setup the datafetcher config in the includes folder ?
What do u mean by datafetcher?
Sorry but i'm kinda amateur in php...
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

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

Post by w1lla » 22 Nov 2010 22:08

Code: Select all

go to includes/tmfdatafetcher.config.php

edit there:

$fetcherSettings['stats_user']     = ''; // UserName given by nadeo
$fetcherSettings['stats_password'] = '';//Password given by Nadeo
$fetcherSettings['mysql_server']   = 'localhost';
$fetcherSettings['mysql_login']    = ''; // login of password
$fetcherSettings['mysql_password'] = '';
$fetcherSettings['mysql_database'] = 'aseco';

Code: Select all

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

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

Post by Nitrous » 22 Nov 2010 22:10

i found these but maybe my host has those info...
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

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

Post by w1lla » 22 Nov 2010 22:15

quite strange that your host has them!

Code: Select all

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

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

Post by Nitrous » 22 Nov 2010 23:29

w1lla wrote:quite strange that your host has them!
Yeah i got the server ready and already setted...
tbh i'm not the server master admin ... just admin.
Proud member of
Image
Life is a test where none can cheat.
Image
Image
Image

User avatar
sterretje22
road tourist
road tourist
Posts: 87
Joined: 29 May 2010 23:47
Owned TM-games: TMUF, TMNF, TM²
Manialink(s): fireteam
Location: Oudenburg(BE)
Contact:

Re: (X)Aseco+RASP Website Stats v2.3

Post by sterretje22 » 23 Nov 2010 13:15

hello,

the stats page don't want to connect to my mysql
i don't know whats the problem is

config.php

Code: Select all

// Server 1
$i = 0;
$server_name[$i] = "Funtastic";						// Paste your Servername here
$db_host[$i] = "88.198.7.202";				// Your database host. most times localhost
$db_name[$i] = "root";								// The Name of the Database
$db_user[$i] = "root";								// The User for your database
$db_pass[$i] = "******";								// The db password for the defined User
$ip2[$i] = "127.0.0.1";										// Here you MUST enter your Gameserver IP Adress
$ip[$i] = "88.198.7.202";						// If the script is on the same Server as the Gameserver set "localhost" if not enter your Gameserver IP again!
$port[$i] = 5034;									// The XML_RPC Port of your TMU Server
$server_port[$i] = 2384;					// The GameServer Port to check for On or Offline Status
$user[$i] = "SuperAdmin";					// SuperAdmin Login
$pass[$i] = "******";										// SuperAdmin Password
TMNDataFetcher.php

Code: Select all

$fetcherSettings['stats_user']     = '';
$fetcherSettings['stats_password'] = '';
$fetcherSettings['mysql_server']   = '88.198.7.202';
$fetcherSettings['mysql_login']    = 'root';
$fetcherSettings['mysql_password'] = '*******';
$fetcherSettings['mysql_database'] = '';
the stats_user + pwd where can i find that?
and mysql data base?
`·.¸¸.->ѕтαя~ƒιяє<-.¸¸.·´
ImageImage
Image
`·.¸¸.->~ƒιяє~<-.¸¸.·´
Image

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

Post by Ant » 23 Nov 2010 18:21

For the stats user and password, you need to send an email requesting these details from request@nadeo.com

In your posted config.php you have the database name set as root,

Code: Select all

$db_name[$i] = "root"; 
If you're using the default XAseco setup then your database will be called aseco

Code: Select all

$db_name[$i] = "aseco"; 
So unless you changed it in localdatabase.xml then thats what you need to enter, and the same for

Code: Select all

$fetcherSettings['mysql_database'] = '';
in tmfdatafetcher.config.php, make that

Code: Select all

$fetcherSettings['mysql_database'] = 'aseco';
With theses changes, the stats should work fine providing your other entered logins/passwords/ports are correct :thumbsup:

whazzaa
sunday driver
sunday driver
Posts: 63
Joined: 03 Sep 2009 10:42
Owned TM-games: TMU

Re: (X)Aseco+RASP Website Stats v2.3

Post by whazzaa » 25 Nov 2010 11:16

Modification request :

Coud the list function of visited players be extended with the last visited date ?

Cheers

Ray

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

Post by w1lla » 25 Nov 2010 21:08

update for whazaa and other people that find it usefull to put it in (X)Aseco webstats version.

in /pages/players.php copy and paste this code:

Code: Select all

<?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 %s
		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>";
		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>
Also add in Languages English:

After line 38:
$lng_players_lastvisit = "Last visited";

It will work fine.

Preview:
http://tmrankings.com/asecostats/?serv= ... ge=players

Code: Select all

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

Post Reply