Page 1 of 1
[App] ShootMania Ranking Ladder v1.01
Posted: 10 Apr 2013, 07:27
by Nakid
This app uses the ManiaConnect API and shows a ranking of every player in the local database. Players can add themselves to the list by clicking "Connect" and signing into their ManiaPlanet account.
A weekly "snapshot" is taken which allows everyone to see how they progress in world rank throughout the week. The database is updated through the API automatically every 5 minutes (to avoid flooding the API with requests client-side)
The live ladder is for ShootMania, although this can be easily changed to any Mania title.
You can view the live ladder for
Unreal Aussies here:
http://stats.unrealaussies.com/smstats/
You can download it here:
https://code.google.com/p/maniaplanet-rankings/
If you have any suggestions, feel free to post

Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 09:07
by magnetik
Nice !
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 09:13
by Nakid
Found a slight bug with the colour/text codes which made it so the complete player table wasn't updated. Working on stripping the codes now.
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 09:24
by Agamemnus
LOL magnetic #1
Is there a way to pull multiple logons from a single request?
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 09:33
by magnetik
Do you know that you have a class to do maniaplanet styles to html in manialib ?
There is also a javascript version :
https://github.com/maniaplanet/maniapla ... -js-parser
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 09:59
by Nakid
How exactly do you call the Javascript parser function? I'm unfamiliar with that notation/CoffeeScript.
Alternatively, where is the parser function in manialib?
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 10:02
by magnetik
Add this to your page :
<script src="
http://magnetik.github.com/maniaplanet- ... "></script>
And then you have access to the javascript function
Code: Select all
MPStyle.Parser.toHTML('$o foo $i bar');
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 10:03
by magnetik
In manialib it's in
Code: Select all
\ManiaLib\Utils\StyleParser::toHtml($string)
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 10:39
by Nakid
Awesome thanks
I've used the Javascript verison. There is a slight bug where the link is appended to the current URL, but I fixed it by changing from this
Code: Select all
return '<a href="' + this.link + '">';
to this
Code: Select all
return '<a href="http://' + this.link + '">';
on line 124.
Also added charset of utf-8 so it can display everyones' funky characters
Is there a delay on when the ManiaPlanet server updates ranks from in-game? I'm getting the same result constantly, despite finishing many matches.
EDIT: I think it must be that the API isn't responding. Not getting server player updates from my game hosting company either.
EDIT2: Updated the Google Code repository with the latest version.
Re: [App] ShootMania Ranking Ladder v1.0
Posted: 10 Apr 2013, 17:34
by Agamemnus
The API is responding again. Your page is now showing new movements. Though I haven't tested our the delay.