Automatic Manialink creation ?

Open source, lightweight PHP framework for Manialink and Web development.

Moderator: NADEO

Post Reply
User avatar
frankie567
Posts: 14
Joined: 25 Jul 2012, 09:45
Location: Saint-Etienne, France
Contact:

Automatic Manialink creation ?

Post 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
The_Big_Boo
Posts: 1041
Joined: 15 Jun 2010, 15:46

Re: Automatic Manialink creation ?

Post 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 ;)
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
User avatar
frankie567
Posts: 14
Joined: 25 Jul 2012, 09:45
Location: Saint-Etienne, France
Contact:

Re: Automatic Manialink creation ?

Post 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 :)
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

Re: Automatic Manialink creation ?

Post 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.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
frankie567
Posts: 14
Joined: 25 Jul 2012, 09:45
Location: Saint-Etienne, France
Contact:

Re: Automatic Manialink creation ?

Post 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 ;)
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

Re: Automatic Manialink creation ?

Post 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.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
gouxim
Nadeo
Nadeo
Posts: 1188
Joined: 14 Jun 2010, 17:20

Re: Automatic Manialink creation ?

Post 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
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
Post Reply

Return to “ManiaLib”

Who is online

Users browsing this forum: No registered users and 0 guests