[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
Electron
Posts: 797
Joined: 15 Jun 2010, 18:02
Contact:

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

Post by Electron »

I don't like that the notification will be sent immediately to all buddies without further inquiry.

This time I opened the Manialink maniaflash?gou1 and clicked on all buttons to scrutinize the sense of this Manialink ("ha ha"). Now all my buddies will ask themselves, why I have recommended this page...
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

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

Post by gouxim »

Electron wrote:I don't like that the notification will be sent immediately to all buddies without further inquiry.

This time I opened the Manialink maniaflash?gou1 and clicked on all buttons to scrutinize the sense of this Manialink ("ha ha"). Now all my buddies will ask themselves, why I have recommended this page...
I do agree it's not perfect for now. However to solve your problem: click on the "X" on the bottom right of the notification, and choose "Delete this item". You're buddies won't see it anymore, neither will you.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
om23
Posts: 568
Joined: 29 Aug 2010, 21:29

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

Post by om23 »

what u want for your manialink visitors?

1.Click the share button.
Hi, you are about to share this page/content with your buddys, are you sure you want to do that?
2.Yes, I am.
Ok, if you click the Yes Button, then we go to next step.
3.Yes button clicked.
Warning, the message will be postet on all your Buddys events page, click again yes to send it now.
4.Yes.
You share now this page/item with your buddys, click ok to close this message.
5.Ok.

I like the easy one with less clicks, thx
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil
om23
Posts: 568
Joined: 29 Aug 2010, 21:29

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

Post by om23 »

hi, it´s me again :p

how to set a custom style or image on the share button?
to set it I used:

Code: Select all

echo "    <frame posn='0 0' >";
	echo "    <quad sizen='8 6' posn='9 -81 3' manialink='http://maniahome.maniaplanet.com/share/?link=$manialink:blabla?$simplename&contentName=whatever' style='Icons128x128_1' substyle='Share'/>"; echo "\n";
	echo "  </frame>"; echo "\n"; 
	
but this results in a message after click it: invalid manialink
and before the click I see the link, it looks diferent to the included url button link.

info edit: the original include url shows the link urlencoded after the

Code: Select all

<include url="http://maniahome.maniaplanet.com/share/?link=
but at the quad it is not encoded.

thx
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil
om23
Posts: 568
Joined: 29 Aug 2010, 21:29

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

Post by om23 »

no help? :(
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

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

Post by gouxim »

First the link is wrong. The link you are using write now is the link of the include to display the button. What you need instead is the link when you click the button in that particular include:

Code: Select all

http://maniahome.maniaplanet.com/share/send/
Another problem is the encoding of the parameters, and also the encoding of the string inside the xml attribute. Let's do it step by step:

Code: Select all

$url = 'http://maniahome.maniaplanet.com/share/send/'; // Base URL
$params = array('link' => $manialink.'blabla', 'contentName' => 'whatever'); // Parameters
$url = $url.'?'.http_build_query($params); // Automatically escapes the parameters
$url = htmlentities($url, ENT_QUOTES, 'UTF-8'); // Escapes the string to use it in a XML attribute

echo "<quad sizen='8 6' posn='9 -81 3' manialink='$url' style='Icons128x128_1' substyle='Share'/>";
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
om23
Posts: 568
Joined: 29 Aug 2010, 21:29

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

Post by om23 »

ty,
the encoding works good, but on click it says: Undefined parameter: link
the link is the url or not?
═╦═╔╦╗LAN-Party »»» :pil :pop: :pil
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

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

Post by gouxim »

Yes indeed. Previous post fixed.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
om23
Posts: 568
Joined: 29 Aug 2010, 21:29

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

Post by om23 »

I just tryed to change it to manialink but not link xD
and...

you can also change the 'contentName' into 'message' xD

edit: thanx, it works :yes:
═╦═╔╦╗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 »

Yop !

I tried to add this button for ManiaPress tonight but... it didn't work because I'm a noob ! Actually, I tried to code it as I could and I got this :

Code: Select all

Manialink::beginFrame(0,-10, 0.2);
			{
				$http = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']: "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

				$url = 'http://maniahome.maniaplanet.com/share/?link='.$http.'&contentName='.maniapress_html_filter(the_title('', '', false));

				$ui = new Label (30, 10);
				$ui->setStyle(Label::TextButtonNav);
				$ui->setText('Partager');
				$ui->setUrl($url);
				$ui->save();
			}
Manialink::endFrame();
I was quite proud not to have the error http 500 at first but then, when I clicked on it, it just redirects there ! :cry:

So I don't know why it doesn't work and some help is very welcomed ! :thx:

EDIT : Finally I found something good and here's the code for people who want/need that feature on their Manialink :

Code: Select all

Manialink::beginFrame(X, Y, Z);
{
	$url = 'http://maniahome.maniaplanet.com/share/?link=YourManiaLink&contentName='.maniapress_html_filter(the_title('', '', false));
	
	$ui = new \ManiaLib\Gui\Elements\IncludeManialink();
	$ui->setUrl($url);
	$ui->save();
}
Manialink::endFrame();
:mrgreen:
Image
Image

Image
Post Reply

Return to “Ingame Publishing”

Who is online

Users browsing this forum: No registered users and 0 guests