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:
@@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user