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:
@@ -1274,7 +1274,7 @@ function update_706_to_800($type='')
|
|||||||
{
|
{
|
||||||
$data = '<?xml version="1.0" encoding="utf-8"?>
|
$data = '<?xml version="1.0" encoding="utf-8"?>
|
||||||
<e107Filetypes>
|
<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>';
|
</e107Filetypes>';
|
||||||
|
|
||||||
file_put_contents(e_SYSTEM."filetypes.xml",$data);
|
file_put_contents(e_SYSTEM."filetypes.xml",$data);
|
||||||
|
@@ -17,7 +17,7 @@ if(!defined('e107_INIT'))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
define('e_TINYMCE_TEMPLATE', 'public');
|
||||||
define('NAVIGATION_ACTIVE','forum'); // ??
|
define('NAVIGATION_ACTIVE','forum'); // ??
|
||||||
|
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
@@ -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', "//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
|
// Add to e107_config.php to view hidden content when TinyMce not saving correctly
|
||||||
if(deftrue('e_TINYMCE_DEBUG'))
|
if(deftrue('e_TINYMCE_DEBUG'))
|
||||||
|
12
e107_plugins/tinymce4/templates/public.xml
Normal file
12
e107_plugins/tinymce4/templates/public.xml
Normal 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>
|
@@ -113,12 +113,15 @@ $output = str_replace("{e_PLUGIN_ABS}", e_PLUGIN_ABS, $text);
|
|||||||
|
|
||||||
$wy = new wysiwyg();
|
$wy = new wysiwyg();
|
||||||
|
|
||||||
$gen = $wy->renderConfig();
|
|
||||||
|
$config = varset($_GET['config'],false); // e_QUERY;
|
||||||
|
|
||||||
|
$gen = $wy->renderConfig($config);
|
||||||
|
|
||||||
define('USE_GZIP', true);
|
define('USE_GZIP', true);
|
||||||
|
|
||||||
|
|
||||||
if(ADMIN && e_QUERY == 'debug')
|
if(ADMIN && e_QUERY == 'debug' || !empty($_GET['debug']))
|
||||||
{
|
{
|
||||||
define('e_IFRAME', true);
|
define('e_IFRAME', true);
|
||||||
require_once(HEADERF);
|
require_once(HEADERF);
|
||||||
@@ -309,23 +312,37 @@ class wysiwyg
|
|||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$fl = e107::getFile();
|
$fl = e107::getFile();
|
||||||
|
|
||||||
|
if($config !== false)
|
||||||
if(getperms('0'))
|
|
||||||
{
|
{
|
||||||
$template = "mainadmin.xml";
|
$template = $tp->filter($config).".xml";
|
||||||
}
|
|
||||||
elseif(ADMIN)
|
|
||||||
{
|
|
||||||
$template = "admin.xml";
|
|
||||||
}
|
|
||||||
elseif(USER)
|
|
||||||
{
|
|
||||||
$template = "member.xml";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$template = "public.xml";
|
if(getperms('0'))
|
||||||
|
{
|
||||||
|
$template = "mainadmin.xml";
|
||||||
|
}
|
||||||
|
elseif(ADMIN)
|
||||||
|
{
|
||||||
|
$template = "admin.xml";
|
||||||
|
}
|
||||||
|
elseif(USER)
|
||||||
|
{
|
||||||
|
$template = "member.xml";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$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;
|
$configPath = (is_readable(THEME."templates/tinymce/".$template)) ? THEME."templates/tinymce/".$template : e_PLUGIN."tinymce4/templates/".$template;
|
||||||
$config = e107::getXml()->loadXMLfile($configPath, true);
|
$config = e107::getXml()->loadXMLfile($configPath, true);
|
||||||
|
Reference in New Issue
Block a user