[Mediawiki-l] CharInsert-extension problem

Rob Church robchur at gmail.com
Mon Aug 28 14:20:15 UTC 2006


On 28/08/06, Birger <bweynants at gmail.com> wrote:
> Hello there,
>
> I tried to add to my wiki (Mediawiki version 1.6; PHP 5.1.2) the
> CharInsert-extension. I did the following:
>
> 1) Created a CharInsert.php-file in /extensions/CharInsert (copy-paste
> from http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/CharInsert/CharInsert.php)
> 2) Replaced the javascript-code from skins/common/wikibits.js with the
> javascript from
> http://en.wikipedia.org/skins-1.5/common/wikibits.js?1.
> 3) Changed Mediawiki:Edittools to put in the charinsert-tags and other
> wiki-code like in wikipedia in order to adapt the text beneith the
> edit-box and give users the possibility to easily add special
> characters. (I have to tell that in my wiki-setup,
> $wgUseDatabaseMessages = false;).
> 4) Added require_once("$IP/extensions/CharInsert/CharInsert.php"); to
> localsettings.php.
>
>
> ...unfortunately this returned a completely blank page, unless i
> changed "require_once" into "include" (as is suggested on other
> sites). Then the wiki was viewable again in the browser, but the
> CharInsert-stuff still didn't work. So i tried to put the textmessages
> with special characters into the copyrightwarning in messages.php (as
> is also suggested on some sites), but unfortunately the text is not
> parsed (the <charinsert>-tags are still there instead of being parsed).
>
> I really can't see what i am doing wrong here. Does anyone have any idea
> what should do the trick?

1. You might not have copied a real PHP script file, for starters
2. You didn't need to touch the skins, and should NEVER just snarf
files off Wikipedia
3. If $wgUseDatabaseMessages = false; then editing the MediaWiki
namespace has no effect

Revert back in time to the point where all those changes are undone,
and give the following a shot:

1. Save the contents of
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/CharInsert/CharInsert.php?revision=14995
into a CharInsert.php file, and place this in /path/to/wiki/extensions
2. Edit LocalSettings.php, and near the end, add "require_once(
'extensions/CharInsert.php' );"
3. Check the wiki hasn't fallen over and died
4. If not using the MediaWiki namespace, edit languages/Messages.php,
find the message "edittools" and add something like

<charinsert>a b c d e f g</charinsert>

to it, replacing the example characters above with whatever's
difficult to type for your users.

5. Attempt to edit a page and see if the little box pops up near the bottom


Rob Church



More information about the MediaWiki-l mailing list