higoka / smiley-comments

Use smileys in comments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smiley Comments

Addon to use for BrainCMS that adds smileys support to the comments.

Example: https://picr.ws/i/rsn

Setup

Download the ZIP file and extract it. Replace all the files with the files from BrainCMS. Next, add this code at the bottom of the file system/brain-config.php. (Above ?>)

/**
 * Smiley Addon
 */
$config['smileys'] = [
    /**
     * Enable / disable the smileys
     */
    'enabled' => true,

    /**
     * Directory where the smileys are stored.
     */
    'directory' => '/templates/brain/style/images/smileys',

    /**
     * Add your own replacements
     */
    'replacements' => [
        ':)'     => 'smiling.svg',
        ':('     => 'sad.svg',
        ';)'     => 'wink.svg',
        ':P'     => 'tongue-out-1.svg',
        ':D'     => 'happy-1.svg',
        ':\'('   => 'unhappy.svg',
        '>:(' => 'angry.svg',
        ':*'     => 'kissing.svg',
    ],
];

If done correctly, you now have setup smiley in the comments.

Contribute

Contribution, bug fixes etc are always welcome.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Use smileys in comments

License:MIT License


Languages

Language:PHP 100.0%