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");
 }
Esempio n. 2
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;
 }
Esempio n. 3
0
}
$lang = function_exists('set_language') ? set_language() : 'en_US';
include dirname(__FILE__) . '/includes/bootstrap.php';
try {
    $ucp = \UCP\UCP::create();
    $ucp->Modgettext->textdomain("ucp");
} catch (\Exception $e) {
    if (isset($_REQUEST['quietmode'])) {
        echo json_encode(array("status" => false, "message" => "UCP is disabled"));
    } else {
        echo "<html><head><title>UCP</title></head><body style='background-color: rgb(211, 234, 255);'><div style='border-radius: 5px;border: 1px solid black;text-align: center;padding: 5px;width: 90%;margin: auto;left: 0px;right: 0px;background-color: rgba(53, 77, 255, 0.18);'>" . _('UCP is currently disabled. Please talk to your system Administrator') . "</div></body></html>";
    }
    die;
}
ob_end_clean();
\Emojione::$imagePathPNG = 'assets/images/emoji/png/';
// defaults to jsdelivr's free CDN
\Emojione::$imagePathSVG = 'assets/images/emoji/svg/';
// defaults to jsdelivr's free CDN
$user = $ucp->User->getUser();
if (isset($_REQUEST['logout']) && $user) {
    $ucp->User->logout();
    $user = $ucp->User->getUser();
}
if (empty($ucp->Session->isMobile)) {
    $ucp->Session->isMobile = $ucp->detect->isMobile();
    $ucp->Session->isTablet = $ucp->detect->isTablet();
}
//Send back only PJAX relevant data
//This is to force a complete page refresh if/when UCP gets updates
//The header HTTP_X_PJAX comes from the JS PJAX lib, letting us know we don't need the whole html document
Esempio n. 4
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;