mirror of
https://github.com/e107inc/e107.git
synced 2025-07-29 10:50:25 +02:00
TinyMce styling corrected to work with newer version of TinyMce. TinyMce parser image path corrections. Old Tinymce popup code removed.
This commit is contained in:
@@ -963,7 +963,7 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
if($this->getQuery('iframe'))
|
||||
{
|
||||
e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
$this->getResponse()->setIframeMod(); // disable header/footer menus etc.
|
||||
|
||||
if(!$this->getQuery('for'))
|
||||
|
@@ -454,6 +454,10 @@ class e_bbcode
|
||||
{
|
||||
$ret[] = $tp->replaceConstants($i,'full');
|
||||
}
|
||||
elseif(strpos($i,'thumb.php')!==false || strpos($i,'media/img/')!==false || strpos($i,'theme/img/')!==false) // absolute path.
|
||||
{
|
||||
$ret[] = SITEURLBASE.$i;
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret[] = $path.$i;
|
||||
|
@@ -2364,7 +2364,7 @@ class e_parse extends e_parser
|
||||
}
|
||||
|
||||
|
||||
if(e_MOD_REWRITE_MEDIA == true)// Experimental SEF URL support.
|
||||
if(e_MOD_REWRITE_MEDIA == true && empty($options['nosef']))// Experimental SEF URL support.
|
||||
{
|
||||
$options['full'] = $full;
|
||||
$options['ext'] = substr($url,-3);
|
||||
@@ -2465,8 +2465,15 @@ class e_parse extends e_parser
|
||||
*/
|
||||
private function thumbUrlSEF($url='', $options=array())
|
||||
{
|
||||
|
||||
$base = (!empty($options['full'])) ? SITEURL : e_HTTP;
|
||||
if(!empty($options['full']))
|
||||
{
|
||||
$base = SITEURL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$base = (!empty($options['ebase'])) ? '{e_BASE}' : e_HTTP;
|
||||
}
|
||||
// $base = (!empty($options['full'])) ? SITEURL : e_HTTP;
|
||||
|
||||
if(!empty($options['x']) && !empty($options['ext'])) // base64 encoded. Build URL for: RewriteRule ^media\/img\/([-A-Za-z0-9+/]*={0,3})\.(jpg|gif|png)?$ thumb.php?id=$1
|
||||
{
|
||||
|
@@ -42,7 +42,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce','tiny_mce_popup.js','jquery');
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ if((e107::wysiwyg() === true && check_class($pref['post_html'])) || strpos(e_SEL
|
||||
$('.e-dialog-close').click(function(){
|
||||
|
||||
top.tinymce.activeEditor.windowManager.close();
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
@@ -26,7 +26,7 @@ e107::css('inline',"
|
||||
|
||||
");
|
||||
|
||||
e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
// e107::js('tinymce4','plugins/compat3x/tiny_mce_popup.js');
|
||||
|
||||
e107::js('inline',"
|
||||
|
||||
|
@@ -189,6 +189,9 @@ TEMPL;
|
||||
|
||||
if(check_class($pref['post_html'])) // Plain HTML mode.
|
||||
{
|
||||
|
||||
$content = trim($content);
|
||||
|
||||
$srch = array('src="'.e_HTTP.'thumb.php?','src="/{e_MEDIA_IMAGE}');
|
||||
$repl = array('src="{e_BASE}thumb.php?','src="{e_BASE}thumb.php?src=e_MEDIA_IMAGE/');
|
||||
$content = str_replace($srch, $repl, $content);
|
||||
@@ -261,6 +264,11 @@ TEMPL;
|
||||
);
|
||||
|
||||
}
|
||||
elseif(defined('TINYMCE_DEBUG'))
|
||||
{
|
||||
print_a("thumbUrlDecode: No Matches");
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $ret;
|
||||
@@ -280,6 +288,11 @@ TEMPL;
|
||||
$srch = array("?","&");
|
||||
$repl = array("\?","&");
|
||||
|
||||
if(defined('TINYMCE_DEBUG'))
|
||||
{
|
||||
print_a($arr);
|
||||
}
|
||||
|
||||
foreach($arr['img'] as $img)
|
||||
{
|
||||
$regexp = '#(<img[^>]*src="'.str_replace($srch, $repl, $img['src']).'"[^>]*>)#';
|
||||
@@ -299,6 +312,7 @@ TEMPL;
|
||||
$qr['h'] = $img['height'];
|
||||
}
|
||||
|
||||
$qr['ebase'] = true;
|
||||
$src = e107::getParser()->thumbUrl($qr['src'],$qr);
|
||||
|
||||
$replacement = '<img src="'.$src.'" '.$style.$alt.$title.$class.$width.$height.' />';
|
||||
|
@@ -75,8 +75,8 @@
|
||||
title: 'Media Manager',
|
||||
url: url + '/mediamanager.php?image',
|
||||
width: 1050,
|
||||
height: 650
|
||||
|
||||
height: 680,
|
||||
id: 'media-manager'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -96,8 +96,8 @@
|
||||
title: 'Media Manager',
|
||||
url: url + '/mediamanager.php?video',
|
||||
width: 1050,
|
||||
height: 650
|
||||
|
||||
height: 650,
|
||||
id: 'media-manager'
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -112,8 +112,9 @@
|
||||
title: 'Media Manager',
|
||||
url: url + '/mediamanager.php?glyph',
|
||||
width: 1050,
|
||||
height: 650
|
||||
|
||||
height: 650,
|
||||
id: 'media-manager'
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@@ -3,8 +3,8 @@
|
||||
<plugins>advlist autolink autosave lists link image charmap print preview hr anchor pagebreak searchreplace wordcount visualchars code fullscreen
|
||||
insertdatetime media nonbreaking table contextmenu directionality emoticons template paste textcolor </plugins>
|
||||
<menubar>edit view format insert table tools</menubar>
|
||||
<toolbar1>undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | e107-image e107-video e107-bbcode smileys | preview | fullscreen</toolbar1>
|
||||
<external_plugins>e107 compat3x</external_plugins>
|
||||
<toolbar1>undo redo | removeformat | styleselect | bold italic underline forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image template | e107-image e107-video e107-glyph smileys | preview | fullscreen</toolbar1>
|
||||
<external_plugins>e107</external_plugins>
|
||||
<image_advtab>true</image_advtab>
|
||||
<extended_valid_elements>i[*], object[*],embed[*],bbcode[*]</extended_valid_elements>
|
||||
<templates>[
|
||||
|
@@ -343,7 +343,10 @@ class wysiwyg
|
||||
|
||||
);
|
||||
|
||||
|
||||
// if(e_ADMIN_AREA)
|
||||
{
|
||||
// $ret['skin_url'] = e_PLUGIN_ABS.'tinymce4/skins/eskin';
|
||||
}
|
||||
|
||||
// Loop thru XML parms.
|
||||
foreach($config as $k=>$xml)
|
||||
@@ -387,11 +390,11 @@ class wysiwyg
|
||||
// plugins: "visualblocks",
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$formats = array(
|
||||
'hilitecolor' => array('inline'=> 'span', 'classes'=> 'hilitecolor', 'styles'=> array('backgroundColor'=> '%value'))
|
||||
// block : 'h1', attributes : {title : "Header"}, styles : {color : red}
|
||||
);
|
||||
);*/
|
||||
|
||||
//@see http://www.tinymce.com/wiki.php/Configuration:formats
|
||||
|
||||
|
@@ -34,20 +34,30 @@ e107::css('theme','admin_dark.css');
|
||||
e107::css('theme','ie_all.css',null,'all',"<!--[if IE]>","<![endif]-->");
|
||||
|
||||
e107::css('inline', "
|
||||
/* TinyMce */
|
||||
|
||||
|
||||
.mce-menubar .mce-caret { border-top-color: #C6C6C6!important }
|
||||
.mce-menubar:hover .mce-caret { border-top-color: #FFFFFF!important }
|
||||
.mce-menubar .mce-btn button { color: #C6C6C6!important; } /* v4.1+ */
|
||||
.mce-menubar .mce-btn button span { color: #C6C6C6!important; } /* v4.0 */
|
||||
.mce-menubar .mce-btn button { color: #C6C6C6!important; }
|
||||
.mce-menubar .mce-btn button span { color: #C6C6C6!important; }
|
||||
.mce-menubar .mce-btn button:hover { color: #FFFFFF!important; }
|
||||
.mce-menubar.mce-toolbar { background-color: #373737!important; }
|
||||
.mce-menubar.mce-toolbar, .mce-window-head { background-color: #373737; !important }
|
||||
.mce-tinymce[role=application] { border-color: #373737!important; }
|
||||
.mce-menubar .mce-menubtn:hover,
|
||||
.mce-menubtn:active,
|
||||
.mce-menubtn:focus { background-color:transparent!important; color: #FFFFFF!important; border-color:transparent!important; }
|
||||
.mce-menubar .mce-btn.mce-active { color:white!important; border-color:transparent!important; background-color: transparent!important; }
|
||||
|
||||
|
||||
body.forceColors { margin:0; background-color: #373737; !important}
|
||||
body.forceColors a { color: white}
|
||||
body.forceColors li a { color: silver}
|
||||
|
||||
div#media-manager div.mce-window-head { background-color: #373737; !important }
|
||||
div#media-manager div.mce-title { color:white; }
|
||||
div#media-manager, html { color: silver; background-color: #373737; !important}
|
||||
|
||||
|
||||
");
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user