[Maniaplanet] Add the share button on your Manialink

Discuss all the publishing tools, including ManiaHome, ManiaPub, ManiaFlash and ManiaPress in this forum

Moderator: NADEO

User avatar
farfa
Nadeo
Nadeo
Posts: 599
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

[Maniaplanet] Add the share button on your Manialink

Post by farfa » 02 Feb 2012, 11:32

1 - Introduction

Use the "share button" on your Manialink to allow your visitors to easilly share your content on ManiaHome!

Like the Bookmark button, this new feature comes with a new button, simple to integrate to your ManiaLink. You have an example of the share button on the maniaplanet-store. Once integrated, the player just have to click on the button to share some content.

In this guide we will see how to add such a button on your Manialink by using XML code only.

2 - Simple button

At least, you need to specify the link to the content you want to share, and the name of the product. We will generate an automatic message with those elements.

This is a sample code

Code: Select all

<include url="http://maniahome.maniaplanet.com/share/?link=maniaplanet-store&contentName=%24fffMania%2409fplanet-skin"/>
The message generated will be: "Nickname recommands Maniaplanet-skin", and with a link to maniaplanet-store once the player click the notification. (I've replaced the white by a light grey for reading purpose ;))

There is 2 parameters in this URL, link and contentName, they are separated by "&" and not "&". This because the URL is XML-escaped.

You can also notice "%24fffMania%2409fplanet-skin" that stands for "$fffMania$09fplanet-skin". Here's why:

URL-ENCODE YOUR PARAMETERS BEFORE PUTTING THEM IN THE URL!

3 - 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

Code: Select all

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

User avatar
m4rcel
Posts: 653
Joined: 15 Jun 2010, 11:12
Contact:

Re: [Maniaplanet] Add the share button on your Manialink

Post by m4rcel » 02 Feb 2012, 15:18

Nice feature ;)

Only one question: Is there any difference in sending a Notification over the Share-button and sending a custom Notification via postPersonalNotification() to myself? (Except that you need PHP for the latter ^^)
ImageImage
Image

User avatar
farfa
Nadeo
Nadeo
Posts: 599
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: [Maniaplanet] Add the share button on your Manialink

Post by farfa » 02 Feb 2012, 15:32

Yes, with this solution you don't have to authenticate the player. If you use the other solution you have to do it.
But this feature is mainly made for players who don't have big knowledge in development.
Also known as: satanasdiabolo

User avatar
bryan1998
Posts: 98
Joined: 03 Sep 2011, 00:41
Location: Washington, USA
Contact:

Re: [Maniaplanet] Add the share button on your Manialink

Post by bryan1998 » 14 Mar 2012, 21:56

Is there a way to do this with PHP ? ( Yes i know i can echo the XML code - but i want PHP include. )

Also - how do i position this ?
Moderator for ManiaPark since 2/20/2018

User avatar
farfa
Nadeo
Nadeo
Posts: 599
Joined: 14 Jun 2010, 16:15
Location: In front of your hood with one lap late

Re: [Maniaplanet] Add the share button on your Manialink

Post by farfa » 15 Mar 2012, 08:56

There is no particular solution to do it in PHP.
To position it, you can include the markup in a frame
Also known as: satanasdiabolo

om23
Posts: 568
Joined: 29 Aug 2010, 21:29

Re: [Maniaplanet] Add the share button on your Manialink

Post by om23 » 01 Apr 2012, 20:47

seriously, how do i set the position?
I am noob :p

I have included this code in my mainpage, it is shown in the middle.
echo " <include url='http://maniahome.maniaplanet.com/share/ ... f0ั\$ec0巳/>"; echo "\n";
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil

htbplayer
Posts: 31
Joined: 14 Jun 2011, 15:05

Re: [Maniaplanet] Add the share button on your Manialink

Post by htbplayer » 01 Apr 2012, 21:08

make a frame around the button and you can place it everywhere.
Look on the post of farfa exactly the same as i said.

om23
Posts: 568
Joined: 29 Aug 2010, 21:29

Re: [Maniaplanet] Add the share button on your Manialink

Post by om23 » 01 Apr 2012, 21:34

oh, ahh ok, i just didnt understand what markup in a frame is mean :D
got it now, thx
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil

User avatar
kroff
Posts: 58
Joined: 15 Jun 2010, 12:34

Re: [Maniaplanet] Add the share button on your Manialink

Post by kroff » 04 Apr 2012, 19:42

Hello,

Is it possible to have a maniapress-version of this ? :D Would be awesome !

Thanks ! :thx:
Image
Image

Image

User avatar
gouxim
Nadeo
Nadeo
Posts: 1179
Joined: 14 Jun 2010, 17:20

Re: [Maniaplanet] Add the share button on your Manialink

Post by gouxim » 04 Apr 2012, 20:48

Good idea, we'll do that. :thumbsup:
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 “Ingame Publishing”

Who is online

Users browsing this forum: No registered users and 2 guests