diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index fb10d12b2..d576a74e7 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -16,14 +16,15 @@ if(!defined('e107_INIT')) require_once('../../class2.php'); } -if(USER) -{ - define('e_TINYMCE_TEMPLATE', 'member'); // allow images / videos. -} -else -{ - define('e_TINYMCE_TEMPLATE', 'public'); -} +// Now defined in shortcodes that handle the editors +// if(USER) +// { +// define('e_TINYMCE_TEMPLATE', 'member'); // allow images / videos. +// } +// else +// { +// define('e_TINYMCE_TEMPLATE', 'public'); +// } define('NAVIGATION_ACTIVE','forum'); // ?? diff --git a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php index fbb752604..53a870207 100644 --- a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php @@ -153,7 +153,13 @@ class plugin_forum_post_shortcodes extends e_shortcode { $tp = e107::getParser(); - + // Define which tinymce4 template should be used, depending if the current user is registered or a guest + if (!deftrue('e_TINYMCE_TEMPLATE')) + { + define('e_TINYMCE_TEMPLATE', (USER ? 'member' : 'public')); // allow images / videos. + } + + if(!empty($_POST['post'])) { $text = $tp->post_toForm($_POST['post']); @@ -182,7 +188,8 @@ class plugin_forum_post_shortcodes extends e_shortcode //$wysiwyg = ($editor === 'bbcode') ? false : null; $wysiwyg = is_null($editor) ? 'default' : $editor; - return e107::getForm()->bbarea('post',$text,'forum','_common','large', array('wysiwyg' => $wysiwyg)); + //return e107::getForm()->bbarea('post',$text,'forum','_common','large', array('wysiwyg' => $wysiwyg)); + return e107::getForm()->bbarea('post',$text,'forum','forum','large', array('wysiwyg' => $wysiwyg)); } diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 079e497db..cc5c14bb0 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -1188,6 +1188,12 @@ { global $forum, $forum_quickreply; + // Define which tinymce4 template should be used, depending if the current user is registered or a guest + if (!deftrue('e_TINYMCE_TEMPLATE')) + { + define('e_TINYMCE_TEMPLATE', (USER ? 'member' : 'public')); // allow images / videos. + } + if($forum->checkPerm($this->var['thread_forum_id'], 'post') && $this->var['thread_active']) { //XXX Show only on the last page?? @@ -1224,7 +1230,8 @@ $text = "
" . - e107::getForm()->bbarea('post','','forum', '_common', 'small', array('id' => 'forum-quickreply-text', 'wysiwyg' => $editor)) . +// e107::getForm()->bbarea('post','','forum', '_common', 'small', array('id' => 'forum-quickreply-text', 'wysiwyg' => $editor)) . + e107::getForm()->bbarea('post','','forum', 'forum', 'medium', array('id' => 'forum-quickreply-text', 'wysiwyg' => $editor)) . "
diff --git a/e107_plugins/tinymce4/templates/member.xml b/e107_plugins/tinymce4/templates/member.xml index 6b1c74a41..761df612f 100644 --- a/e107_plugins/tinymce4/templates/member.xml +++ b/e107_plugins/tinymce4/templates/member.xml @@ -3,7 +3,7 @@ advlist autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualchars fullscreen insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor edit view insert format table tools - undo redo | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link image media table | smileys | fullscreen + undo redo | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link image media table | e107-image e107-video e107-glyph smileys | fullscreen e107 false false