1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Issue #1433 Remove confusion about image attachments in forum posts. PDF files now added to default filetypes during install.

This commit is contained in:
Cameron
2016-03-21 10:45:01 -07:00
parent c0501146ae
commit 4db14510de
5 changed files with 54 additions and 17 deletions

View File

@@ -1274,7 +1274,7 @@ function update_706_to_800($type='')
{
$data = '<?xml version="1.0" encoding="utf-8"?>
<e107Filetypes>
<class name="253" type="zip,gz,jpg,jpeg,png,gif,xml" maxupload="2M" />
<class name="253" type="zip,gz,jpg,jpeg,png,gif,xml,pdf" maxupload="2M" />
</e107Filetypes>';
file_put_contents(e_SYSTEM."filetypes.xml",$data);

View File

@@ -17,7 +17,7 @@ if(!defined('e107_INIT'))
}
define('e_TINYMCE_TEMPLATE', 'public');
define('NAVIGATION_ACTIVE','forum'); // ??
$tp = e107::getParser();

View File

@@ -22,7 +22,15 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
e107::js('footer', '//cdn.tinymce.com/4/tinymce.min.js');
// e107::js('footer', "//cdn.tinymce.com/4/tinymce.min.js");
e107::js('footer',e_PLUGIN.'tinymce4/wysiwyg.php','jquery',5);
$mceScript = e_PLUGIN.'tinymce4/wysiwyg.php';
if(defined('e_TINYMCE_TEMPLATE'))
{
$mceScript .= '?config='.e_TINYMCE_TEMPLATE.'&other=';
}
e107::js('footer',$mceScript,'jquery',5);
// Add to e107_config.php to view hidden content when TinyMce not saving correctly
if(deftrue('e_TINYMCE_DEBUG'))

View File

@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<tinymce name="Public" version="4">
<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>
<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>
<external_plugins>e107</external_plugins>
<image_advtab>false</image_advtab>
<plugin_preview_width>800</plugin_preview_width>
<extended_valid_elements>i[*], bbcode[*]</extended_valid_elements>
<table_default_attributes>{ class: 'table table-striped table-bordered' }</table_default_attributes>
</tinymce>

View File

@@ -113,12 +113,15 @@ $output = str_replace("{e_PLUGIN_ABS}", e_PLUGIN_ABS, $text);
$wy = new wysiwyg();
$gen = $wy->renderConfig();
$config = varset($_GET['config'],false); // e_QUERY;
$gen = $wy->renderConfig($config);
define('USE_GZIP', true);
if(ADMIN && e_QUERY == 'debug')
if(ADMIN && e_QUERY == 'debug' || !empty($_GET['debug']))
{
define('e_IFRAME', true);
require_once(HEADERF);
@@ -309,7 +312,12 @@ class wysiwyg
$tp = e107::getParser();
$fl = e107::getFile();
if($config !== false)
{
$template = $tp->filter($config).".xml";
}
else
{
if(getperms('0'))
{
$template = "mainadmin.xml";
@@ -327,6 +335,15 @@ class wysiwyg
$template = "public.xml";
}
}
if(($template == 'mainadmin.xml' && !getperms('0')) || ($template == 'admin.xml' && !ADMIN))
{
$template = 'public.xml';
}
$configPath = (is_readable(THEME."templates/tinymce/".$template)) ? THEME."templates/tinymce/".$template : e_PLUGIN."tinymce4/templates/".$template;
$config = e107::getXml()->loadXMLfile($configPath, true);