Translation problem

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

Moderator: NADEO

Post Reply
User avatar
kroff
Posts: 57
Joined: 15 Jun 2010, 12:34

Translation problem

Post by kroff » 29 Jan 2012, 18:43

Hello everyone,

I just have some difficulties with this code :

Code: Select all

manialink="<?php echo $http_location;?>?shoutbox=shoutboxInput"
How do you "translate" that one there in this ?

Code: Select all

$ui->setManialink(???);
I tried everything without results... Hope someone can help me ;)
Image
Image

Image

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

Re: Translation problem

Post by m4rcel » 29 Jan 2012, 21:47

Without knowing the internals of ManiaLib, I would try the following line:

Code: Select all

$ui->setManialink($http_location.'?shoutbox=shoutboxInput');
where of course $http_location must be set before calling this line.
ImageImage
Image

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

Re: Translation problem

Post by gouxim » 30 Jan 2012, 10:55

Indeed you need to write:

Code: Select all

$ui->setManialink($http_location.'?shoutbox=shoutboxInput');
However one thing to note: when you put the URL directly in the XML code, you have to XML-encode it before echoing it in the XML. You don't need to do that with ManiaLib since it automatically encodes the parameters.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)

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

Re: Translation problem

Post by kroff » 30 Jan 2012, 22:32

Well, thanks to you guys ! :thumbsup:
Image
Image

Image

Post Reply

Return to “ManiaLib”

Who is online

Users browsing this forum: No registered users and 1 guest