Page 1 of 1

Automatic Manialink creation ?

Posted: 31 Jul 2012, 22:05
by frankie567
Hi there !

I'm currently working with a friend on an online tournament management system (http://www.taikai.fr/), for all kind of sports, and we wanted to implement some cool features for ShootMania players.
I'm already working with the maniplanet-sdk and i'll probably use the manialib too.

So, what we wanted to do is the creation of a dedicated Manialink for each ShootMania tournament, that players can add to their Maniaplanet profile (and in it they'll get the last informations about the contest).
The problem is that i must declare these Manialinks code from my player page by hand, as far as i know. Obviously, it's impossible to do that for the feature we want.
So, i was wondering if there is a way, with manialib or another, to automatically declare Manialinks (and possibly delete them after) ?

Thanks for your help !

François

Re: Automatic Manialink creation ?

Posted: 31 Jul 2012, 23:43
by The_Big_Boo
frankie567 wrote:So, i was wondering if there is a way, with manialib or another, to automatically declare Manialinks (and possibly delete them after) ?
It's not possible and probably better for your planets ^^

Anyway, I don't think you need such a feature for your project.
You can access manialinks by URL so what you probably want to do is registering a single short manialink which will point to a home page then use URLs in links (this is what ManiaLib is doing btw). For example, each game on "manialoto" is accessed by an URL starting with "http://manialoto.maniaplanet.com/".
If you want a short link to a specific page, you can use the query string, like "maniaflash?maniaplanet-tips": you just need a piece of code in your main controller that will check for it and redirect if needed.

Hope it helps ;)

Re: Automatic Manialink creation ?

Posted: 01 Aug 2012, 08:37
by frankie567
The_Big_Boo wrote:If you want a short link to a specific page, you can use the query string, like "maniaflash?maniaplanet-tips": you just need a piece of code in your main controller that will check for it and redirect if needed.
This is exactly what i want ! I should have thought :)

Just to confirm, but i think the answer is yes if i understand the Maniaplanet-tips link properly, is it possible to bookmark pages with a query string like that ?

Thanks for your help Big_Boo :)

Re: Automatic Manialink creation ?

Posted: 01 Aug 2012, 11:18
by gouxim
frankie567 wrote: is it possible to bookmark pages with a query string like that ?
Yes it is possible. As big boo pointed out, this is how we do on ManiaFlash (read more here: http://forum.maniaplanet.com/viewtopic.php?f=8&t=9310)

About the query string, we chose on ManiaFlash to use the format "maniaflash?channel-id" to have short and clean URLs, but you can very well use a standard query string. For instance "maniaflash?channelId=maniaplanet-tips" will point to "http://maniaflash.maniaplanet.com?chann ... lanet-tips". Links are a bit longer, but it's easier to use.


Also note this: current downloadable version of ManiaLib is a bit old. If you want to use ManiaLib you should use a recent version. You can either checkout the trunk from the svn, or we can make a quick beta zip package if you need.

Re: Automatic Manialink creation ?

Posted: 01 Aug 2012, 11:42
by frankie567
gouxim wrote: Yes it is possible. As big boo pointed out, this is how we do on ManiaFlash (read more here: http://forum.maniaplanet.com/viewtopic.php?f=8&t=9310)

About the query string, we chose on ManiaFlash to use the format "maniaflash?channel-id" to have short and clean URLs, but you can very well use a standard query string. For instance "maniaflash?channelId=maniaplanet-tips" will point to "http://maniaflash.maniaplanet.com?chann ... lanet-tips". Links are a bit longer, but it's easier to use.
Thank you :)
gouxim wrote: Also note this: current downloadable version of ManiaLib is a bit old. If you want to use ManiaLib you should use a recent version. You can either checkout the trunk from the svn, or we can make a quick beta zip package if you need.
Thanks for this information ! I checked the SVN and updated to the 3.0a version ;)

Re: Automatic Manialink creation ?

Posted: 01 Aug 2012, 11:47
by gouxim
Cool.

The documentation of ManiaLib is, to say the least, quite light ; if you bump into troubles, don't hesitate to create threads here to ask questions (one thread per question is better because it is clearer for other people to find answers to their own questions) on various ManiaLib topics. People's topics will eventually create a base for a good ManiaLib FAQ.

Re: Automatic Manialink creation ?

Posted: 01 Aug 2012, 16:09
by gouxim
You may also want to check other projects that use ManiaLib. For example: http://forum.maniaplanet.com/viewtopic.php?f=279&t=9051