[Mediawiki-l] Adding a Tag

FLuettgens at swd-ag.de FLuettgens at swd-ag.de
Fri Aug 17 08:21:44 UTC 2007

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
Dipl.-Kfm. Markus F. Schmidt (Vorstandsvorsitzender)
Dipl.-Päd. Rainer Pennekamp
Dipl.-Kfm. Uwe Schöneberg

More information about the MediaWiki-l mailing list