source: branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/ @ 1300

Last change on this file since 1300 was 1300, checked in by gogo, 9 years ago

Update the MootoolsFileManager? to the latest cpojer with some modifications.
Add a demo for the MFM examples/mootools-file-manager.php
Change the default config for ImageManager? and ExtendedFileManager? for added security.

File size: 6.4 KB
1MooTools FileManager
4A filemanager for the web based on MooTools that allows you to (pre)view, upload and modify files and folders via your browser.
8### Authors
9* [Christoph Pojer](
10* [Fabian Vogelsteller](
12### Features
14* Browse through Files and Folders on your Server
15* Rename, Delete, Move (Drag&Drop), Copy (Drag + hold CTRL) and Download Files
16* View detailed Previews of Images, Text-Files, Compressed-Files or Audio Content
17* Nice User Interface ;)
18* Upload Files via FancyUpload (integrated Feature)
19* Option to automatically resize big Images when uploading
20* Use it to select a File anywhere you need to specify one inside your Application's Backend
21* Use as a FileManager in TinyMCE or CKEditor
22* Provides your client with the most possible convenience
23* Create galleries using the Gallery-Plugin
24* History and state management
26### Issues
27  - sometimes "illegal character (Error #2038) mootools-core-1.3.js (line 5015)" when uploading multiple files
29How to use
32### Demos
34* Open the "Demos/" folder and have fun
36### Installation
38* First you need to include the follwing scripts
39  * Source/FileManager.js
40  * Source/Uploader/Fx.ProgressBar.js
41  * Source/Uploader/Swiff.Uploader.js
42  * Source/Uploader.js
43  * Source/Gallery.js (if you want to create a gallery, see example in the Demos/index.html)
44  * Language/Language.en.js (or the language(s) do you need)
46* Then you need to modify the "Demos/manager.php" or "Demos/selectImage.php" to set up your upload folder etc
47* See the "Demos/index.html" for examples, but basically you need to do the following:
49      var myFileManager = new FileManager({
50        url: 'path/to/the/manager.php',
51        assetBasePath: '../Assets'
52      });
55### Configurable Options
59* url: (string) The base url to a file with an instance of the FileManager php class (FileManager.php), without QueryString
60* assetBasePath: (string) The path to all images and swf files used by the filemanager
61* directory: (string, relative to the directory set in to the filemanager php class) Can be used to load a subfolder instead of the base folder
62* language: (string, defaults to *en*) The language used for the FileManager
63* selectable: (boolean, defaults to *false*) If true, provides a button to select a file
64* destroy: (boolean, defaults to *false*) Whether to allow deletion of files or not
65* rename: (boolean, defaults to *false*) Whether to allow renaming of files or not
66* download: (boolean, defaults to *false*) Whether to allow downloading of files or not
67* createFolders: (boolean, defaults to *false*) Whether to allow creation of folders or not
68* filter: (string) If specified, it reduces the shown and upload-able filetypes to these mimtypes. possible options are
69  * image: *.jpg; *.jpeg; *.bmp; *.gif; *.png
70  * video: *.avi; *.flv; *.fli; *.movie; *.mpe; *.qt; *.viv; *.mkv; *.vivo; *.mov; *.mpeg; *.mpg; *.wmv; *.mp4
71  * audio: *.aif; *.aifc; *.aiff; *.aif; *.au; *.mka; *.kar; *.mid; *.midi; *.mp2; *.mp3; *.mpga; *.ra; *.ram; *.rm; *.rpm; *.snd; *.wav; *.tsi
72  * text: *.txt; *.rtf; *.rtx; *.html; *.htm; *.css; *.as; *.xml; *.tpl
73  * application: *.ai; *.bin; *.ccad; *.class; *.cpt; *.dir; *.dms; *.drw; *.doc; *.dvi; *.dwg; *.eps; *.exe; *.gtar; *.gz; *.js; *.latex; *.lnk; *.lnk; *.oda; *.odt; *.ods; *.odp; *.odg; *.odc; *.odf; *.odb; *.odi; *.odm; *.ott; *.ots; *.otp; *.otg; *.pdf; *.php; *.pot; *.pps; *.ppt; *.ppz; *.pre; *.ps; *.rar; *.set; *.sh; *.skd; *.skm; *.smi; *.smil; *.spl; *.src; *.stl; *.swf; *.tar; *.tex; *.texi; *.texinfo; *.tsp; *.unv; *.vcd; *.vda; *.xlc; *.xll; *.xlm; *.xls; *.xlw; *.zip;
74* hideClose: (boolean, defaults to *false*) Whether to hide the close button in the right corner
75* hideOnClick: (boolean, defaults to *false*) When true, hides the FileManager when the area outside of it is clicked
76* hideOverlay: (boolean, defaults to *false*) When true, hides the background overlay
77* hideQonDelete: (boolean, defaults to *false*) When true, hides the Dialog asking 'are you sure' when you have clicked on any 'delete file/directory' button
79Options if Uploader is included
81* upload: (boolean, defaults to *true*)
82* uploadAuthData: (object) Data to be send with the GET-Request of an Upload as Flash ignores authenticated clients
83* resizeImages: (boolean, defaults to *true*) Whether to show the option to resize big images or not
87* onComplete(path, file): fired when a file gets selected via the "Select file" button
88* onModify(file): fired when a file gets renamed/deleted or modified in another way
89* onShow: fired when the FileManager opens
90* onHide: event fired when FileManager closes
91* onPreview: event fired when the user clicks an image in the preview
95* See Backend/FileManager.php for all available server-side options
97### Custom Authentication and Authorization
99* As Flash and therefore the Uploader ignores authenticated clients[*] you need to specify your own authentication / session initialization. In order to do this you need to provide custom code in the "UploadIsAuthorized" callback function on the serverside and you need to specify "uploadAuthData" on the client.
101  [*] More specifically: Flash does not pass along any cookies, hence the PHP session ID cookie is not sent along with any upload request. The elements in 'uploadAuthData' are sent to the server as part of the request URI and will show up in the $_GET[] array, where you can extract them and manually initialize and start your session-based authentication.
103* FM now provides a server-side callback hook for each 'intrusive' request so you can apply your own business logic to determine if a given (file or directory, user context) mix is indeed permitted to upload / create / delete / move / rename / copy / download.
105  These hooks can be configured as part of the server-side options for the Backend/FileManager instance. For more info and a sample see the Demos/manager.php and Demos/selectImage.php files.
107  Server-side authorization hooks:
109  * UploadIsAuthorized_cb
110  * DownloadIsAuthorized_cb
111  * CreateIsAuthorized_cb
112  * DestroyIsAuthorized_cb
113  * MoveIsAuthorized_cb
116### Credits
118Loosely based on a Script by [Yannick Croissant](
Note: See TracBrowser for help on using the repository browser.