[Mediawiki-l] Skin: Parsing wiki text/extension syntax

Alexis Moinet alexis.moinet at fpms.ac.be
Mon Sep 3 15:59:15 UTC 2007


Frank Sundermeyer wrote :
> The complete code in the skin template looks like this:
> 
> <?php if (wfMsgForContent( 'mainpage' ) == $this->data['title'] ) { ?>
>   <!-- Insert right navigation bar -->
>   <?php print wfMsg('mainpagerightcolumn')  ?>
>   <!-- End insert right navigation bar -->
> <?php } ?>
> 
> Also works fine. The only problem is, that wiki text or extension markup 
> from "MediaWiki:Mainpagerightcolumn" does not get parsed - it is 
> inserted "as is" (see first link in the right column). It's basically 
> the same as if using wiki text in the skin template which also wouldn't 
> work.
> Is there a way to make it work?

after some testing,

<?php print wfMsgWikiHtml('mainpagerightcolumn'); ?>

will work if you use wiki syntax for external links :

[http://lists.opensuse.org/opensuse-announce/2007-06/msg00008.html Proprietary Software Survey Results]

instead of

<a href="http://lists.opensuse.org/opensuse-announce/2007-06/msg00008.html">Proprietary Software Survey Results</a>

I think this is because (correct me if I'm wrong), mediawiki parser parses only some tags like <div>, <ul>, <li> but not <a> (when it parses <a>, it transcribes it into plain text (&lt; a &gt;) )

(to make things easier, you can also replace <ul> and <li> with mediawiki syntax (*) )



More information about the MediaWiki-l mailing list