Extension talk:Emoticons

Why this Extension was created
I was tasked with setting up a Wiki for a small business. They were currently using phpBB, but for training info and guidelines a forum was just too cumbersome. I knew about MediaWiki and since I was asked to set up something "like Wikipedia", it quickly came to mind. The one thing I worried about was that the smileys people were used to in the forums would not be available in the Wiki.

I started by getting MediaWiki installed since the lack of smileys was bothersome, but unlikely to prevent the Wiki from being useful. Next I put in the RandomText extension for a random "quote" on the main page.

I then searched for an emoticon extension for as long as my attention span would allow. (I think managed to search for a whole fifteen minutes: A new record for me.) After that I gave up and decided to write my own...

...This is the first extension I have attempted with MediaWiki. Any stylistic variation from standard MediaWiki extension coding practices is just the way things go. If it really bugs you, fix it. Anyone who wants to use, modify or mutilate this code beyond recognition is free to do so, just don't blame it on me. If this extension causes your server to burst into flames and run screaming through the data center, I cannot be held responsible. I check my email quite regularly, so if anyone has any questions feel free to drop me a line, but since I have two jobs, a family and more pets than I care to admit I can't promise I'll be able to respond in short order.

User:LudoErgoSum

Does not appear to work in 1.10.1
On version 1.11 I got the following error: "Detected bug in an extension! Hook fnEmoticons failed to return a value; should return true to continue hook processing or false to abort." Mediawiki apparently now requires a return value of true for continue or false for cancel.

Adding "return true" between line 67 and line 68 (just before the last curly brace) seemed to fix the problem for me.

Can't get it to work
In most recent version it gives a 500 internal server error.

return true fix doesn't work

Return true; definitely needed in extension.
* MediaWiki: 1.11.0 * PHP: 5.2.0 (apache2handler) * MySQL: 5.0.45

under this setup, adding return true; before the last } made it work fine.

Use the Mediawiki:Emoticons page for viewing purposes also
If you look at the parsed configuration page it doesn't look very suitable for using it as a description page for the authors to see which emoticons are available.

So for our wiki I replaced the line

$emoticonList = explode( "\n", $emoticonListArticle->mContent );

by the following

so that I can use some tags like nowiki or table to format the list so that it is viewable also.

The example

would show (imagine a suitable icon image) something like this:

and can still be parsed by the extension.

Depending on the tags you want to use in the definition lines you could add further strings to the emSearch array. Lines without the // separator (i.e. the table lines in the example above) don't need to be removed as they are ignored already by the unchanged extension. --Wolverine 16:43, 2 January 2008 (UTC)

UNIQ errors in MediaWiki 1.12.0
This extension causes UNIQ errors. As seen in the example below.

UNIQ3cb085dc58727e57-nowiki-00000000-QINU.

Someone might want to update it so that it can work in the latest version.

-Augrunt 03:18, 22 March 2008 (UTC)

MediaWiki 1.12.0 Problems
Any idea when they will be fixed so I can start using this great extension again?