File manager
From B2evolution
The file manager provides a way to upload files and keep them organized.
Contents |
[edit] How to access the File Manager
There are two ways to access the file manager.
- Click on the Files tab, or
- In the Write tab, click the Files button to the left of the Save button
These methods are different in a couple of ways. First, when you access the file manager using the button in the Write tab, the file manager is shown in a pop-up window. Second, when you access the file manager using the button in the Write tab, it's possible to have it add code for an image into a post.
[edit] Setting up the File Manager
The default settings may work fine for you, but if you want more control or if you have any problems, here's how everything is set up.
[edit] Root directories
The file manager creates folders in the media directory to keep it organized and prevent one user from tampering with another user's files without permission. When a user accesses the File manager, they are not shown the top level of the media folder, but they are shown the directory or directories that they have permission to see.
There are two types of root directories: blog directories and user directories. You can allow one or both types. If you use user directories, then every user that has permission to access the file manager will have their own root directory. They will be the only user able to access it through the file manager. If you use blog directories, then a root directory will be created for each blog and shared by all users who have permission to use it. Those permissions are set in the permissions sub tab of each blog.
When a user goes to the file manager, they may have access to one directory or several. Or, they may be told that they don't have permission to any root directory.
[edit] Settings :: Files
To edit the global settings for the file manager, go to the Settings tab and choose the Files sub tab.
[edit] Filemanager options
Enable file manager. Uncheck this box if you don't want to use the file manager at all.
Now choose what type of root directories you want to have (see above). Check "Enable blog directories" or "Enable user directories" or both.
Enable creation of dirs. Should users be able to create sub-directories within their root directories?
Enable creation of files. Should users be able to create new files through the file manager? This isn't related to uploading files, it's talking about creating new blank files.
[edit] Upload options
Enable upload. Check to allow uploading files in general.
Maximum allowed filesize. In KiloBytes (This cannot be higher than your PHP/Webserver setting!)
[edit] Advanced options
You can edit the regular expressions that define valid file names and directory names. The default should be fine unless you have a good reason for editing it. Spaces are not allowed by default so that the file names will make good urls.
[edit] Settings :: File types
The File Types sub tab under the main Settings tab allows you to edit the file types that are allowed and define how they're handled and displayed.
[edit] How to use the File Manager
[edit] Uploading and posting an image
There are several different ways to use the file manager, but the most common use is probably uploading a photo and displaying it in a blog post. Here's how to do it.
- Go to the Write tab.
- Click on the Upload button that is below the area for typing in the post and to the right of the Save button. Don't click on the Files tab at the top of the page or some steps in this guide won't work for you.
- A new window pops up.
- Click Browse and select the file on your computer that you want to upload. Click OK once you've selected the file.
- Take note of the section on the right labeled "Upload files into:". This tells you what directory the file will be placed in.
- Fill in the other fields if you want to. They're optional.
- Click Upload.
- The image will upload and you'll be shown the code that you need to display this image in a blog post. Copy and paste the code, or just click on the "Add the code to your post!" link.
- Go back to the first window and look in the text area. There should be some new code. Click preview to make sure the image is showing up how you want it to.
- Close the pop-up window.
[edit] Posting an image that you uploaded earlier
- Go to the Write tab.
- Click on the Files button that is below the area for typing in the post and to the right of the Save button. Don't click on the Files tab at the top of the page or some steps in this guide won't work for you.
- A new window pops up.
- Put a checkmark next to the image or images that you want to add to your post.
- At the bottom of the list of files, there's a line that says "With selected files:". Click on the button labeled img. This puts code for displaying the image into your post in the other window.
- Go back to the first window and look in the textarea. There should be some new code. Click preview to make sure the image is showing up how you want it to.
- Close the pop-up window.
[edit] Troubleshooting
[edit] I can't see the Files tab or the upload and file buttons in the Write tab
First, make sure that the file manager is enabled in the Settings :: Files tab. Then, check to make sure that the user or group has permission to view and upload files.

