No need to apologize, this forum is here to help the community. The more people use ManiaLib, the more support, bug reports etc. there will be, and the better the Manialinks will become
There is indeed not much documentation. As always with Nadeo we provide tools with minimum documentation
So let me explain how it all works.
Login in the session
Some definitions:
- Login refers to a TrackMania Forever login
- Session refers to a PHP session
As you can see here on line 17
http://code.google.com/p/manialib/sourc ... ass.php#17
Code: Select all
$this->addFilter(new RegisterRequestParametersFilter());
This filter automatically puts in the session some parameters if they are put in the URL.
For example if you access the page with "?login=blabla" (or "playerlogin=blabla"), you will have that login in the session under $_SESSION['login']. The controllers have a instance of SessionEngine so anywhere in a controller you can do:
This feature work for
- login (note that both "login" and "playerlogin" GET parameters works)
- nickname
- path
- land
- token
- sess
- game
The ForceSplashScreenFilter
If the login is not in the session, it redirects the visitor to the SplashController, where the view should have a button with "addplayerid=1". This way the user clicks on the button, the "playerlogin" parameter is put in the URL, and the login is then stored in the session.
NOTE THAT IT IS NOT SECURED. THIS IS ONLY IDENTIFICATION, NOT AUTHENTICATION !
ie. if login = "gou1" for example, you cannot for sure that it is gou1 because anyone can access the page with "login=gou1" in the URL !
So don't use that for admin access and other such sensitive things.
Final word
If you don't really care about having the login in the session, just remove the line
Code: Select all
$this->addFilter(new ForceSplashScreenFilter());
in you're controllers and you'll be good to go