News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

EmojiOne

Started by nend, March 21, 2016, 12:21:54 PM

Previous topic - Next topic

nend

Link to Mod

EmojiOne is not BBC but functions in the same space as BBC.

This mod add some support for converting emoji decimal input into their hexadecimal counterpart. With the hexadecimal data this mod replaces the decimal data with the appropriate emoji from the EmojiOne CDN server.

License
Copyright (c) 2016, Russell Najar
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

nend

+ Added more emoji support

New required PHP version for 0.2 is now 4.0.6

For more technical details on release.
https://github.com/sicommnend/SMF-EmojiOne/commit/3d1034b80eccfde3db22e3d3c192af014bb11a8e

Also note, going through those Unicode Emoji tables, no fun at all, spent a good amount of time figuring out what codes are supported by EmojiOne, still not perfect but refining takes some time.

If you notice a code that isn't working please post the exact code here so I can investigate it. If you can't post it here then post a link to it somewhere.

Biology Forums

Let me understand, I can now add emojis to my posts... but when I'm on my PC, it is a smiley (as in an image)? What about when I'm editting a post containing an emoji on a PC, what does it appear as?

nend

It will be displayed the same across devices when viewing post.

However when editing or posting you would see your devices charset of that particular emoji. Most OSes that don't support a particular one will only show a box when editing or posting.

Biology Forums

Quote from: nend on March 22, 2016, 10:19:22 AM
It will be displayed the same across devices when viewing post.

However when editing or posting you would see your devices charset of that particular emoji. Most OSes that don't support a particular one will only show a box when editing or posting.

Can you make it so that when editing on a PC, it shows :EMOJI_DESCRIPTION:

Hudzon

#5
if from tapatalk they work fine if from PC or mobile chrome they are very large
hxxp:delreefclub.org/smf/index.php?topic=9886.new#new [nonactive]

chrishicks

Quote from: Hudzon on March 23, 2016, 12:04:27 AM
if from phone they work fine if from PC they are very large
http://delreefclub.org/smf/index.php?topic=9886.new#new

I have no idea for a fix but I took a look at the image and wow...



Those are some huge image dimensions. Maybe a conflicting mod?


nend

My bad there on the size, I was thinking SMF had the smiley class defined by default.

Simple fix though, add this to your index.css.


img.smiley {
max-width:30px;
max-height:30px;
}


Change the height and width to your desired max dimensions. ;)

Hudzon

That did it, 25px was a perfect fit
Thanks for the quick reply.

nend

Quote from: Hudzon on March 23, 2016, 12:40:25 AM
That did it, 25px was a perfect fit
Thanks for the quick reply.

No problem, going to do a release with the CSS fix, don't worry about updating since you did the CSS manually. ;)

New release 0.2.1
* Just a CSS fix for themes who don't have max-width and height set for smiley class.

Detailed changes @ Github
https://github.com/sicommnend/SMF-EmojiOne/commit/fafe123131e5803a6c7fd0986ee6cafbc078b016

nend

EmojiOne just released 2.1.2 of their emoji codes. Will have to go through it and see what ranges I need to adjust to add the new emojis.

Also found a problem with flags and a few other codes that use more than one character. Will have to set up another range detection or mask for these.

Gluz

Ih, I see that someone already say the size thing, and as you noted, some of the multicharacter emojis didn't show.

I used Whatsapp to send to myself all the emojis and then posted in my local test forum to see if all the codes were added in my MOD.

nend

I have a few more modifiers to add to complete the 0.3 release.

Anyone that wants to test can get a source copy on my GitHub.

nend

0.3 released

+ Added support for one modifier character, ranges for color and flags.

This release adds support for one modifier character for emoji's. It doesn't add support for emoji's with greater characters, for example, the only one I can think of is the group emoji's like family, which are only a few emoji's.

For now the group emoji's will still render, but will render as separate emoji's.

nend

EmojiOne just released 2.1.3 of their emoji's, that was fast.

Will upload an update tomorrow.

nend

EmojiOne 0.3.1 Released.

* Changed class for EmojiOne emoji's from smiley to SM_EmojiOne
* Updated CDN from 2.1.2 to 2.1.3

To update uninstall the old mod, then delete it and then install the new one.

nend

Consolidating 1.0

1.0 will come with the option of choosing alternative CDN's. You will have the option to point the modification at any other CDN other than the default EmojiOne.

Reason being is I found the Twitter emoji's everyone has been asking for and they are named appropriately for this modification.

This will sway this modification from only EmojiOne so a name change of the modification is apparently needed.  :-\

bjornforum

Hi!

First of all: thanks for your plugin!

I had your plugin installed on synology-forum.nl, but it seems it's causing troubles for special characters like ï which suddenly display as ?

See http://www.synology-forum.nl/auto-sub/auto-sub-wilt-niet-installeren/msg191717/#msg191717

As soon as I uninstalled emoji one, this was ok again. Do you know how to fix that?

Maybe a suggestion: Tapatalk translates the emoji's itself to bbcode like [emoji2 ] which is replaced by emoticon images from the tapatalk servers. Would it be possible to also include these bbcodes in the plugin, so not the tapatalk emoji's, but the emoji one emoji's are displayed?

Thanks!
Björn

bjornforum

Nevermind.. Database was still ISO-8859.. Converting it to UTF-8 fixes it.

bjornforum

I did find another bug (?): When a emoji is used in a message, the preview doesn't work anymore. See attachment.

Please note that I am not talking about the normal emoticons, which in my case happen to be Emoji One emoji's as well. The emoji in the screenshot is an actual os x emoji.

Advertisement: