Quote from: rossco at Jun 24, 2008, 08:47 AM
I have figured out how to load tinymce in the editing area of of FDM. The browse buttons now take the user to another folder other than images or media on the host. I set it to assets/useruploads/ and in here there are sub folders with images, files, flash, media and users can upload and create further subfolders in this area.
What I want to try and do next is similar to what maxi gallery does when a new user uploads their first image, a new folder in created in the galleries folder on the host. Then only they can view their own images etc.
I’m getting there!
rossco would you like to share how you call mcpuk in your &script chunk? I’m using some code I found in the forum, the resource browser loads but it’s empty. Inside the manager it works fine... This is my chunk
<script language="javascript" type="text/javascript" src="assets/plugins/tinymce303/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
// Configuration detail check http://wiki.moxiecode.com/index.php/TinyMCE:Configuration
tinyMCE.init({
theme : "advanced",
mode : "exact", // textareas: Converts all textarea elements to editors when the page loads. exact: Converts elements of the specified names, as listed in the elements option.
// This option should contain a comma separated list of element id's to convert into editor instances. This option is only used if mode is set to "exact".
// ie: elements : "elm1,elm2"
elements : "content",
language : "sv",
docs_language : "sv",
body_id : "RTE_TinyMCE_text",
content_css : "[~16~]",
entity_encoding : "raw",
theme_advanced_blockformats : "p,h1,h2,address,pre",
theme_advanced_disable : "styleselect",
file_browser_callback : "myFileBrowser",
theme_advanced_resizing_min_width : 700
});
function myFileBrowser (field_name, url, type, win) {
var cmsURL = '/assets/plugins/tinymce3101/mcpuk/browser.php?Connector=/assets/plugins/tinymce3101/mcpuk/connectors/php/connector.php&ServerPath=/&editor=tinymce3&editorpath=/assets/plugins/tinymce3101'; // 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>
Are there any parameters to set the path for the resource browser?