Translation problem

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

Moderator: NADEO

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

Translation problem

Post by kroff »

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 »

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: 1188
Joined: 14 Jun 2010, 17:20

Re: Translation problem

Post by gouxim »

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: 58
Joined: 15 Jun 2010, 12:34

Re: Translation problem

Post by kroff »

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