Emoticon

Emoticon using icon fonts.

0 stars out of 5

0 0 0 0 0
  • Author Taufik Nurrohman
  • Maintainer 1
  • Member
  • Version 3.0.1

This extension replaces every emoticon and smiley patterns (which you can also set it yourself) into a graphical emoticon icons. Icon font credit to Icomoon.

Open .\lot\x\emoticon\state.php file to configure:

return [
    'type' => 1, // Can be `0` for hollow icon or `1` for solid icon
    // Determine character(s) to be recognized as emoticon(s)
    // Order does matter!
    'alter' => [
        'angry' => '>:( >:( 😠', // Must come before `:(`
        'baffle' => 'o_o O_o o_O 😯',
        'confuse' => ':s :S πŸ˜•',
        'cool' => 'B) 😎',
        'cry' => ':\'( T_T 😒 😭',
        'evil' => '>:) >:) 😈', // Must come before `:)`
        'frustrate' => '>:O >:O 😫',
        'grin' => ':)) 😁', // Must come before `:)`
        'happy' => ':D =D πŸ˜ƒ',
        'hipster' => ':3',
        'neutral' => ':| 😐',
        'sad' => ':( 😞 πŸ™ ☹',
        'sleepy' => ':OzZ πŸ˜ͺ', // Must come before `:O`
        'shock' => ':O 😲 😨',
        'smile' => ':) 😊 ☺',
        'tongue' => ':p :P πŸ˜‹ πŸ˜› 😜 😝',
        'wink' => ';) πŸ˜‰',
        'wonder' => ':\ :/ πŸ€”'
    ]
];

Any pattern defined in the array value, plus a :key: syntax, will be replaced with <span class="emoticon:key"></span> element. Any pattern found in the HTML opening tag (as a tag name, attribute name or value) will be ignored. Any pattern found in the HTML contents of <code>, <kbd>, <pre>, <script>, <style> and <textarea> will also be ignored.

You might also like:

0 Comments

No comments yet.