You can add a bookmark button on your Manialink for people to add your Manialink in their bookmarks. The button looks like this:
In this guide we will see how to add such a button on your Manialink by using XML code only. Everything is based on a Manialink Include, you just need to specify the right URL. Let's see how!
2 - Simple buttonLooking for the same feature with the ManiaHome PHP Library?
Check out this tutorial!
At least, you need to specify the code/url of your Manialink. Let's take an example with "maniapub" (change maniapub with whatever your Manialink is!). The code is very simple. Just put it in your page where you want to display the button.
Code: Select all
<include url="http://maniahome.trackmania.com/add/?url=maniapub"/>
You can also specify the name of your Manialink using special characters. Let's take an example with the manialink "maniapub" and it's name "$i$F60ManiaPub" (change maniapub and the formatted name with whatever your Manialink is!). The code is the same but we add the "name" parameter. Note that parameters are not separated by "&" but by "&". This because the URL is XML-escaped.
Code: Select all
<include url="http://maniahome.trackmania.com/add/?url=maniapub&name=%24i%24F60ManiaPub"/>
URL-ENCODE YOUR PARAMETERS BEFORE PUTTING THEM IN THE URL!
URL-encoding is very simple. Here's a tool to do that: http://meyerweb.com/eric/tools/dencoder/
4 - Button with an image
You can change the default image that is associated with the bookmarks page on ManiaHome. To do that, you need to specify the "picture" parameter in the URL. Let's take an example with "manialive" and its beautiful banner (courtesy of aseco ):
Our three parameters (url, name, picture) are:Only JPG and PNG are supported now. DDS is not supported anymore!
Code: Select all
manialive
$i$F60ManiaLive
http://manialink.manialive.com/images/manialive_bookmark.png
URL-ENCODE YOUR PARAMETERS BEFORE PUTTING THEM IN THE URL!
So those three parameters once encoded are:
Code: Select all
manialive
%24i%24F60ManiaLive
http%3A%2F%2Fmanialink.manialive.com%2Fimages%2Fmanialive_bookmark.png
Code: Select all
<include url="http://maniahome.trackmania.com/add/?url=manialive&name=%24i%24F60ManiaLive&picture=http%3A%2F%2Fmanialink.manialive.com%2Fimages%2Fmanialive_bookmark.png"/>