Skip to content
 

Want to enable the advanced editor toolbar in mediawiki? See below

It took too damned long to find information on how to enable the advanced editing toolbar in a standalone installation of mediawiki 1.18+ so hopefully google brings you here and this will save you time. One would think that changing the editor toolbar to be similar to the toolbar in wikipedia would be considerably easier but searching for information in regards to changing the toolbar was nightmarish at best.

http://www.mediawiki.org/wiki/Extension:WikiEditor

Basically you add 4 lines of code to your LocalSettings.php

#Enable advanced editor
require_once( “$IP/extensions/WikiEditor/WikiEditor.php” );
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
$wgDefaultUserOptions['wikieditor-preview'] = 1;

Share

8 Comments

  1. PK says:

    Thank you oh-so-very much!

  2. Stephen says:

    Hey, thanks for this! Been looking everywhere with no luck. Unfortunately, I ran into a problem after using these lines. I am now getting the error:

    Parse error: syntax error, unexpected T_VARIABLE in /home/********/public_html/wiki/LocalSettings.php on line 141

    Anyone know how to fix this?

  3. n0manarmy says:

    Can you paste up what’s on line 141 for me to look at?

  4. Stephen says:

    require_once( “$IP/extensions/WikiEditor/WikiEditor.php” );

    Is on 141. I was thinking that the $IP might be an issue? Is there a way to select the current directory instead?

  5. n0manarmy says:

    Whats the line above and below it? You should see that $IP is used in other parts of the file and would cause issues there as well if that was the case.

  6. Stephen says:

    This is where I pasted your code.

    # End of automatically generated settings.
    # Add more configuration options below.

    # $wgReadOnly = ‘site maintenance’;
    $wgBreakFrames = “”;

    #Enable advanced editor
    require_once( “$IP/extensions/WikiEditor/WikiEditor.php” );
    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    $wgDefaultUserOptions['wikieditor-preview'] = 1;

    I am just thinking that $IP might be a little off because the actual directory is something more along the lines of this.

    /home/a7044897/public_html/wiki/extensions/WikiEditor/

  7. PePa says:

    You are my hero !!

    It took me hours of searching through the web, no one told to add these lines
    in order to be able to see the extra check boxes in preferences.

    Thank you veeery much.

  8. Dominik says:

    Doesn’t work in my case. I use the latest version: 1.20.2
    With 1.19 I had the same result.

    I included the require_once… pointing to the Wiki-Editor-Directory and the two lines to set the beta-editor as default. Then I tried to edit an entry, but I got only the default-editor. So I was looking in the Usersettings and switched from beta-editor to the default-editor. And back. Still no change.
    I cleared the cache for sure.

    Greetings from germany.

Leave a Reply

You must be logged in to post a comment.