[App] ShootMania Ranking Ladder v1.01

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

Post Reply
Nakid
Posts: 7
Joined: 10 Apr 2013, 06:28
Location: Australia
Contact:

[App] ShootMania Ranking Ladder v1.01

Post 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 :)
Last edited by Nakid on 12 Apr 2013, 01:33, edited 1 time in total.
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post by magnetik »

Nice !
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Nakid
Posts: 7
Joined: 10 Apr 2013, 06:28
Location: Australia
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post 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.
Agamemnus
Posts: 41
Joined: 04 Oct 2012, 11:38

Re: [App] ShootMania Ranking Ladder v1.0

Post by Agamemnus »

LOL magnetic #1 ;-)

Is there a way to pull multiple logons from a single request?
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post 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
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Nakid
Posts: 7
Joined: 10 Apr 2013, 06:28
Location: Australia
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post 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?
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post 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');
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post by magnetik »

In manialib it's in

Code: Select all

\ManiaLib\Utils\StyleParser::toHtml($string)
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Nakid
Posts: 7
Joined: 10 Apr 2013, 06:28
Location: Australia
Contact:

Re: [App] ShootMania Ranking Ladder v1.0

Post 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 :P

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.
Agamemnus
Posts: 41
Joined: 04 Oct 2012, 11:38

Re: [App] ShootMania Ranking Ladder v1.0

Post by Agamemnus »

The API is responding again. Your page is now showing new movements. Though I haven't tested our the delay.
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest