Better Asset Manager in Fuel CMS

edited February 2012 in Feature Requests
Currently evaluating Fuel CMS for a client project - love it so far, very easy and flexible! We are interested in replacing the asset / file manager completely with something improved - I noticed in another thread the admin said they were preparing a post on integrating this (http://github.com/simogeo/Filemanager/archives/master) to replace the stock functionality - is that available anywhere? Would be a huge help right now... Thanks, and keep up the great work!

Comments

  • edited 6:52PM
    I never got around to doing that did I. Let me try and recall the installation steps though:

    1. Download the filemanager from GitHub link and place the filemanager folder in fuel/modules/fuel/assets/js/editors/ckeditor/
    2. Change the scripts/filemanager.config.js file to something like this (note how the base variable is dynamically trying to be set):
    /*--------------------------------------------------------- Configuration ---------------------------------------------------------*/ // Set culture to display localized messages var culture = 'en'; // Set default view mode : 'grid' or 'list' var defaultViewMode = 'grid'; // Autoload text in GUI // If set to false, set values manually into the HTML file var autoload = true; // Display full path - default : false var showFullPath = false; // Browse only - default : false var browseOnly = false; // Set this to the server side language you wish to use. var lang = 'php'; // options: php, jsp, lasso, asp, cfm // we are looking for contributors for lasso, python connectors (partially developed) var am = document.location.pathname.substring(1, document.location.pathname .lastIndexOf('/') + 1); var segs = am.split('/'); segs = segs.slice(0, segs.length - 9); var base = '/' + segs.join('/'); // Set this to the directory you wish to manage. //var fileRoot = '/' + am + 'userfiles/'; //var am = document.location.pathname.substring(1, document.location.pathname.lastIndexOf('/') + 1); // Set this to the directory you wish to manage. var fileRoot = base + '/assets/'; // Show image previews in grid views? var showThumbs = true; // Allowed image extensions when type is 'image' var imagesExt = ['jpg', 'jpeg', 'gif', 'png'];
    3. Make the assets directory writable (or assets/images... whatever you decide to point to).

    4. You can then browse to it at (swap localhost with your server/ base fuel installation folder):
    http://localhost/fuel/modules/fuel/assets/js/editors/ckeditor/filemanager/index.html

    5. You can create a global javascript function called "SetUrl(path)" that the filemanager will call before closing the window (see line 322 or so of the selectItem function in the scripts/filemanager.js file

    6. Last but most importantly, you will need to setup access control to the file. The connectors/php/filemanager.php looks for an "auth" function. This is a little tricky, but is explained some here: http://www.getfuelcms.com/forums/discussion/525 near the bottom.

    If you are seeing a spinning icon, and your folders are writable, I'd recommend turning on errors at the top of the connectors/php/filemanager.php:
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); ini_set('display_errors', '1');

    Hope that helps some.
Sign In or Register to comment.