1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 18:32:44 +02:00

TinyMce now includes e107 emoticons.

This commit is contained in:
Cameron
2015-04-10 18:58:13 -07:00
parent cc76f8e75e
commit 3aa5633533
29 changed files with 365 additions and 11 deletions

View File

@@ -215,15 +215,22 @@ class wysiwyg
{
return;
}
$tmp = explode(" ",$data);
if(e107::pref('core','smiley_activate',false))
{
$tmp[] = "smileys";
}
$ext = array();
foreach($tmp as $val)
{
$ext[$val] = e_PLUGIN_ABS."tinymce4/plugins/".$val."/plugin.js";
}
return json_encode($ext);
@@ -274,6 +281,7 @@ class wysiwyg
{
$tp = e107::getParser();
$fl = e107::getFile();
if(getperms('0'))
{
@@ -331,6 +339,43 @@ class wysiwyg
// Emoticon Support @see //https://github.com/nhammadi/Smileys
if(e107::pref('core','smiley_activate',false))
{
$emo = e107::getConfig("emote")->getPref();
$pack = e107::pref('core','emotepack');
$emotes = array();
$i = 0;
$c = 0;
foreach($emo as $path=>$co)
{
$codes = explode(" ",$co);
$url = SITEURLBASE.e_IMAGE_ABS."emotes/" . $pack . "/" . str_replace("!",".",$path);
$emotes[$i][] = array('shortcut'=>$codes, 'url'=>$url, 'title'=>ucfirst($path));
if($c == 6)
{
$i++;
$c = 0;
}
else
{
$c++;
}
}
// print_r($emotes);
$ret['extended_smileys'] = json_encode($emotes);
}
$ret['convert_fonts_to_spans'] = false;
$ret['content_css'] = e_PLUGIN_ABS.'tinymce4/editor.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css,http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css';