2017-08-20 10:43:33 -04:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* Name: Unicode Smilies
|
2017-09-06 12:16:33 -04:00
|
|
|
* Description: Smilies based on the unicode emojis - On Linux use https://github.com/eosrei/emojione-color-font to see them in color
|
2017-08-20 10:43:33 -04:00
|
|
|
* Version: 1.0
|
|
|
|
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
|
|
|
|
*/
|
|
|
|
|
|
|
|
require_once 'include/Smilies.php';
|
|
|
|
|
|
|
|
function unicode_smilies_install() {
|
|
|
|
register_hook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
|
|
|
|
}
|
|
|
|
|
|
|
|
function unicode_smilies_uninstall() {
|
|
|
|
unregister_hook('smilie', 'addon/unicode_smilies/unicode_smilies.php', 'unicode_smilies_smilies');
|
|
|
|
}
|
|
|
|
|
|
|
|
function unicode_smilies_smilies(&$a,&$b) {
|
|
|
|
Smilies::add($b, ':-)', '😀');
|
|
|
|
Smilies::add($b, ':)', '😀');
|
|
|
|
Smilies::add($b, ':-(', '🙁');
|
|
|
|
Smilies::add($b, ':(', '🙁');
|
2017-08-20 14:41:53 -04:00
|
|
|
Smilies::add($b, ':-[', '😳');
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':-D', '😁');
|
|
|
|
Smilies::add($b, ':D', '😁');
|
|
|
|
Smilies::add($b, ';-)', '😉');
|
2017-10-01 23:20:11 -04:00
|
|
|
// Smilies::add($b, ';)', '😉'); // Deactivated since this leads to disturbed html entities
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':-P', '😛');
|
|
|
|
Smilies::add($b, ':-p', '😛');
|
|
|
|
Smilies::add($b, ':-O', '😮');
|
|
|
|
Smilies::add($b, ':-X', '🤐');
|
|
|
|
Smilies::add($b, ':-x', '🤐');
|
|
|
|
Smilies::add($b, '8-)', '😎');
|
|
|
|
Smilies::add($b, ':-/', '😕');
|
2017-08-20 14:41:53 -04:00
|
|
|
Smilies::add($b, ':-"', '💏');
|
|
|
|
Smilies::add($b, ':-"', '💏');
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':-!', '🤒');
|
|
|
|
Smilies::add($b, '<3', '❤');
|
|
|
|
Smilies::add($b, '</3', '💔');
|
|
|
|
Smilies::add($b, '<\\3', '💔');
|
2017-08-20 14:41:53 -04:00
|
|
|
Smilies::add($b, '8-|', '😲');
|
|
|
|
Smilies::add($b, '8-O', '😲');
|
|
|
|
Smilies::add($b, '\\o/', '👍');
|
|
|
|
Smilies::add($b, ":'(", '😢');
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':coffee', '☕');
|
|
|
|
Smilies::add($b, ':beer', '🍺');
|
2017-08-20 14:41:53 -04:00
|
|
|
Smilies::add($b, ':homebrew', '🍺');
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':like', '👍');
|
|
|
|
Smilies::add($b, ':dislike', '👎');
|
|
|
|
// Smilies::add($b, 'o.O', '&#x;');
|
|
|
|
// Smilies::add($b, 'O.o', '&#x;');
|
|
|
|
// Smilies::add($b, 'o_O', '&#x;');
|
|
|
|
// Smilies::add($b, 'O_o', '&#x;');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':facepalm', '🤦'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
|
|
|
|
// Animal smileys.
|
|
|
|
|
|
|
|
// Smilies::add($b, ':bunnyflowers', '&#x;');
|
|
|
|
Smilies::add($b, ':chick', '🐤');
|
|
|
|
Smilies::add($b, ':bumblebee', '🐝');
|
|
|
|
Smilies::add($b, ':ladybird', '🐞');
|
|
|
|
Smilies::add($b, ':bigspider', '🕷');
|
|
|
|
Smilies::add($b, ':cat', '🐈');
|
|
|
|
Smilies::add($b, ':bunny', '🐰');
|
|
|
|
Smilies::add($b, ':cow', '🐮');
|
|
|
|
Smilies::add($b, ':crab', '🦀');
|
|
|
|
Smilies::add($b, ':dolphin', '🐬');
|
|
|
|
// Smilies::add($b, ':dragonfly', '&#x;');
|
|
|
|
Smilies::add($b, ':frog', '🐸');
|
|
|
|
Smilies::add($b, ':hamster', '🐹');
|
|
|
|
Smilies::add($b, ':monkey', '🐒');
|
|
|
|
Smilies::add($b, ':horse', '🐴');
|
|
|
|
// Smilies::add($b, ':parrot', '&#x;');
|
|
|
|
Smilies::add($b, ':tux', '🐧');
|
|
|
|
Smilies::add($b, ':snail', '🐌');
|
|
|
|
Smilies::add($b, ':sheep', '🐑');
|
|
|
|
Smilies::add($b, ':dog', '🐶');
|
|
|
|
Smilies::add($b, ':elephant', '🐘');
|
|
|
|
Smilies::add($b, ':fish', '🐟');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':giraffe', '🦒'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':pig', '🐖');
|
|
|
|
|
|
|
|
// Baby Smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':baby', '👶');
|
|
|
|
// Smilies::add($b, ':babycot', '&#x;');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':pregnant', '🤰'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
// Smilies::add($b, ':stork', '&#x;');
|
|
|
|
|
|
|
|
// Confused Smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':confused', '😕');
|
|
|
|
Smilies::add($b, ':shrug', '🤷');
|
|
|
|
// Smilies::add($b, ':stupid', '&#x;');
|
|
|
|
// Smilies::add($b, ':dazed', '&#x;');
|
|
|
|
|
|
|
|
// Cool Smileys
|
|
|
|
|
|
|
|
// Smilies::add($b, ':affro', '&#x;');
|
|
|
|
|
|
|
|
// Devil/Angel Smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':angel', '👼');
|
|
|
|
Smilies::add($b, ':cherub', '👼');
|
|
|
|
// Smilies::add($b, ':devilangel', '&#x;');
|
|
|
|
// Smilies::add($b, ':catdevil', '&#x;');
|
|
|
|
// Smilies::add($b, ':devillish', '&#x;');
|
|
|
|
// Smilies::add($b, ':daseesaw', '&#x;');
|
|
|
|
// Smilies::add($b, ':turnevil', '&#x;');
|
|
|
|
// Smilies::add($b, ':saint', '&#x;');
|
|
|
|
// Smilies::add($b, ':graveside', '&#x;');
|
|
|
|
|
|
|
|
// Unpleasent smileys.
|
|
|
|
|
|
|
|
Smilies::add($b, ':toilet', '🚽');
|
|
|
|
// Smilies::add($b, ':fartinbed', '&#x;');
|
|
|
|
// Smilies::add($b, ':fartblush', '&#x;');
|
|
|
|
|
|
|
|
// Sad smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':crying', '😢');
|
|
|
|
// Smilies::add($b, ':prisoner', '&#x;');
|
|
|
|
// Smilies::add($b, ':sigh', '&#x;');
|
|
|
|
|
|
|
|
// Smoking - only one smiley in here, maybe it needs moving elsewhere?
|
|
|
|
|
|
|
|
Smilies::add($b, ':smoking', '🚬');
|
|
|
|
|
|
|
|
// Sport smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':basketball', '🏀');
|
|
|
|
Smilies::add($b, '~bowling', '🎳');
|
|
|
|
Smilies::add($b, ':cycling', '🚴');
|
|
|
|
Smilies::add($b, ':darts', '🎯');
|
|
|
|
Smilies::add($b, ':fencing', '🤺');
|
|
|
|
Smilies::add($b, ':juggling', '🤹');
|
|
|
|
// Smilies::add($b, ':skipping', '&#x;');
|
|
|
|
// Smilies::add($b, ':archery', '&#x;');
|
|
|
|
Smilies::add($b, ':surfing', '🏄');
|
|
|
|
Smilies::add($b, ':snooker', '🎱');
|
|
|
|
Smilies::add($b, ':horseriding', '🏇');
|
|
|
|
|
|
|
|
// Love smileys
|
|
|
|
|
|
|
|
// Smilies::add($b, ':iloveyou', '&#x;');
|
|
|
|
// Smilies::add($b, ':inlove', '&#x;');
|
|
|
|
// Smilies::add($b, '~love', '&#x;');
|
|
|
|
// Smilies::add($b, ':lovebear', '&#x;');
|
|
|
|
// Smilies::add($b, ':lovebed', '&#x;');
|
|
|
|
Smilies::add($b, ':loveheart', '💖');
|
|
|
|
|
|
|
|
// Tired/Sleep smileys
|
|
|
|
|
|
|
|
// Smilies::add($b, ':countsheep', '&#x;');
|
|
|
|
// Smilies::add($b, ':hammock', '&#x;');
|
|
|
|
// Smilies::add($b, ':pillow', '&#x;');
|
|
|
|
// Smilies::add($b, ':yawn', '&#x;');
|
|
|
|
|
|
|
|
// Fight/Flame/Violent smileys
|
|
|
|
|
|
|
|
// Smilies::add($b, ':2guns', '&#x;');
|
|
|
|
// Smilies::add($b, ':alienfight', '&#x;');
|
|
|
|
// Smilies::add($b, ':army', '&#x;');
|
|
|
|
// Smilies::add($b, ':arrowhead', '&#x;');
|
|
|
|
// Smilies::add($b, ':bfg', '&#x;');
|
|
|
|
// Smilies::add($b, ':bowman', '&#x;');
|
|
|
|
// Smilies::add($b, ':chainsaw', '&#x;');
|
|
|
|
// Smilies::add($b, ':crossbow', '&#x;');
|
|
|
|
// Smilies::add($b, ':crusader', '&#x;');
|
|
|
|
// Smilies::add($b, ':dead', '&#x;');
|
|
|
|
// Smilies::add($b, ':hammersplat', '&#x;');
|
|
|
|
// Smilies::add($b, ':lasergun', '&#x;');
|
|
|
|
// Smilies::add($b, ':machinegun', '&#x;');
|
|
|
|
// Smilies::add($b, ':acid', '&#x;');
|
|
|
|
|
|
|
|
// Fantasy smileys - monsters and dragons fantasy. The other type of fantasy belongs in adult smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':alienmonster', '👾');
|
|
|
|
// Smilies::add($b, ':barbarian', '&#x;');
|
|
|
|
// Smilies::add($b, ':dinosaur', '&#x;');
|
|
|
|
Smilies::add($b, ':dragon', '🐉');
|
|
|
|
Smilies::add($b, ':draco', '🐉');
|
|
|
|
Smilies::add($b, ':ghost', '👻');
|
|
|
|
// Smilies::add($b, ':mummy', '&#x;');
|
|
|
|
|
|
|
|
// Food smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':apple', '🍎');
|
|
|
|
// Smilies::add($b, ':broccoli', '&#x;');
|
|
|
|
Smilies::add($b, ':cake', '🍰');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':carrot', '🥕'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':popcorn', '🍿');
|
|
|
|
Smilies::add($b, ':tomato', '🍅');
|
|
|
|
Smilies::add($b, ':banana', '🍌');
|
|
|
|
Smilies::add($b, ':cooking', '🍳');
|
|
|
|
Smilies::add($b, ':fryegg', '🍳');
|
|
|
|
Smilies::add($b, ':birthdaycake', '🎂');
|
|
|
|
|
|
|
|
// Happy smileys
|
|
|
|
|
|
|
|
// Smilies::add($b, ':cloud9', '&#x;');
|
|
|
|
Smilies::add($b, ':tearsofjoy', '😂');
|
|
|
|
|
|
|
|
// Respect smileys
|
|
|
|
|
|
|
|
Smilies::add($b, ':bow', '🙇');
|
|
|
|
// Smilies::add($b, ':bravo', '&#x;');
|
|
|
|
// Smilies::add($b, ':hailking', '&#x;');
|
|
|
|
// Smilies::add($b, ':number1', '&#x;');
|
|
|
|
|
|
|
|
// Laugh smileys
|
|
|
|
|
|
|
|
// Smilies::add($b, ':hahaha', '&#x;');
|
|
|
|
// Smilies::add($b, ':loltv', '&#x;');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':rofl', '🤣'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
// Music smileys
|
|
|
|
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':drums', '🥁'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':guitar', '🎸');
|
|
|
|
Smilies::add($b, ':trumpet', '🎺');
|
|
|
|
|
|
|
|
// Smileys that used to be in core
|
|
|
|
|
|
|
|
// Smilies::add($b, ':headbang', '&#x;');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':beard', '🧔'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
// Smilies::add($b, ':whitebeard', '&#x;');
|
|
|
|
// Smilies::add($b, ':shaka', '&#x;');
|
|
|
|
// Smilies::add($b, ':\\.../', '&#x;');
|
|
|
|
// Smilies::add($b, ':\\ooo/', '&#x;');
|
|
|
|
// Smilies::add($b, ':headdesk', '&#x;');
|
|
|
|
|
|
|
|
// These two are still in core, so oldcore isn't strictly right, but we don't want too many directories
|
|
|
|
|
|
|
|
// Smilies::add($b, ':-d', '&#x;');
|
|
|
|
Smilies::add($b, ':-o', '😮');
|
|
|
|
|
|
|
|
// Regex killers - stick these at the bottom so they appear at the end of the English and
|
|
|
|
// at the start of $OtherLanguage.
|
|
|
|
|
2017-09-16 01:10:54 -04:00
|
|
|
// Drinks
|
|
|
|
|
|
|
|
Smilies::add($b, ':tea', '☕');
|
|
|
|
// Smilies::add($b, ':drool', '🤤'); // Bad client support
|
|
|
|
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':cool', '🆒');
|
2017-08-20 14:41:53 -04:00
|
|
|
// Smilies::add($b, ':vomit', '🤮'); // Bad client support
|
2017-08-20 10:43:33 -04:00
|
|
|
Smilies::add($b, ':golf', '🏌');
|
|
|
|
Smilies::add($b, ':football', '🏈');
|
|
|
|
Smilies::add($b, ':tennis', '🎾');
|
|
|
|
// Smilies::add($b, ':alpha', '&#x;');
|
|
|
|
// Smilies::add($b, ':marine', '&#x;');
|
|
|
|
Smilies::add($b, ':sabre', '🗡');
|
|
|
|
// Smilies::add($b, ':tank', '&#x;');
|
|
|
|
// Smilies::add($b, ':viking', '&#x;');
|
|
|
|
// Smilies::add($b, ':gangs', '&#x;');
|
|
|
|
// Smilies::add($b, ':dj', '&#x;');
|
|
|
|
// Smilies::add($b, ':elvis', '&#x;');
|
|
|
|
Smilies::add($b, ':violin', '🎻');
|
|
|
|
}
|