You are on page 1of 15

DOCUMENTATION

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

USE AS TINYMCE 4 FILE MANGER

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 ,

external_filemanager_path:"/filemanager/", filemanager_title:"Responsive Filemanager" ,

external_plugins: { "filemanager" : "/filemanager/plugin.min.js"} });

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

USE AS STAND-ALONE FILE MANAGER


You can use normal pop-up, Bootstrap modal, iframe, FancyBox iframe, Lightbox iframe to open the FileManager with these paths:

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,

'type' 'autoScale' });

: 'iframe', : false

and the button has this code to open FileManager:


<a href="js/tinymce/plugins/filemanager/dialog.php?type=0" class="btn iframe-btn" type="button">Op en Filemanager</a>

Remember to include FancyBox, file in head section:


<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" /> <script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"></script>

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(); }

SECURITY ON RESPONSIVE FILEMANAGER


In Responsive filemanager there isn't security in direct php files access, because every php files include first config/config.php file.

So if you want to permit access only to a logged users you can add all the controls at beginning of config.php file.

TRANSLITERATION and STRING CONVERSION


With standard configuration responsive filemanager accepts all type of characters for file and folder names (like & ..., arabian, Chinese), if you want permits only latin charachters like A....Z a....z and 0....9, you can set to true the $transliteration variable on config.php .

SET SUBFOLDER AS ROOT AND MULTI-USER USE


You can set a subfolder as root. So you can have a root folder for each user. The way to implement this is set the session variable $_SESSION["subfolder"] ="subfolder/name/" Remember that subfolder value must not have ../ ./ . inside and can't begin with / Folder Example: root -- folder1 ---- subfolder1 ---- subfolder2 -- folder2 ----subfolder3

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.

CUSTOMISE CONFIGURATION FOR EACH FOLDER (CONFIG.PHP)


In FileManager Version you can customise the config.php for each folder. Simply create a config.php file inside your desired folder, and add the php variables that you wish to change. (Don't change $current_path,$upload_dir,$base_url,$root variables). You can also include an HTML text in the display folder page by simply inserting : $folder_message="html message" inside the config.php file in the folder. You can use this to specify the restriction or image resize.

Remember that the configuration of one folder is reflected in all its subdirectories.

CONFIG.PHP PARAMETERS SETTING


This is all parameters that you can change in config.php files

Parameters stored only in config/config.php file


Parameter base_url upload_dir current_path thumbs_base_path Example Value http://site.com /uploads/ ../uploads/ thumbs/ Description
base url of site (without final /). if you prefer relative urls leave empty.

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

MaxSizeUpload default_language icon_theme

100 en_EN ico

Max size upload limit in Mb.

default language file name.

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 sorting feature.

show or hide the folder size in filemanager list view (very large folders greatly increase the calculation time).

loading_bar transliteration

true false

show or hide the loading bar and percentage text.

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.

Layout configuration default_view 0


set the Default layout setting. ( 0 => boxes, 1 => detailed list (1 column) , 2 => columns list (multiple columns depending on the width of the page)).

ellipsis_title_after_first_row Permissions configuration delete_files

true

if true the filename will be truncated if it runs beyond a single row.

true

allow or disallow file deletion.

create_folders delete_folders upload_files rename_files rename_folders duplicate_files

true true true true true true

allow or disallow folder creation.

allow or disallow folder deletion.

allow or disallow file uploading.

allow or disallow file renaming.

allow or disallow folder renaming.

allow or disallow files duplication.

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

allowed image file extensions.

allowed video file extensions.

allowed audio file extensions.

allowed archive 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).

true 1234567890 1234567890 3 en

show or not show image editor button on context menu.

key available on aviary.com account.

secred key available on aviary.com account.

version of aviary.

language of aviary (see aviary documentation to choose).

set the names of any files you want hidden. remember these names will be hidden in all folders.

JAVAMaxSizeUpload Thumbnail for external use creation

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

fixed_image_creation_to_append, fixed_image_creation_name_to_prepend fixed_image_creation_width, fixed_image_creation_height

array('','')

name to append/prepend on filename

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

relative_image_creation_to_append, relative_image_creation_name_to_prepend relative_image_creation_width, relative_image_creation_height

array('','')

name to append/prepend on filename

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]

You might also like