Bywalec
Postów: 671 Pomógł: 80
Data rejestracji: 13.07.2009 19:20
|
Ze strony http://www.phplet.../DOWNLOAD/ pobierasz "Tinymce Ajax File and Image Manager Version 1.0 RC4", następnie po rozpakowaniu paczki, z katalogu plugins kopiujesz "ajaxfilemanager" do katalogu plugins (wewnątrz TinyMCE) na twoim serwerze.
Podmieniasz poniższym fragmentem obecny w admin_header_mce.php (wcześniej oczywiście robimy kopię pliku)
if ($settings['tinymce_enabled'] == 1) {
echo "<script language='javascript' type='text/javascript' src='".INCLUDES."jscripts/tiny_mce/tiny_mce.js'></script>
<script type='text/javascript'>
function advanced() {
tinyMCE.init({
mode:'textareas',
elements : 'ajaxfilemanager',
theme:'advanced',
width:'100%',
height:'250',
language:'".$locale['tinymce']."',
entities:'60,lt,62,gt',
relative_urls:'true',
convert_newlines_to_brs: false,
forced_root_block: false,
force_br_newlines: true,
force_p_newlines: false,
plugins:'table,advhr,advimage,advlink,insertdatetime,searchreplace,contextmenu,fullscreen,pagebreak',
pagebreak_separator : '<--PAGEBREAK-->',
theme_advanced_buttons1_add_before:'pagebreak,separator',
theme_advanced_buttons1_add:'fontsizeselect',
theme_advanced_buttons2_add:'separator,insertdate,inserttime,separator,forecolor,backcolor,separator,fullscreen',
theme_advanced_buttons3_add_before:'tablecontrols,separator',
theme_advanced_buttons3_add:'advhr',
theme_advanced_toolbar_location:'bottom',
theme_advanced_toolbar_align:'center',
theme_advanced_toolbar_location:'top',
theme_advanced_statusbar_location : 'bottom',
content_css:'".THEME."styles.css',
external_image_list_url:'".IMAGES."imagelist.js',
plugin_insertdate_dateFormat:'%d-%m-%Y',
file_browser_callback : 'ajaxfilemanager',
plugin_insertdate_timeFormat:'%H:%M:%S',
invalid_elements:'script,object,applet,iframe',
theme_advanced_resize_horizontal : true,
theme_advanced_resizing : true,
apply_source_formatting : true,
convert_urls : false,
extended_valid_elements:'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'
});
}
function simple() {
tinyMCE.init({
mode:'textareas',
theme:'simple',
language:'en',
convert_newlines_to_brs:'true',
force_br_newlines:'true',
force_p_newlines:'false'
});
}
function showtiny(EditorID) {
tinyMCE.removeMCEControl(tinyMCE.getEditorId(EditorID));
tinyMCE.addMCEControl(document.getElementById(EditorID),EditorID);
}
function hidetiny(EditorID) {
tinyMCE.removeMCEControl(tinyMCE.getEditorId(EditorID));
}
function ajaxfilemanager(field_name, url, type, win) {
var ajaxfilemanagerurl = '../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php';
switch (type) {
case 'image':
break;
case 'media':
break;
case 'flash':
break;
case 'file':
break;
default:
return false;
}
tinyMCE.activeEditor.windowManager.open({
url: '../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php',
width: 782,
height: 440,
inline : 'yes',
close_previous : 'no'
},{
window : win,
input : field_name
});
/* return false;
var fileBrowserWindow = new Array();
fileBrowserWindow['file'] = ;
fileBrowserWindow['title'] = 'Ajax File Manager';
fileBrowserWindow['width'] = '782';
fileBrowserWindow['height'] = '440';
fileBrowserWindow['close_previous'] = 'no';
tinyMCE.openWindow(fileBrowserWindow, {
window : win,
input : field_name,
resizable : 'yes',
inline : 'yes',
editor_id : tinyMCE.getWindowArg('editor_id')
});
return false; */
}
</script>\n";
}
I działa ?? |