Hi All,
I know this has been covered in previous posts but i've tried everything in the posts to get this to work.
I've updated my Editor to the new CKEditor (3.5.1) from currently using FCKEditor. I downloaded your filemanager because I liked it's styling from the demo, but I just cannot get it to work.
When the page loads I see the path in the top corner (I have showfullPath set to on) and I see a blank left and right panels, as well as the Home, Upload and New Folder and Grid/List Toggle Buttons.
I have my CKEditor in a folder called '_inc' on the htdocs root, and the filemanager has also been installed there, so the folder structure to the CKEditor and filemanager are:
CKEditor: /htdocs/_inc/ckeditor/
Filemanager: /htdocs/_inc/filemanager/
I am wanting the filemanager to use a folder outside of this structure to save and view images from. That folder structure looks like this:
Path to Image Folder: /htdocs/_images/_cms/
In my CKEditor Instance I have the following being called:
- <script type="text/javascript">
window.onload = function()
{
CKEDITOR.replace( 'html',
{
filebrowserBrowseUrl : '../../_inc/filemanager/index.html',
filebrowserImageBrowseUrl : '../../_inc/filemanager/index.html',
}
);
};
</script>
My filemanager.config.js in the scripts folder looks like this:
- /*---------------------------------------------------------
Configuration
---------------------------------------------------------*/
// Set culture to display localized messages
var culture = 'en';
// Autoload text in GUI
// If set to false, set values manually into the HTML file
var autoload = true;
// Display full path - default : false
var showFullPath = true;
// Browse only - default : false
var browseOnly = false;
// Set this to the server side language you wish to use.
var lang = 'php'; // options: php, jsp, lasso, asp, cfm // we are looking for contributors for lasso, python connectors (partially developed)
var am = document.location.pathname.substring(1, document.location.pathname
.lastIndexOf('/') + 1);
// Set this to the directory you wish to manage.
var fileRoot = '/';
// Show image previews in grid views?
var showThumbs = true;
// Allowed image extensions when type is 'image'
var imagesExt = ['jpg', 'jpeg', 'gif', 'png'];
And my connector/php filemanager.config.php looks like this:
- <?php
/**
* Filemanager PHP connector configuration
*
* filemanager.config.php
* config for the filemanager.php connector
*
* @license MIT License
* @author Riaan Los <mail (at) riaanlos (dot) nl>
* @author Simon Georget <simon (at) linea21 (dot) com>
* @copyright Authors
*/
/**
* Check if user is authorized
*
* @return boolean true is access granted, false if no access
*/
/**function auth() {
// You can insert your own code over here to check if the user is authorized.
// If you use a session variable, you've got to start the session first (session_start())
return true;
}
*/
/**
* Language settings
*/
$config['culture'] = 'en';
/**
* PHP date format
* see http://www.php.net/date for explanation
*/
$config['date'] = 'd M Y H:i';
/**
* Icons settings
*/
$config['icons']['path'] = 'images/fileicons/';
$config['icons']['directory'] = '_Open.png';
$config['icons']['default'] = 'default.png';
/**
* Upload settings
*/
$config['upload']['overwrite'] = false; // true or false; Check if filename exists. If false, index will be added
$config['upload']['size'] = false; // integer or false; maximum file size in Mb; please note that every server has got a maximum file upload size as well.
$config['upload']['imagesonly'] = false; // true or false; Only allow images (jpg, gif & png) upload?
/**
* Images array
* used to display image thumbnails
*/
$config['images'] = array('jpg', 'jpeg','gif','png');
/**
* Files and folders
* excluded from filtree
*/
$config['unallowed_files']= array('.htaccess');
$config['unallowed_dirs']= array('_thumbs');
/**
* FEATURED OPTIONS
* for Vhost or outside files folder
*/
$config['doc_root'] = '/home/fhlinux/mydomain.com/user/htdocs/_images/_cms'; // No end slash
// not working yet
//$config['upload']['suffix'] = '_'; // string; if overwrite is false, the suffix will be added after the filename (before .ext)
?>
Can anyone help me out here, I really would appreciate it as i'm pretty desperate to get this working.
Thanks
Jay