laviku laviku - 6 months ago 15
jQuery Question

How to configure File Manager plugin?

I'm using tinyMce for textarea, and with this I'm using File Manager Plugin but I haven't had luck with the configuration file.

This is some of the original content

$base_url="http://localhost"; //url base of site if you want only relative url leave empty
$upload_dir = '/tinymce/source/'; // path from base_url to upload base dir
$current_path = '../../../../source/'; // relative path from filemanager folder to upload files folder


What I got is this

$base_url="http://localhost/atravesfree";
$upload_dir = '/atravesfree/public/source/';
$current_path = '';


And this is the result, I have an image inside the folder but it's not shown. I know I need to set the "current_path" but I don't know how do that exactly.

File Manager Result

I'm using a framework called "Freekore" and this is how the order of the folders look like

This is the location of the filemanager folder
-root [localhost/atravesfree - G:/wamp/www/atravesfree]
|-public
|-_HTML
|-themes
|-mytheme
|-js
|-plugins
|-filemanager





This is the location where I have, and where I want, the uploaded files
-root [localhost/atravesfree - G:/wamp/www/atravesfree]
|-public
|-source


Thank you for your help.




After I solve this I got this error "the path is not writable", the reason was that the "thumbs" folder didn't have write permissions.

Answer

Try This

$dir='http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$dir=str_replace('filemanager', '', $dir);
$base_url="http://www.site.com";
$upload_dir = $dir.'source/';
$current_path = '../source/';
$thumbs_base_path = '../thumbs/';

obviously replace dir and your site. Thumbs is optional.