Parser to change Emojis for images in posts for PC users.

Started by Gluz, March 19, 2016, 02:33:04 PM

Previous topic - Next topic

Gluz

This was meant to be a MOD, but the Customization team says that it fits more in the Tip and Tricks board than a MOD, so here you have it.

The main purpose is to allow the PC users to see the actual emoji that the mobile users post, because only Safari in OS X show them as far as I know.
To mobile users it shows it's own set for each mobile OS, but can force the parse for that devices too, so all users will see the exact same emoji.

The images are the emojis from Apple, and have almost all the emojis available until 2015 updates of WhatsApp, just some are missing from the table I used to generate the sheet.






Emoji parser

Information
This MOD parses Emojis (Multibyte Unicode Characters) posted by iOS or Android users and replace them with an actual image for not mobile view.

Example:
😉 →

NOTE: Requires SMF 2.0.10 or above because of the UTF8MB4 fix to store Emojis (Multibyte Unicode Characters) safely in the database. Note that previewing post with emojis it's still broken and says that the body message is empty.


Usage
Just install, the emojis in posts should be working now in all the devices, and have a setting to force mobile device substitution.
To disable it just uninstall the mod.


© 2015 v 1.1.0
@mod           Emoji parser
@author       Gluz
@license       MIT https://opensource.org/licenses/MIT
@using          https://github.com/emanuele45/Mobile-Device-Detect (part of codes)
@based on   https://github.com/iamcal/php-emoji
@reference   http://unicodey.com/emoji-data/table.htm
@images      © Apple Inc.


Changelog:

Version 1.1.0
-Add mobile device detect and a setting to force emoji parse on mobile devices.

Version 1.0
-Initial Release.





Before




After





Download Here

Chalky

Thanks for this!  It does everything it should but with one problem: with the package installed I get  symbols appearing throughout the text on all posts.  It appears after colons, capital letters, attaches itself to the forum smileys.... any ideas?

There is something funky with my forum, in that even though my database is UTF-8, and we've never had any of the problems associated with non-UTF-8 forums, my forum itself still thinks it's ISO and is using the ISO language packs for everything. I'm guessing that's the issue but wanted to see whether you had any suggestions before I embark on that mission...

Biology Forums

Thanks for the work, will wait till all the wrinkles are ironed out before using!

Chalky

Just reporting back that I have now converted my forum to full utf-8, a job that's needed doing for ages but I was dreading it because my forum is very heavily modded and the database was an unnerving mix of utf-8 and latin1 tables from being shifted around.  As a result, this mod now works perfectly!!!  Thank you!!

If anyone wants to see the results, you can see here  http://chalkcat.com/index.php?topic=4740.msg98198#msg98198

Gluz

Quote from: Chalky on July 12, 2016, 06:13:31 PM
Just reporting back that I have now converted my forum to full utf-8, a job that's needed doing for ages but I was dreading it because my forum is very heavily modded and the database was an unnerving mix of utf-8 and latin1 tables from being shifted around.  As a result, this mod now works perfectly!!!  Thank you!!

If anyone wants to see the results, you can see here  http://chalkcat.com/index.php?topic=4740.msg98198#msg98198
I forgot to mention that the forum and the database has to be in UTF-8 to work well with emojis.

If you want to be able to post emojis from your PC browser you need ane of the addons for that browser:
Chrome: https://chrome.google.com/webstore/detail/emoji-input-by-emojistuff/immhpnclomdloikkpcefncmfgjbkojmh
Firefox: https://addons.mozilla.org/es/firefox/addon/emoji-cheatsheet/




Quote from: Stylus on July 11, 2016, 03:54:01 PM
Thanks for the work, will wait till all the wrinkles are ironed out before using!
There are only a few emojis from the recent updates that are not in the style sheet,  it has a total of 1620 emojis to show.

shadav

this is nice, thank you for this
any chance on an update?

Advertisement: