1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Enabling Emojione on Xenforo site

Discussion in 'Styling and Customization Questions' started by Baal, Feb 24, 2016.

  1. Baal

    Baal Member

    As the title says.

    Emojione one is a site that is trying to standardize emoji use online. They even have a nifty developer tool where you can download the whole package for various ways to upload to your own site:


    The only thing is, I'm not that familiar with xenforo still to see which is the best way of going about getting emojione on the site. They have a list of demos:


    They say for installation:

    We've teamed up with [JSDelivr](http://www.jsdelivr.com/#!emojione) to provide a simple way to install these emoji on any javascript-enabled website. Add the following script and stylesheet links to the head of your webpage:

    <script src="//cdn.jsdelivr.net/emojione/2.1.0/lib/js/emojione.min.js"></script>
    <link rel="stylesheet" href="//cdn.jsdelivr.net/emojione/2.1.0/assets/css/emojione.min.css"/>

    Alternatively, CDNjs is also available as a [CDN Host for Emoji One](https://cdnjs.com/libraries/emojione).

    Quick installs can also be done using NPM and Bower (for the Javascript toolkit) or Composer (for the PHP toolkit).
    maszd, IPF and rafass like this.
  2. rafass

    rafass Well-Known Member

  3. OperaManiac

    OperaManiac Well-Known Member

    To the best of my knowledge, XenForo cannot display emoji because of MySQL restriction.
    Pierce likes this.
  4. bottiger

    bottiger Active Member

  5. EQnoble

    EQnoble Well-Known Member

    Having looked over the dev docs just now really quick and seeing some of the configuration examples I find that you can use this even without full multibyte support in the DB since you can use shortnames -> image and since there is no multibyte sequences there are no compatibility issues as far as that is concerned.


    Plus if you added the emoji images to the smilies picker you wouldn't really need to store the multibyte sequence in the DB so if you wanted you could use the JS they include to convert the MB sequences in the editor (upon clicking 'post reply') into it's corresponding :shortname: before storing it in the database and when rendered in a post would display as an image.


    I would make a broad comparison and say this whole thing is similar to the process by which a custom bbcode mediasite entry is generated and rendered when the bbcode uses a match callback along with a html replacement callback.

    Since the post would be stored as :shortname: it would be future proof in way that if XF chooses to support full multibyte down the road one can use the post replacement addon for each emoji (or a script that hits all at once) and convert everything back to it's native multibyte sequence if they wanted to drop this script this thread was created for.

    So yes if someone had the ability to write a little bit of code and copy/paste some stuff it may be possible to get this working with their forum.
  6. OperaManiac

    OperaManiac Well-Known Member

    Right. I was hoping that someone would create an addon that uses EmojiOne. This is probably the safest bet for all kinds of server solutions as no database conversion would be required and it would support native emoji input on all platforms. And everyone would see the same emoji no matter what device is being used.
  7. EQnoble

    EQnoble Well-Known Member

    Ahh I see...after I read the first post and the linked to software's dev docs I misunderstood your post as saying the OP's software question was not possible due to the multibyte support issue you referenced rather than merely stating that xenforo doesn't support multibyte and because of that you support this addon. Sorry about that, you didn't like the post and the comment sounded contradictory to the OP when I read it aloud so I must have been confused.

    I mean it makes complete sense that at the moment they don't/can't support it because doing so would force forum owners to have the latest server software (which isn't possible on some hosts) and with that either cost them more money or price them out of the game (for many hobby and generally speaking small forum owners).

    I'm sure if you come up with some money that someone will make this for you.
  8. OperaManiac

    OperaManiac Well-Known Member

    It's more about the thing that Emojis are everywhere. And people expect them to just work. XenForo should support this feature natively as emoji are part of software keyboards on all smartphones and no one thinks twice these days before inserting one as part of the conversation. Now how they do it is something that they have to decide. If there was a (reasonably priced) add-on, I would get it. But that remains a stop-gap measure. As someone mentioned in this thread already, it would be great if XenForo developers can find a way to add support in XF2.

    Tapatalk worked around this limitation by bundling their own emoji picker which they converted to smiley as part of their add-on. This solution does not work if the user inserts an emoji using the device's keyboard.

    I am a big fan of EmojiOne though I am not sure if their license allows for usage in a paid product so there's that. Just found this:

    EmojiOne Smilies - Reviews | XenForo Community

    It's free. Not sure if by choice or because of EmojiOne license! Installing it :D

    PS: http://emojione.com/licensing/ states that commercial usage is allowed. Plugin developer just need to give attribution on its own page.
  9. bottiger

    bottiger Active Member

    It isn't hard to change XenForo to using utf8mb4.

    The problem I think is that they are trying to support ancient distros of Linux that are stuck on old versions of MySQL that don't have utf8mb4.

    Converting emojis to shortnames seems like a bad idea.
  10. EQnoble

    EQnoble Well-Known Member

    I won't argue with anything you said, I am not that concerned with emoji usage myself but the OP asked about this in 'customizations' not 'xf suggestions' so I was explaining for him how it could be integrated and not arguing for it or against changes.

    As far as converting to shortnames in the meantime, it's not really a problem if you have changed them to something which can be replaced down the road by it's full multibyte sequence though is not something I would want the core software to do.
  11. Freelancer

    Freelancer Well-Known Member

    Mouth likes this.

Share This Page