For anyone who followed Smashingreds Post, on how to let Manager Users upload pictures and use the linklist, but is using TinyMCE 3.03 instead of 2.x here’s the JavaScript Code to put in your fdmEform Chunk:
<script language="javascript" type="text/javascript" src="[(base_url)]assets/plugins/tinymce303/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="[(base_url)]assets/plugins/tinymce303/xconfig.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
theme : "advanced",
mode : "exact",
width : "100%",
height : "400",
relative_urls : true,
document_base_url : "/",
remove_script_host : true,
language : "de",
elements : "fdmContent",
valid_elements : tinymce_valid_elements,
extended_valid_elements : tinymce_extended_valid_elements,
invalid_elements : tinymce_invalid_elements,
entity_encoding : "named",
cleanup: true,
apply_source_formatting : true,
remove_linebreaks : false,
convert_fonts_to_spans : "true",
file_browser_callback : "myFileBrowser",
external_link_list_url : "/assets/plugins/tinymce303/tinymce.linklist.php",
theme_advanced_blockformats : "p,h1,h2,h3,h4,h5,h6,div,blockquote,code,pre,address",
plugins : "style,advimage,advlink,searchreplace,print,contextmenu,paste,fullscreen,nonbreaking,xhtmlxtras,visualchars,media",
theme_advanced_buttons0 : "",
theme_advanced_buttons1 : "undo,redo,selectall,separator,pastetext,pasteword,separator,search,replace,separator,nonbreaking,hr,charmap,separator,image,link,unlink,anchor,media,separator,cleanup,removeformat,separator,fullscreen,print,code,help",
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,sub,sup,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect,separator,styleprops",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
theme_advanced_disable : "",
theme_advanced_resizing : false,
theme_advanced_resize_horizontal : false,
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
button_tile_map : false
});
function myFileBrowser (field_name, url, type, win) {
var cmsURL = '/assets/plugins/tinymce303/mcpuk/browser.php?Connector=/assets/plugins/tinymce303/mcpuk/connectors/php/connector.php&ServerPath=/&editor=tinymce3&editorpath=/assets/plugins/tinymce303'; // script URL - use an absolute path!
switch (type) {
case "image":
type = 'images';
break;
case "media":
break;
case "flash":
break;
case "file":
type = 'files';
break;
default:
return false;
}
if (cmsURL.indexOf("?") < 0) {
//add the type as the only query parameter
cmsURL = cmsURL + "?type=" + type;
}
else {
//add the type as an additional query parameter
// (PHP session ID is now included if there is one at all)
cmsURL = cmsURL + "&type=" + type;
}
tinyMCE.activeEditor.windowManager.open({
file : cmsURL,
width : screen.width * 0.7, // Your dimensions may differ - toy around with them!
height : screen.height * 0.7,
resizable : "yes",
inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin!
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}
</script>
Hope that’s working with your setups too.