Jump to content

Text parser: how to get a parsed text? (with emoticons and all the stuff)


Recommended Posts

Hi there,

I'm a bit lost with the new IPS4 text parsing system :cry:

I'm looking for a way to transform some text with the new IPS4 engine, for instance to get the BBCodes transformed into HTML, and emoticons into images.

Why that? Because in my website, I use my own text fields, that are not stored through the IP Suite, but through my own forms, with specific treatments.

For instance, with IPB3.x, I was used to use something like that:

$parser->set( array(	'parseArea'      => 'global',
						'memberData'     => $memberData,
						'parseBBCode'    => true,
						'parseHtml'      => false,
						'parseEmoticons' => true ) );
$myParsedText = $parser->display($myText);

But now, I really don't know how to get the same result with IPS4.

I found the Text Parser in IPS4:

$myParsedText = \IPS\Text\Parser::parseStatic($myText, TRUE, NULL, NULL, FALSE, TRUE, TRUE, NULL);

… it works for BBCodes transformations, but I really don't know how to transform emoticons into images.

For instance, I want the :


… to be transformed into: :)


Does anyone have an idea?

Thanks a lot!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...