We sent out a recent survey with an update to MCFileManager and MCImageManager it it became apparent to us that some might need a bit of tips and tricks when it comes to certain implementation issues. Thank you very much everyone for the feedback you provided with the survey, it helps a lot.
Limiting write access
If you have other ppl than yourself that uses the software a good option is to limit functionality as much as possible until they request it. One good way of limiting the problem with users uploading files into the configured root folder (usually a website root) is to limit write access completly to that folder, but not sub folders.
Place a file named mc_access into the configured root folder and fill it with this content:
The underscore “_” forces the option to be local and not continue to apply to all sub folders.
Each configuration option in the wiki will contain example on how to use the config option inside an mc_access file.
Forcing formatting options
One common problem with users uploading images is that they tend to upload their 3000×2000 pixel camera images, any images larger than say 640×480 isn’t usually used on websites, unless you are publishing print quality pictures for press releases or similar. One way to force this, is to set formatting options in the only folder they are allowed to upload files, there are actually various ways to configure this, you can simple force a site wide upload.format option that places different sized files in different folders. This example is for use inside an mc_access file.
Create a file called mc_access in the folder where images are stored.
This will create a file named <filename>_640_480.<ext> if uploaded in that folder (or any subfolder). The size will be forced to this.
One idea might be to have a main images folder, and then make 3 sub folders called “small”, “normal” and “large” and add different mc_access files to that folder for the different forced images sizes.
You can read more about the upload.format option in the wiki.
This is quite a nifty feature, when a user creates a folder, you can use directory templates in order to control what that folder can do and contain, that means you can put an mc_access file into a directory template! You might want to have a complete folder with sub folders when your user creates a new folder, so he knows where to put images and documents. Perhaps you want a certain index file, or empty submenu file to be included with every folder if you use it to control structure, submenus and layout.
You can checkout the configuration option in the wiki, also don’t forget that you can force your user to use these directory templates, and of course, if you configure using mc_access you can have different directory templates depending on where the user decides to create a new folder.
The MCFileManager also has file templates that allow you to copy a template file when the user creates a new document through the gui.
We hope these tips might help you on the way to implement our products with your own, good luck, and be sure to visit the forum if you have any problems.
This information will also be added to the wiki.