-----------------------------------------------------
Feature Description
Currently, trying to add emoji characters inside posts and private messages triggers an error. It would be nice to support emoji characters, particularly so that mobile users can receive a better experience. Emojis would also be able to replace the existing smilies system, providing a wider range of higher-resolution images.
Caveats
- If we replace smilies with emojis, existing forums will have to convert the smilies posts and private messages in their databases to emojis.
- Based off of the implementation details described in the ticket and further down in this post, emojis will require versions of MySQL >= 5.5.3, so existing databases may have to upgrade to a later version.
We have currently built an extension to emulate emoji support for phpBB forums, implemented with the following details:
- We have converted the character sets for the post_text and message_text columns to utf8mb4 to support Emoji unicode characters.
- Emojis can either be inputted via. their unicode characters or through "shortnames" - codes representing emojis similar to the smiley codes, that are translated using the EmojiOne library (https://github.com/Ranks/emojione). Emojis are stored in the database as-is: if they were inputted as unicode characters they are stored as characters, and if they are inputted as shortnames, they are stored as shortnames.
- Because emojis are not consistent across browsers and support for it is lacking in some browsers (ie. Emojis are all black/white in Mozilla Firefox), we use the Twitter Twemoji library (https://github.com/twitter/twemoji) to convert emoji characters to standardized images.
- To assist with inputting emojis, we use the JQuery TextComplete library (https://github.com/yuku-t/jquery-textcomplete) to provide an autocomplete drop-down menu when a colon is entered in a post/message body.
- Character sets for post/message tables should be in utf8mb4 by default instead of utf8.
- The mysqli class should perform its transactions using the utf8mb4 character set instead of the utf8 character set.
- The message parser should not trigger an error if it finds emoji characters/characters outside the ASCII set, or the 'posting_modify_submission_errors' event should be fired when a private message is being composed.