I´ve created a template which has a property called "path", which is intended to store a string that represents a path to a file in a network file system. I´d like to show this property inside <file> and </file> tags, which are used by the FileProtocolLinks extension to create a link using file protocol.

Unfortunatelly, the semantic property is not "resolved",  the link is incorrectly created to the literal "[[path::{{{path}}}]]", instead of eg. "c:\whateverdir\foo.txt".

The text in my template is:
<file>[[path::{{{path}}}]]</file>

If I remove the tags the content is show correctly, but I do need to envolve it in the tags to use the extension.

I´m pretty sure it is not a problem with SMW, but with the FileProtocolLinks extension, which seems to be processed first than SMW markup and not parsing it´s contents. I´d like the extension to call the mediawiki parser on it´s contents, but I don't know how to do it yet. The same may occur also with another tag based extensions.
The relevant part of this extension is:

function renderFileProtocolLink($input)
{
    $exploded = explode('|', $input);
    $uri = htmlentities($exploded[0], ENT_COMPAT, "UTF-8");
 
    if (!isset($exploded[1]) || empty($exploded[1])) {
        // no linktext has been specified ==> use the URI as linktext
        $linktext = $uri;
    }
    else {
        $linktext = htmlentities($exploded[1], ENT_COMPAT, "UTF-8");
    }
 
    return sprintf('<a style="color:green" href="file:///%s">%s</a>', 
        $uri, $linktext);
}
So, do any of you guys cold help me fix this issue? Or at least point me where could I look for that? I´m doing my first steps in developing SMW extensions

Thanks,
Matheus

--

Matheus Garcia Barbosa de Figueiredo
Analista de Sistemas
Gerência de Desenvolvimento de Sistemas - GDS
Gerência-Geral de Sistemas de Informação - GSI
Assembleia Legislativa de Minas Gerais - ALMG