Thread:Extension talk:Knowledgebase/A minor improvement

This extension is a neat addition for iterative article creation (and IMHO more straightforward to implement than the DPL based one) however there are a few improvements that can be added to include some of the extra functions provided by the DPL one. By default, for a new article the special page link of the extension sends you to a "the page does not exist, click here to edit it" page instead of sending you straight to the editbox. To solve this modify the following in SpecialKB.php (line 70):

$wgOut->redirect( $title->getFullUrl );

to read:

$wgOut->redirect( $title->getFullUrl(&action=edit) );

This modification produces a cleaner experience for the end-user. To add some more functionality it may be useful to have some default content in the created page, so in addition to the edit modification, a further enhancement to the code can be made to allow the inclusion of a template, so the same code now reads:

$wgOut->redirect( $title->getFullUrl("&action=edit&section=&createintro=&preload=Template:Foo") );

The only negative is that refinement or change of the template requires editing of the SpecialKB.php file (and hence access to it) - and in addition only one template can be used to include. But presuming these things are ok (which they are for me) then these changes are a way of making this useful extension even more useful. MLCT 00:41, 23 August 2008 (UTC)

[]