Template talk:Extension

From Organic Design
Info.svg To make a new extension with this template, edit the Extension:Example article and fill in your own values, then preview the page and copy/paste the content into your new extension article. See also Extension:SpecialExample


Parser-function return value

The callback may either return the text result of the function, or an array with the text in element 0, and a number of flags in the other elements. The names of the flags are specified in the keys. Valid flags are (see Extending wiki markup for details)

found
The text returned is valid, stop processing the template. This is on by default.
nowiki
Wiki markup in the return value should be escaped
noparse
Unsafe HTML tags should not be stripped, etc.
noargs
Don't replace triple-brace arguments in the return value
isHTML
The returned text is HTML, armour it against wikitext transformation

Bug

I couldn't find it, but thought it might be the variable assignment. Did you see the parse error caused by the <pre> syntax? -Sven 23:26, 7 May 2007 (NZST)

Already fixed - check changes - you must not have error reporting on properly or something for it not to have showed you the error and line number --Nad 23:42, 7 May 2007 (NZST)
also, it wasn't the pre syntax it was this --Nad 23:44, 7 May 2007 (NZST)
Is there a function that turns on error reporting? --Sven 08:49, 10 May 2007 (NZST)
I can't remember the details, check your php.ini and the LocalSettings docs --Nad 08:52, 10 May 2007 (NZST)
I think it is covered in here --Sven 21:39, 10 May 2007 (NZST)
Just typical, the loggin function wfDebug('foo'); doesn't log anything into the log file set with

$wgDebugLogFile = '/tmp/MW.log' --Sven 22:26, 10 May 2007 (NZST)

Maybe the file has to already exist and be writable? --Nad 23:01, 10 May 2007 (NZST)

Globals and function/methods

As defined in MW:Manual:Coding conventions

  • $wg → $wg for extension globals
  • $wf → $ef for extension functions