Hi everyone!
I've removed all the old tutorials temporarily until I can get round to updating them all. I know there is a lot of work to do on Avacweb, but I thought I'd take a moment to share a new tutorial with you anyway!
This may have already been achieved whilst I've been gone, but one of the first things I noticed on Forumotion when I returned is we're still using the awful emojis! iOS (Apple) emojis have become so well-known now that wouldn't it be better if we could just use those on our forum?
Conveniently Forumotion include the Unicode for emojis within the image they display so it makes it very easy for us to locate them and replace them.
This allows support for PMs and other types of posts.
And thats it!
Whenever you use an emoji from iOS or Samsung (and other platforms) in your posts you should now see it displayed as normal.
Please note! Emojis can vary between different platforms; Apple, Samsung, Android etc...
I've removed all the old tutorials temporarily until I can get round to updating them all. I know there is a lot of work to do on Avacweb, but I thought I'd take a moment to share a new tutorial with you anyway!
This may have already been achieved whilst I've been gone, but one of the first things I noticed on Forumotion when I returned is we're still using the awful emojis! iOS (Apple) emojis have become so well-known now that wouldn't it be better if we could just use those on our forum?
Conveniently Forumotion include the Unicode for emojis within the image they display so it makes it very easy for us to locate them and replace them.
1. Create a new Javascript
Be sure you have Javascript enabled for your forum. Create a new javascript and name it 'Native Emoji Support' or similar and choose 'In all pages'This allows support for PMs and other types of posts.
2. Paste this Javascript code
Paste this code as the content to your newly created Javascript code:- Code:
$(function() {
let emojis = document.querySelectorAll('img.emojione');
Array.from(emojis).forEach(e => {
if(e.alt.length) {
$(e).replaceWith(e.alt);
}
})
});
And thats it!
Whenever you use an emoji from iOS or Samsung (and other platforms) in your posts you should now see it displayed as normal.
Please note! Emojis can vary between different platforms; Apple, Samsung, Android etc...
- For those interested how it works:
Very simple, all emoji images have a classname of 'emojione', we simply go through them all checking they have an 'alt' attribute and replace the image with their 'alt' attribute which very conveniently is the Unicode for the emoji.