[Mediawiki-l] Adding a Tag

Jean-Lou Dupont jeanlou.dupont at gmail.com
Fri Aug 17 11:51:40 UTC 2007


I believe the signature 'special word' is handled by a different phase 
in the parser; recursiveTagParse does not constitute that phase.

Out of curiosity, why don't you use a template instead of defining a new 
tag?  Unless of course the code provided below is just a try-out.

jld.

FLuettgens at swd-ag.de wrote:
> Hello,
> ive just set up the Wiki and it works great!
>
> Now im at the point i want to change and add some things:
>
> <doku>Creating Filesystems</doku>
>
> should build a table with align right that should look like this:
>
> ----------------------------------------------------
> | Dokument: | Creating Filesystems |
> ----------------------------------------------------
> | Author:        |  $login + $date              |
> ----------------------------------------------------
>
> Building the table works, it even puts the tagged variable into it, but i 
> wanted to use mediawikis implemented tag '~~~~' for the Author.
>
> Im not a php coder, this one is kinda right out of help:wiki
>
> $wgExtensionFunctions = array('authorbox');
>
> function authorbox() {
>         global $wgParser;
>         $wgParser->setHook( 'doku', 'authorrender' );
> }
>
> function authorrender ($input, $args, $parser) {
>   $output  = '<table border="1" align="right">' . "\n";
>   $output .= '<tr><td><strong>Dokument:</strong></td><td><code>' . 
> htmlspecialchars($input) . '</code></td></tr>' . "\n";
>   $output .= '<tr><td><strong>Author:</strong></td><td>' . 
> $parser->recursiveTagParse('~~~~') . '</td></tr>' . "\n";
>   $output .= '</table>';
>
>   return $output;
> }
>
> Wheres the error? :'(
>
> it doesent parse me the author, output looks like this:
>
> Dokument: test 
> Author: ~~~~ 
>
> thanks in advance and i wish you all a nice weekend :]
>
>
> Mit freundlichen Grüßen,
>
> Florian Lüttgens
>
>
> Sitz der Gesellschaft: Düsseldorf
> Rechtsform: Aktiengesellschaft
> Eingetragen beim Amtsgericht Düsseldorf
> HRB Nr. 3466
>
> Aufsichtsratsvorsitzender: Prof. Dr. Utz Claassen
> Vorstand:
> Dipl.-Kfm. Markus F. Schmidt (Vorstandsvorsitzender)
> Dipl.-Päd. Rainer Pennekamp
> Dipl.-Kfm. Uwe Schöneberg
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>   




More information about the MediaWiki-l mailing list