Page 1 of 1

StyleParser problems

Posted: 03 Jul 2013, 10:20
by MuNgLo
Hi, I'm trying to get StyleParser to work for a webpage to parse nicknames and such correctly coloured. I have webservices working and as wiki explained about ManiaLib, I installed the Manialib folder properly I guess
If you already use the Maniaplanet Web Services SDK, copy the libraries/ManiaLib folder next to your existing libraries/Maniaplanet folder. Make sure your SDK is up-to-date (current version is 1.2, released January 2012)
I can start up classes from Gui so it looks ok but as soon as I try to use StyleParser it fails. So my question is really how to get StyleParser working.

Re: StyleParser problems

Posted: 03 Jul 2013, 10:25
by steeffeen
well showing the error would help sorting what you're doing wrong :D

example:

Code: Select all

require_once __DIR__.'/manialib/libraries/autoload.php';

$styleParser = new \ManiaLib\Utils\StyleParser();
$styleParser->toHtml($server->serverName)

Re: StyleParser problems

Posted: 03 Jul 2013, 10:31
by w1lla
or

Code: Select all

StyleParser::toHtml

Re: StyleParser problems

Posted: 03 Jul 2013, 10:32
by MuNgLo
Yeah I know. Just gotta find where the hell the page decides to turn all error reporting off. :/
I've tried your way above as it is the logical way but it was a no go for StyleParser.

--EDIT--
Ok so error repporting on and nothing att all comes out. :?

But somehow I can feed strings into toHtml now (yesterday it refused the same code :?)

Strange... Maybe I was just tired and stupid yesterday.

--EDIT 2--
Seems it works just fine now. No idea why it wouldn't yesterday. Well best way to sort something out is to ask for help I guess. :D
Image