Hey,

> Is there a link you would recommend to understand $outputmode in SMW
better?

The tagcloud result printer sets $this->isHTML, so you can check if this
value is true, and in case it is parse the template yourself. I am not
aware of any sane way to do this though. The best I can come up with is
using the global $wgParser and calling it's parseInline function (Semantic
Maps actually uses parse, but I suspect this is wrong (although it works),
see below). There probably is a better way to do all this parsing stuff in
query printers, but the parser interfaces are rather unclear to me, and in
any case, you'd likely need changes in SMW core if you want better handling.

$parser = version_compare( $GLOBALS['wgVersion'], '1.18', '<' ) ? $wgParser
: clone $wgParser;
$parsedText = $parser->parse( $unparsedWikitext, $parser->getTitle(), new
ParserOptions() )->getText();

(But like I noted, parseInline is probably better)

Unrelated note: for the filter option you might want to have a look at
http://php.net/manual/en/function.array-diff.php

Also, discussions such as these are better suited for the dev list (
semediawiki-devel@lists.sourceforge.net ) which is now cc'd. So I suggest
continuing there and not cc'ing users after this one :)

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to