예제 #1
0
 public function Emojify($sText)
 {
     Emojione::$ascii = Config::Get('plugin.emoji.use_ascii');
     if (!Config::Get('plugin.emoji.use_cdn')) {
         Emojione::$imagePathPNG = Plugin::GetTemplateWebPath(__CLASS__) . 'images/';
     }
     $sText = Emojione::toImage($sText);
     return $sText;
 }
예제 #2
0
 public function Init()
 {
     Emojione::$ascii = Config::Get('plugin.emoji.use_ascii');
     if (!Config::Get('plugin.emoji.use_cdn')) {
         Emojione::$imagePathPNG = Plugin::GetTemplateWebPath(__CLASS__) . 'images/';
     }
     $this->Viewer_AppendStyle(Plugin::GetTemplatePath(__CLASS__) . "css/style.css");
     $this->Viewer_AppendScript(Plugin::GetTemplatePath(__CLASS__) . "js/emo.js");
 }
예제 #3
0
<?php

# include the PHP library (if not autoloaded)
require './../lib/php/Emojione.class.php';
################################################
# Optional:
# default is PNG but you may also use SVG
Emojione::$imageType = 'svg';
# default is ignore ASCII smileys like :) but you can easily turn them on
Emojione::$ascii = true;
# if you want to host the images somewhere else
# you can easily change the default paths
Emojione::$imagePathPNG = './../assets/png/';
Emojione::$imagePathSVG = './../assets/svg/';
################################################
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PHP Demo &mdash; Emojione.com</title>
    <link rel="stylesheet" href="./../assets/css/emojione.min.css" type="text/css" media="all" />

    <style type="text/css">
        html,body {
            font-family:sans-serif;
            background-color: #333333;
        }
        #logo {
            background: url("http://www.emojione.com/images/emojione.png") no-repeat scroll center center rgba(0, 0, 0, 0);
            height: 141px;