Jump to content

Extension talk:Knowledgebase

Add topic
From mediawiki.org
Latest comment: 12 years ago by 134.20.11.89 in topic Commenting out Line 36 is a start to fix this


A minor improvement

[edit]

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() );</pre>

to read:

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

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") );</pre>

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)



[[1]] MLCT 17:59, 6 February 2014 (UTC)Reply

Commenting out Line 36 is a start to fix this

[edit]
$wgMessageCache->addMessage( 'knowledgebase', 'Add Knowledge Base Article' ); Allows the extension to run. I also put specialpage.php in the extention folder as well. I know both of these are crappy solutions but as of 1.18 they no longer suppport $wgmessageCache. I don't know how to call specialpage.php in its native dir. Any help here would be awesome 134.20.11.89 21 February 2012 23:50 134.20.11.89 18:03, 6 February 2014 (UTC) :test 212.78.209.158 06:52, 10 April 2014 (UTC)Reply