Setup Filemanager Example Script
Created originally on Bitbucket by lambjs (Josh Lamb)
The filemanager I've built and used in various Studio projects is suitable. We'll store it in a new repo called SGT.Sterling.Filemanager. This will be a mini app that creates a barebones example of the usage of filemanager.
-
SGT.HowardTravel.HowardTravelWebsite repo has a filemanager:
- /internal/library/legacy/class.filemanager.php
- /public_html/staff/library/filemanager/* -
- /public_html/staff/library/imagemanager/* - Not sure if this is actually being used?
- /public_html/staff/library/js/tinymce.filemanager.js - Jquery based configuration which should enable TinyMCE elements with a filemanager upload interface attached
- /public_html/staff/library/js/sgx.js
- /public_html/staff/modules/downloads - Studio module that ties it all together
- /internal/config.php - Review to see filemanager config options
-
Create a bare-bones application that acts as a demo app for the filemanager tool. No need for authentication or menus like the studio, just bare implementation
- /composer.json
- /config.php - Configuration parameters
- /library - all php class code
- /media - Where the file uploads should end up
- /www/.htaccess - Should route requests to /media/* to a filegate.php script (see below)
- /www/js - all JavaScript
- /www/img - all images
- /www/*.php - example usage scripts
-
Needs to have an ajax endpoint which processes various backend tasks ie. upload, etc.
-
Filegate (ie. tool that accesses media folder which should be set to a location outside the www root. This enables all media requests to be processed by PHP and would allow us to add additional post-processing and/or to use access control rules, etc)
-
Filemanager itself - browser of images
-
File Interface - to be contained in a popup window, will interact with TinyMCE to return an image path to a calling Javascript process
-
TinyMCE integration example page - Using the tinymce.filemanager.js, setup an MCE instance that has an attached Filemanager interface