Hi! Stumbled across another issue today: If an annotation is incorrect an error text is added, even if $smwgNamespacesWithSemanticLinks is set to false for this particular namespace.
Example: http://www.ppoe.at/leiter/wiwo/wiki/index.php/MediaWiki:Neuemethode-grundgeruest (This page is read by a special page where all the <<funny values>> are replaced by real data) I looked into the code (includes/SMW_Hooks.php) but found no really nice solution - basically, the code in smwfParserHook $text = preg_replace_callback($semanticLinkPattern, 'smwfParsePropertiesCallback', $text); should pass either $parser or the value of smwfIsSemanticsProcessed($parser->getTitle()->getNamespace()) to smwfParsePropertiesCallback() so it can remove the error message if the namespace should have no semantic links. But as PHP supports neither callbacks with additional arguments nor closures, we are a bit stuck. Using $wgParser in the callback function is possible, though potentially buggy, as smwfParserHook may be called with another parser than the global one. (I have an extension that does this :-/ ) Suggestions welcome. Two other questions: 65 //extract annotations and create tooltip 66 $properties = preg_split('/:[=|:]/', $property); This also matches :|, because | is not special in character classes. I think what you want is '/:[=:]/'. 67 foreach($properties as $singleprop) { 68 $dv = SMWFactbox::addProperty($singleprop,$value,$valueCaption); 69 } $dv is overwritten here on each iteration of the loop. This looks fishy. Regards, Thomas
signature.asc
Description: Digital signature
------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel