[Mediawiki-l] enable edit toolbar

Anthony Zepezauer Anthony.Zepezauer at cnet.com
Mon Apr 7 19:01:34 UTC 2008


Hi all, please excuse what is probably a very simple question.  I'm new
to both mediawiki and PHP.  (I searched the e-mail archives for an
answer but didn't find one.)

I've installed mediawiki but I'm not getting the toolbar with bold,
italic, etc. on edit pages (e.g. as shown here:
http://www.mediawiki.org/w/index.php?title=Category:MediaWiki_Introducti
on&action=edit).

Firebug shows a JS error 'addButton is not defined'

I see that the JS function addButton lives in skins/common/wikibits.js,
so I modified the getEditToolbar function in includes/EditPage.php like
so:

    $toolbar = "<div id='toolbar'>\n";
    $toolbar.="<script type='$wgJsMimeType'
src='/skins/common/wikibits.js' />";  <==== ADDED THIS LINE
    $toolbar.="<script type='$wgJsMimeType'>\n/*<![CDATA[*/\n";

This had no effect.  Then I tried adding the entire addButton function
at that same location, but got a parse error.

I suspect I'm going about this all wrong.  Any help is greatly
appreciated.

Thanks,
Anthony Zepezauer



More information about the MediaWiki-l mailing list