Responsive File Manager For TinyMCE
Responsive File Manager For TinyMCE
Responsive File Manager For TinyMCE
Installation
1. Upload the 'filemanager' folder where you want in your server (in the example is on root). 2. Create a folder for your uploaded files and give it write permission (755). 3. Open filemanager/config/config.php and edit the settings (read config.php parameters setting paragraph). Save file. 4. Subscribe to Aviary.com to get a free app key (NB the free account limits the export of images to a maximum of 800x800 pixels) NB Aviary Editor only works online; it won't work on localhost!! 5. Great! Your work is finished! PS If you don't see the preview images you need to give write permission to the thumbs folder. If you are updating from a previous version of FileManager delete the contents of thumbs folder, the script will automatically re-create the thumbnails. !IMPORTANT: if you are using htaccess protection, make sure your $GLOBALS PHP_AUTH_USER/PHP_AUTH_USER are defined in your webserver config
Copy tinymce/plugins/responsivefilemanager folder to tinymce/plugins/ in your server N.B.: REMEMBER THAN RESPONVIVEFILEMANAGER IS NOT FILEMANAGER FOLDER BUT AN ADDITIONAL PLUGIN Settings of tinymce should be like this: (remember to add responsivefilemanager in plugins list):
tinymce.init({ selector: "textarea",theme: "modern",width: 680,height: 300, plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking", "table contextmenu directionality emoticons paste textcolor responsivefilemanager" ], toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustif y | bullist numlist outdent indent | styleselect",
toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true ,
You can pass this variables on TinyMCE init. filemanager_title the title of filemanager window default="Responsive filemanager" filemanager_sort_by: the element to sorting (values: name,size,extension,date) default="" filemanager_descending: descending ? or ascending (values=true or false) default="false" If you want full path url in tinyMCE paths you can add relative_urls: false on tinyMCE init (read tinyMCE Configuration page) external_filemanager_path and external_plugins path must be absolute from root and must point to filemanager folder not responsivefilemanager plugin folder
Change the path in your tinymce init function in external_filemanager_path and external_plugins (the path must be a absolute path from base_url of your site and must start with / so in this example i have the filemanager folder in www.site.com/filemanager/)
If you are updating from older version (from 1 to 7) substitute your tinyMCE with new or download only the image/media/link originals folders and copy in your tinyMCE plugin folder
Only open filemanager(type=0 and not set field_id): path to filemanager../filemanager/dialog.php?type=0&fldr= Select Image: (type=1 and set id of input text in field_id variable): path to filemanager../filemanager/dialog.php?type=1&field_id=fieldID Select Video: (type=3 and set id of input text in field_id variable): path to filemanager../filemanager/dialog.php?type=3&field_id=fieldID Select File: (type=2 and set id of input text in field_id variable): path to filemanager../filemanager/dialog.php?type=2&field_id=fieldID Get Variables list type: the type of filemanager (1:images files 2:all files 3:video files) fldr: the folder where i enter (the root folder remains the same). default="" sort_by: the element to sorting (values: name,size,extension,date) default="" descending: descending? or ascending (values=true or false) default="false" lang: the language code (es: &lang=en_EN). default="en_EN"<="" p=""> If you want use popup add in the address &popup=1 PS If you want to force loading at root set fldr to / In demo page i use FancyBox with this configuration:
$('.iframe-btn').fancybox({ 'width' 'height' : 600, : 900,
: 'iframe', : false
If you not use FancyBox, you must change the function to close the windows after file selection in filemanager/js/include.js:
function close_window() { parent.$.fancybox.close(); }
So if you want to permit access only to a logged users you can add all the controls at beginning of config.php file.
User1 subfolder="" View: folder1 -- subfolder1 -- subfolder2 folder2 -- subfolder3 User 2 subfolder="folder1" View: subfolder1 subfolder2 So if you want use filemanager in a multiuser CMS you can simply create a folder for each user and set a session variable ($_SESSION['subfolder']) with the name of the user folder.
Remember that the configuration of one folder is reflected in all its subdirectories.
address path from base_url to base of upload folder (with start and final /).
relative path from filemanager folder to upload folder (with final /).
relative path from filemanager folder to thumbs folder (with final /). NB thumbs folder must not reside in the upload folder.
Parameters that you can override in all config.php files inside folders
Parameter Example Value Description
the theme of icons. choose ico or ico_dark or you can cusatomize just putting a folder inside filemanager/img
file_number_limit_js
500
the filter and sorter are managed through both javascript and php scripts. If you have a lot of files in a folder the javascript script wil not cope, so the filemanager then switches to the php script. The plugin automatically switches from javascript to php when the folder contains more than the specified number of files.
show_sorting_bar show_folder_size
true true
show or hide the folder size in filemanager list view (very large folders greatly increase the calculation time).
loading_bar transliteration
true false
active or deactive the transliteration (mean convert all strange characters in A..Za..z0..9 characters).
Images configuration
image_max_width, image_max_height
800
these parameters set maximum pixel width and/or maximum pixel height for all images. if you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected. if you don't need a limit set both to 0.
image_resizing
false
activate or not Automatic resizing. if you set image_resizing to true the script converts all uploaded images exactly to image_resizing_width x image_resizing_height dimension.
image_resizing_width, image_resizing_height
800
these parameters set the dimensions of the resized image. if you set width or height to 0 the script automatically calculates the other dimension. NB Very large images may cause the script to fail unless the server's php memory and time limit configuration is modified.
true
true
Allowed extensions (this differentiation corresponds to the type filter) ext_file ext_img ext_video ext_music ext_misc 'pdf', 'doc' 'jpg', 'jpeg' 'mov', 'mpeg' 'mp3', 'm4a' 'zip', 'rar'
allowed file extensions
Aviary configuration aviary_active aviary_key aviary_secret aviary_version aviary_language Hidden files and folders hidden_folders "hidden_folder1", "hidden_folder2" hidden_files "this_document.pdf", "that_image.jpg" JAVA upload java_upload true
enable or disable java applets uploads set the names of any folders you want hidden. Remember: all folders with these names will be hidden (you can set any exceptions in config.php files in folders).
version of aviary.
set the names of any files you want hidden. remember these names will be hidden in all folders.
200
donparameter
New image resized creation with fixed path from filemanager folder after uploading (thumbnails in fixed mode). If you want create images resized out of upload folder for use with external script you can choose this method, You can create also more than one image at a time just simply add a value in the array. Remember than the image creation respect the folder hierarchy so if you are inside source/test/test1/ the new image will create at path_from_filemanager/test/test1/ PS if there isn't write permission in your destination folder you must set it relative_image_creation false
activate or not the creation of one or more image resized with relative path from upload folder
fixed_path_from_filemanager
array('','')
array of relative path of the image folder from the current position on upload folder
array('','')
array(0,0)
width/height of image (you can leave empty if you set the other dimension)
New image resized creation with relative path inside to upload folder after uploading (thumbnails in relative mode).
With Responsive filemanager you can create automatically resized image inside the upload folder, also more than one at a time just simply add a value in the array. The image creation path is always relative so if i'm inside source/test/test1 and I upload an image, the path start from here fixed_image_creation false
activate or not the creation of one or more image resized with fixed path from filemanager folder
relative_path_from_filemanager
array('','')
array of fixed path of the image folder from the current position on upload folder
array('','')
array(0,0)
width/height of image (you can leave empty if you set the other dimension)
LOCALIZATION
- AZE [Elshad Agayev] - BGR [Stanislav Panev] - BRA [paulomanrique] - CZE [jlusticky] - ENG - ESP [Roberto Santamaria]
- FRA [Mathieu Ducharme] - GER [Oliver Beta] - HUN [Novak Szabolcs] - IND [urayogi] - ITA - MON [Tumenzul Batjargal] - NLD [Martijn van der Made] - NOR [Pl Schroeder] - Persian [web2web esf ir] - POL [Michell Hodu] - POR [Srgio Lima] - RUS [vasromand] - SLO [Roman ovk] - SWE [Jon Sten] - TUR [Ahmed Faruk Bora] - UKR [Sergey]