1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Issue #1433 - Allow Images/Video posting with TinyMce for members (member.xml) and not for anonymous/public. (public.xml)

This commit is contained in:
Cameron
2016-03-23 09:16:54 -07:00
parent 5cac882925
commit f1a2c00160
4 changed files with 21 additions and 13 deletions

View File

@@ -3173,9 +3173,9 @@ class e_parser
protected $allowedTags = array('html', 'body','div','a','img','table','tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b', protected $allowedTags = array('html', 'body','div','a','img','table','tr', 'td', 'th', 'tbody', 'thead', 'colgroup', 'b',
'i', 'pre','code', 'strong', 'u', 'em','ul', 'ol', 'li','img','h1','h2','h3','h4','h5','h6','p', 'i', 'pre','code', 'strong', 'u', 'em','ul', 'ol', 'li','img','h1','h2','h3','h4','h5','h6','p',
'div','pre','section','article', 'blockquote','hgroup','aside','figure','figcaption', 'abbr','span', 'audio', 'video', 'br', 'div','pre','section','article', 'blockquote','hgroup','aside','figure','figcaption', 'abbr','span', 'audio', 'video', 'br',
'small', 'caption', 'noscript', 'hr', 'section' 'small', 'caption', 'noscript', 'hr', 'section', 'iframe'
); );
protected $scriptTags = array('script','applet','iframe','form','input','button'); //allowed when $pref['post_script'] is enabled. protected $scriptTags = array('script','applet','form','input','button'); //allowed when $pref['post_script'] is enabled.
protected $blockTags = array('pre','div','h1','h2','h3','h4','h5','h6','blockquote'); // element includes its own line-break. protected $blockTags = array('pre','div','h1','h2','h3','h4','h5','h6','blockquote'); // element includes its own line-break.

View File

@@ -16,8 +16,15 @@ if(!defined('e107_INIT'))
require_once('../../class2.php'); require_once('../../class2.php');
} }
if(USER)
{
define('e_TINYMCE_TEMPLATE', 'member'); // allow images / videos.
}
else
{
define('e_TINYMCE_TEMPLATE', 'public');
}
define('e_TINYMCE_TEMPLATE', 'public');
define('NAVIGATION_ACTIVE','forum'); // ?? define('NAVIGATION_ACTIVE','forum'); // ??
$tp = e107::getParser(); $tp = e107::getParser();

View File

@@ -1,11 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<tinymce name="Main Admin" version="4"> <tinymce name="Member" version="4">
<plugins>advlist autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualchars fullscreen <plugins>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 </plugins> insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor </plugins>
<menubar>edit view insert table tools</menubar> <menubar>edit view insert format table tools</menubar>
<toolbar1>undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | smileys | preview</toolbar1> <toolbar1>undo redo | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link image media table | smileys | fullscreen</toolbar1>
<external_plugins>e107 compat3x</external_plugins> <external_plugins>e107</external_plugins>
<image_advtab>false</image_advtab> <image_advtab>false</image_advtab>
<media_alt_source>false</media_alt_source>
<media_dimensions>false</media_dimensions>
<media_poster>false</media_poster>
<plugin_preview_width>800</plugin_preview_width> <plugin_preview_width>800</plugin_preview_width>
<extended_valid_elements>i[*], bbcode[*]</extended_valid_elements> <extended_valid_elements>i[*], bbcode[*]</extended_valid_elements>
<templates>[ <templates>[
@@ -13,11 +16,6 @@
title: "Bootstrap table", title: "Bootstrap table",
url: "{e_PLUGIN}tinymce4/snippets/bootstrap_table.htm", url: "{e_PLUGIN}tinymce4/snippets/bootstrap_table.htm",
description: "Adds a Bootstrap 3 table" description: "Adds a Bootstrap 3 table"
},
{
title: "Example",
content: "Example Content",
description: "Adds an example."
} }
] ]
</templates> </templates>

View File

@@ -3,9 +3,12 @@
<plugins>advlist autosave lists link charmap print preview hr anchor pagebreak searchreplace wordcount visualchars fullscreen <plugins>advlist autosave lists link charmap print preview hr anchor pagebreak searchreplace wordcount visualchars fullscreen
insertdatetime nonbreaking table contextmenu directionality emoticons template paste textcolor </plugins> insertdatetime nonbreaking table contextmenu directionality emoticons template paste textcolor </plugins>
<menubar>edit view insert format table tools</menubar> <menubar>edit view insert format table tools</menubar>
<toolbar1>undo redo | removeformat | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link table smileys | fullscreen</toolbar1> <toolbar1>undo redo | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent | link table smileys | fullscreen</toolbar1>
<external_plugins>e107</external_plugins> <external_plugins>e107</external_plugins>
<image_advtab>false</image_advtab> <image_advtab>false</image_advtab>
<media_alt_source>false</media_alt_source>
<media_dimensions>false</media_dimensions>
<media_poster>false</media_poster>
<plugin_preview_width>800</plugin_preview_width> <plugin_preview_width>800</plugin_preview_width>
<extended_valid_elements>i[*], bbcode[*]</extended_valid_elements> <extended_valid_elements>i[*], bbcode[*]</extended_valid_elements>
<table_default_attributes>{ class: 'table table-striped table-bordered' }</table_default_attributes> <table_default_attributes>{ class: 'table table-striped table-bordered' }</table_default_attributes>