Page 1 of 2

[Maniaplanet] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 12:11
by gouxim
1 - Introduction

You can add a bookmark button on your Manialink for people to add your Manialink in their bookmarks.

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 button

At least, you need to specify the code/url of your Manialink. Let's take an example with "manialoto" (change manialoto 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.maniaplanet.com/add/?url=manialoto"/>
Note that we use Manialink Version 1, that means it uses the new coordinates and sizes.

3 - Button with a formatted name

You can also specify the name of your Manialink using special characters. Let's take an example with the manialink "manialoto" and it's name "$i$F60ManiaLoto" (change manialoto 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.maniaplanet.com/add/?url=manialoto&name=%24i%24F60ManiaLoto"/>
You just saw something weird didn't you? I wrote "$i$F60ManiaLoto" before, and "%24i%24F60ManiaLoto" in the URL above. Okay, this is important so I'll write it with big letters:
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

Images are no longer supported in ManiaHome bookmarks.

5 - Manialink version="0" support

The included view uses by default version="1" with the new position/size system. If you're Manialink still uses version="0", you can specify it in the URL of the include:

Code: Select all

<include url="http://maniahome.maniaplanet.com/add/?url=manialoto&version=0"/>

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 12:29
by SadHik
Maniapub = Manialoto ? i think you made a mistype :oops:

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 12:34
by gouxim
I don't know what you're talking about :lol:

(Thanks it's been fixed)

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 12:36
by jonthekiller
Good, it's very easy now :thumbsup:

EDIT : I have found a bug. I have wrote this

Code: Select all

<frame posn="-10 -5 -1">
<include url="http://maniahome.maniaplanet.com/add/?url=lottery"/>
	</frame>
And I have this on the manialink "lottery".
Sans titre.jpg

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 13:56
by gouxim
It's because I think your Manialink use version="0", but our include use version="1" (new sizes and positions)

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 14:06
by jonthekiller
Yes, I use version="0". Is it possible to add a parameters for use version="1" or version="0"?

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 14:31
by gouxim
Done. Add "version=0" in the URL of the include.

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 14:36
by jonthekiller
Thanks, it works well :thx:

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 16:26
by TStarGermany
Glad to see it works again

@Jon: Damn, you stole my "lottery" link ^^ I already had it registered, but let go again :ß
@gouxim : I'm sure the buttom can be assembled of more attractive elements (i mean the background button)

BTW: Is there still a way to compose such a button with own elements (not images,but pre-defined styles) ?

Re: [ManiaHome] Add the bookmark button on your Manialink

Posted: 07 Sep 2011, 16:29
by jonthekiller
I can't use lottomania, I have take a easy link :mrgreen: