[XAsecoTM²] Website Stats v1.0

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
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

[XAsecoTM²] Website Stats v1.0

Post by w1lla » 07 Mar 2012 13:23

After nearly a half year he comes Xaseco Stats part Deux for TM² Canyon.

*The download link is at the bottom of this post*
Version 1.0b
What has changed:
Fixed mx-error on FireFox.
Fixed Serverbanners.
Added Gamemode for Dedimania records.
Removed some jibberish that was not needed anymore since MP release.

Version 1.0
What has changed:
Gamemodes changed as Script is a new Gamemode but not yet Useable!!!
SQL Queries changed due to APIVersion of Map/Challenge.
MX Info altered to show WR, Replay downloadable.
Milliseconds are now shown see example: 00:47.930.
PlayerBanners & ServerBanners are better sorted out.
Maniaplanet Webservices Added.
Fixes added to show proper utf-8 nicknames.



Many thanks goes to Xymph, Assembler Maniac, Sn3p, Ant, TheM, lidor5353, MX Team, Slig and thundagar.
---------------------------------------------------------------------------------------------------------------------------------------------------
A full changelog can be found in the included readme file.
Please post any comments/suggestions/improvements/bug reports about this and i'll do my best to answer all queries.

The download can be found
Here

Code: Select all

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

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: [XAseco2 TM²] Website Stats v1.0

Post by Xymph » 07 Mar 2012 15:16

There is no "XAseco+RASP" for TM², it's called XAseco2. :wink:
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
McRobert
cyclist
cyclist
Posts: 36
Joined: 19 Jun 2008 23:28
Owned TM-games: TMFU, TM²
Location: Cremona, Italy
Contact:

Re: [XAseco+RASP TM²] Website Stats v1.0

Post by McRobert » 08 Mar 2012 07:49

W1lla Sorry, but the download link does not work.
BaMcRober
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: [XAsecoTM²] Website Stats v1.0

Post by w1lla » 08 Mar 2012 08:49

Its fixed.... my mistake in the rush of yesterday :gobananas:

Code: Select all

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

User avatar
iNDEX
cyclist
cyclist
Posts: 40
Joined: 13 Jan 2008 09:58
Owned TM-games: O,SX,2xUF,²C,²V
Manialink(s): ddstylemods
Contact:

Re: [XAsecoTM²] Website Stats v1.0

Post by iNDEX » 08 Mar 2012 14:46

w1lla wrote: The download can be found Here

View a working example of the site Here
Hi w1lla,

thanks for you effort in keeping the website-stats package uptodate and XAseco2-ready.

It´s not possible to open the download link or your example site (from germany), can you please check?!

Regards!
iNDEX'''
Are you looking for coppers? I´ll trade my coppers for your planets.

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: [XAsecoTM²] Website Stats v1.0

Post by w1lla » 08 Mar 2012 14:53

Try to add http:// in front of the url It does work in Google Chrome.

Code: Select all

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

User avatar
iNDEX
cyclist
cyclist
Posts: 40
Joined: 13 Jan 2008 09:58
Owned TM-games: O,SX,2xUF,²C,²V
Manialink(s): ddstylemods
Contact:

Re: [XAsecoTM²] Website Stats v1.0

Post by iNDEX » 08 Mar 2012 15:43

w1lla wrote:Try to add http:// in front of the url It does work in Google Chrome.
Sorry willa,

i tried with my local firefox, chrome, internet explorer and also from a different linux server with lynx and w3m, but no connection could be established.

Can you put the package on a different webspace or send it to me via mail?

Regards!
iNDEX'''
Are you looking for coppers? I´ll trade my coppers for your planets.

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: [XAsecoTM²] Website Stats v1.0

Post by w1lla » 08 Mar 2012 16:00

edited first post with a new downloadlink:

http://www28.zippyshare.com/v/48738482/file.html

Code: Select all

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

User avatar
iNDEX
cyclist
cyclist
Posts: 40
Joined: 13 Jan 2008 09:58
Owned TM-games: O,SX,2xUF,²C,²V
Manialink(s): ddstylemods
Contact:

Re: [XAsecoTM²] Website Stats v1.0

Post by iNDEX » 08 Mar 2012 16:29

w1lla wrote:edited first post with a new downloadlinkl
Great, download works, stats are already online... +1

Now i´m trying to change the remaining TMF-images...

Regards!
iNDEX'''
Are you looking for coppers? I´ll trade my coppers for your planets.

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: [XAsecoTM²] Website Stats v1.0

Post by Ant » 11 Mar 2012 15:19

Looks good so far man, the mx track info is a little messed up though - http://178.239.60.101/xs/?serv=0&lang=E ... 9EnXS9eXNj

Looks like mx_info.php might be missing a closing tag - line 104 looks like this at the moment:

Code: Select all

<td height="25" colspan="2" rowspan="6" bgcolor="<?php echo $bg2 ?>">
hopefully changing it to this will fix it:

Code: Select all

<td height="25" colspan="2" rowspan="6" bgcolor="<?php echo $bg2 ?>"></td>
Edit: Actually, it looks fine in chrome but its messed up in firefox (10.0.2) for some reason - please see this screenshot - http://ant.letsrock-tm.com/img/mxinfo-firefox.jpg

Also with the way mx_info.php is currently written, this line in config.php looks like it has no use at the moment:

Code: Select all

$tmx_info = 1;								// 0 = TMX info deactivated; 1 = TMX active with check if TMX is available; 2 = TMX active without check if TMX is available

scg-flighthigh
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 05 May 2009 15:52
Owned TM-games: TM2

Re: [XAsecoTM²] Website Stats v1.0

Post by scg-flighthigh » 17 Mar 2012 06:41

Hello W1lla

Today i want too make the Stats for our Server.

In Front it look pretty good but i have two little questions:

1. On the Serverstatspage the last Banner displayed no Servername
http://supporter-6.no-ip.org/doh/websta ... verBanners

2. The Page with the Playerbanners are complett empty
http://supporter-6.no-ip.org/doh/websta ... box&plid=1

I read the readme.txt

Code: Select all

NOTE:
Player stats banners still do not work unless you have access to the NADEO Stats Database.
But i dont understood what that mean. Can you explain this for me.

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: [XAsecoTM²] Website Stats v1.0

Post by w1lla » 18 Mar 2012 14:31

both issues are fixed as SCG-Flighthigh and Ant adressed.

The other issue can be fixed here:
Get access to the API
The first thing you need to work with the Maniaplanet Web Services is the credentials (username/password). You can Manage those credentials on the Maniaplanet Player Page:

http://player.maniaplanet.com/
Connect with your Maniaplanet account and go to "Web Services" to manage your credentials. It should be pretty straightforward.

Once you have created an API user, you can test that it works by calling a service that require authentication. This is the case for retrieving public player information. For example, try to go to the following URL with your browser, and when asked for the username/password enter your newly created API crendentials:

https://ws.maniaplanet.com/players/gouxim/index.txt
As always where fixes are are updates so please read first post what has changed :P

Code: Select all

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

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: [XAsecoTM²] Website Stats v1.0

Post by Ant » 18 Mar 2012 20:22

I see you say that you fixed it, but this link to your stats still looks messed up in firefox man - http://178.239.60.101/xs/?serv=0&lang=E ... 9EnXS9eXNj

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: [XAsecoTM²] Website Stats v1.0

Post by w1lla » 19 Mar 2012 09:34

have checked it but it seems a problem in the .css.

Will need to check how i can solve the problem as it also is in 11.0 of firefox.

Code: Select all

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

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: [XAsecoTM²] Website Stats v1.0

Post by Ant » 19 Mar 2012 12:06

After a quick test, it didn't look like a problem in the css but just a few lines in mx_info.php - this fixes the problem anyway and displays perfectly in firefox & chrome - also took the time to make one other little cosmetic change just for the background and placement of the record holder field:

pages/mx_info.php

Code: Select all

<?php
include("includes/mx_get.php");
global $mx;
function bbtohtml($wandeln)
{

$wandeln = preg_replace("#\[track=(.*?)\](.*?)\[/track\]#si", '<br></br><img src=http://tm.mania-exchange.com/main.aspx?action=trackscreensmall&id=\2 target="http://images.mania-exchange.com/main.aspx?action=trackshow&id=\2"><br></br>http://images.mania-exchange.com/main.aspx?action=trackshow&id=\2</img>', $wandeln);
    $wandeln = preg_replace("#\[url=(.*?)\](.*?)\[/url\]#si", '<a href=\1 target="_blank">\2</a>', $wandeln);
   $wandeln = preg_replace("#\[url=(.*?)\](.*?)#si", '<a href=\1 target="_blank">\2</a>', $wandeln);
   $pattern = '#(^|[^\"=]{1})(http://|ftp://|mailto:|news:)([^\s<>]+)([\s\n<>]|$)#sm';
   $wandeln = preg_replace($pattern,"\\1<a href=\"\\2\\3\" target=http://tm.mania-exchange.com/main.aspx?action=trackshow&id=\2><u>\\2\\3</u></a>\\4",$wandeln);
   $bbcodes = array("[b]", "[/b]","[u]", "[/u]","[i]", "[/i]","[url]", "[/url]");
   $htmlcodes = array("<b>", "</b>", "<u>", "</u>", "<i>", "</i>");
   // Added smileys in author comments ;)
$wandeln = str_replace(';)','<img src="http://images.mania-exchange.com/smiles/wink.gif" />',$wandeln);
$wandeln = str_replace(':D','<img src="http://images.mania-exchange.com/smiles/bigsmile.gif" />',$wandeln);
$wandeln = str_replace(':S','<img src="http://images.mania-exchange.com/smiles/confused.gif" />',$wandeln);
$wandeln = str_replace(':cool:','<img src="http://images.mania-exchange.com/smiles/cool.gif" />',$wandeln);
$wandeln = str_replace(':P','<img src="http://images.mania-exchange.com/smiles/tongue.gif" />',$wandeln);
$wandeln = str_replace(":'(",'<img src="http://images.mania-exchange.com/smiles/cry.gif" />',$wandeln);
$wandeln = str_replace(":(",'<img src="http://images.mania-exchange.com/smiles/sad.gif" />',$wandeln);
$wandeln = str_replace(":$",'http://images.mania-exchange.com/smiles/embarrassed.gif" />',$wandeln);
$wandeln = str_replace(":O",'http://images.mania-exchange.com/smiles/surprised.gif" />',$wandeln);
$wandeln = str_replace(":|",'http://images.mania-exchange.com/smiles/stunned.gif" />',$wandeln);
   $wandeln = str_replace($bbcodes, $htmlcodes, $wandeln);



   return $wandeln;
}
if($mxData == null){
		   echo "<p class=\"mxoffline\">Track cant be found on MX servers</p>";
}
else
{
if ($mxreplay == null){
   $time = 'No Records Found';
   $Recowner = 'No Record Holder';
}
else
{
$MwTime = $mxreplay[0]->ReplayTime;
   $minutes = floor($MwTime/(1000*60));
   $seconds = floor(($MwTime-$minutes*60*1000)/1000);
   $mseconds = substr($MwTime,strlen($MwTime)-3);
   $time=sprintf("%02d:%02d.%02d", $minutes, $seconds, $mseconds);
   $Recowner = $mxreplay[0]->Username;
}
?>
<div align="center"><br>
  <table width="100%" border="0" bgcolor="<?php echo $bg4 ?>" cellpadding="0" cellspacing="0">
    <tr bgcolor="#000000">
      <td height="25" colspan="5" class="tablehead-big"> <div align="center"><?php echo $lng_tmx_headline ?></div></td>
    </tr>
    <tr class="celltext">
      <td width="20%" height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_trackid ?></td>
      <td width="29%" height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->TrackID ?></td>
      <td width="1%" height="25" rowspan="10" bgcolor="#000000">&nbsp;</td>
      <td height="25" colspan="2" rowspan="6" bgcolor="<?php echo $bg2 ?>">
        <div align="center"><img src="<?php  echo 'http://tm.mania-exchange.com/tracks/screenshot/small/'.$mxData->TrackID?>"></div></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"><?php echo $lng_tmx_trackname ?></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->Name ?></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_author ?></td>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->Username ?></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"><?php echo $lng_tmx_uploaded ?></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo strstr($mxData->UploadedAt, 'T', true) ?></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_updated ?></td>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo strstr($mxData->UpdatedAt, 'T', true) ?></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"><?php echo $lng_tmx_tracktype ?></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->TypeName ?></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_route ?></td>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->RouteName ?></td>
      <td width="25%" height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_daytime ?></td>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->Mood ?></td>
    </tr>
    <tr>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"><?php echo $lng_tmx_length ?></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->LengthName ?></td>
      <td width="25%" height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"><?php echo $lng_tmx_difficulty ?></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->DifficultyName ?></td>
    </tr>
    <tr>
      <td width="25%" height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_awards ?></td>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $mxData->AwardCount ?></td>
      <td width="25%" height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-rb"><?php echo $lng_tmx_record ?></td>
      <td height="25" bgcolor="<?php echo $bg1 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $time ?></td>
    </tr>
	<tr>
	  <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l"></td>
	  <td width="25%" height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-rb"><?php echo $lng_tmx_WRrecord ?></td>
      <td height="25" bgcolor="<?php echo $bg2 ?>" class="celltext-l">&nbsp;&nbsp;<?php echo $Recowner ?></td>
	</tr>
   <tr bgcolor="#000000">
      <td height="25" colspan="5"> <div align="center"><font color="#CCCCCC"><a href="<?php echo 'http://tm.mania-exchange.com/tracks/view/'.$mxData->TrackID ?>" class="menufont"><?php echo $lng_tmx_viewurl ?></a></font></div></td>
    </tr>
    <tr bgcolor="#000000">
      <td height="25" colspan="5"> <div align="center"><font color="#CCCCCC"><a href="<?php echo 'http://tm.mania-exchange.com/tracks/download/'.$mxData->TrackID ?>" class="menufont"><?php echo $lng_tmx_download ?></a></font></div></td>
    </tr>
    <tr bgcolor="<?php echo $bg1 ?>">
      <td height="25" colspan="5" class="celltext"><br>
        <?php echo $lng_tmx_comment ?><br> <table width="490" border="0" align="center">
          <tr>
            <td class="celltext"><?php echo bbtohtml($mxData->Comments)?></td>
          </tr>
        </table>
        <br> </td>
    </tr>
  </table>
</div>
<?php
}
?>

I think the above (and the original) still needs to be fixed though so this line in the config has a use again:

Code: Select all

$tmx_info = 1;                        // 0 = TMX info deactivated; 1 = TMX active with check if TMX is available; 2 = TMX active without check if TMX is available
Or maybe just remove this line from the config?

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests