Chapter 3. Edit

Table of Contents

1. File Editing
2. File Operations
3. Creating and Uploading Files
4. Directory Operations
5. Subapplications
6. Editing Preferences

1. File Editing

Clicking on the "Edit" link takes us to a page showing the files located in the top-level directory of the application:

Figure 3.1. Edit

Edit

Note

In the case of the main application, the first folder displayed by bifernoadmin my not coincide with the top-level application folder. The reason is that the top-level application folder for the main application is BifernoHome, which for many sites is outside of the Web server root directory. When this is the case, the Web server root directory is displayed by bifernoadmin instead of BifernoHome.

The menu on the top (“Current directory”) shows the directory we are navigating.

The left column displays a listing of the files and directories in the folder. Clicking on the arrow next to a script filename will launch the script and display the result of its execution.

Clicking on a file name brings up a page that allows to edit the file content. The page has a textarea to edit the file and a number of buttons that will be described in the following.

Figure 3.2. Modifying a File

Modifying a File

Note

If the file is write-protected, a simple non-editable text is shown instead of the textarea.

The “Save file” button allows to save changes to disk.

If the file is an image, the image is displayed and no editing operations can be performed.

In addition to editing, a file can also be selected for further processing. To select a file, click on the round button next to the file name. This does not display the textarea for editing the file content. The plain selection of a file can be useful for very large files to avoid the delay due to the loading of a large file into the textarea.

2. File Operations

After selecting or editing a file, the top of the page will contain some information on the file itself.

Figure 3.3. File Info and Operations

File Info and Operations

The name of the file is displayed, along with its size, creation date and date of the last modification (notice that the file creation date is not supported on Unix).

A row of buttons allows to perform the following operations on the file:

Trash file

Clicking on this button displays a message requesting confirmation from the user (“Do you really want to move this file to trash?”). If the operation is confirmed, the file is moved to the “bfedit_trash” folder, i.e. the trash. This folder is created in the same location as the file the first time this kind of operation is executed. If you trash a file, and a file with the same name was already in the trash, the latter will definitively lost and replaced by the new file.

Once the “bfedit_trash” folder is created, the trash can be emptied by accessing the trash folder and clicking on the “Empty Trash” button.

Delete file

This button requests a confirmation and, if the confirmation is positive, immediately deletes the file from disk.

Move File

This button displays a page where we can specify a new location for the file.

Figure 3.4. Moving a File

Moving a File

When the “Move File” button is clicked on this page, the file is moved to the new location. Files can not be moved to a directory that is above the folder of the application they belong to.

It is necessary to have write permissions for the destination folder, or an error will be returned.

Rename File

This button displays a page that allows to change the name of the file.

Download File

This button allows to save a copy of the content of the file to disk on the machine where the browser is running.

3. Creating and Uploading Files

The first two buttons in the upper part of the page (see Figure 3.1, “Edit”) allow to create a new file and upload a file from our machine onto the server.

The “New File” button allows to create a new (empty) file in the current folder. The new file, once created, can be edited using the editing procedure described in Section 1, “File Editing”.

The “Upload file” button allows to upload a file from our machine onto the server. Once selected, the file is uploaded on the server in the current directory and can be modified using the editing procedure described in Section 1, “File Editing”.

4. Directory Operations

The files contained in a subdirectory can be reached and then edited by clicking on the subdirectory icon. The menu at the top allows to return to the parent directory. For security reasons, bifernoadmin will not allow browsing directories located above the folder of our application.

Two buttons in the upper portion of the page implement operations on directories:

New directory

This button allows to create a directory in the current folder (write permissions for the biferno user for the current directory are necessary).

Figure 3.5. Creating a New Directory

Creating a New Directory
Delete current directory

This button deletes the current directory only if the current directory is empty. Notice that on some platforms a directory will seem empty when examined with Edit even if it contains hidden files (e.g. files starting with a period ('.' under Unix). Hidden files under Unix can be displayed using the ls -la command from a terminal window.

5. Subapplications

To create a subapplication it is sufficient to create a new folder (if it does not exist already) and to access its content. The top portion of the window will show the following line:

Figure 3.6. Creation Form for a New Subapplication

Creation Form for a New Subapplication

After inserting the name of the application and pressing the “Make this folder a new App” button, the login window of the new application will be displayed. At this point, supply the same password of the parent application to manage the new subapplication using bifernoadmin. The password of the parent application will work because the new applications inherits all variables defined in the parent application, including the password.

The following screen is displayed when accessing a subdirectory that already contains a subapplication:

Figure 3.7. Navigating a Subapplication

Navigating a Subapplication

To navigate the folder, access the bifernoadmin interface for the subapplication by clicking on the link provided where the file listing would normally appear.

6. Editing Preferences

Edit allows the personalization of several preferences. Clicking the “Preferences…” button in the top right corner opens the editing preferences window.

The “File filter” tab allows to specify how Edit should filter files to display based on their suffix.

Figure 3.8. File Filer

File Filer

The * star character tells Edit to display all files on disk, while a list of suffixes tells Edit to display only files with a listed suffix. If the “Show not editable files” button is checked, files with a suffix which does not appear in the list, which are normally not displayed, will be displayed by Edit, but cannot be edited.

To make the modifications effective, click on the “Ok” button.

The “Icons settings” tab allows to specify the size of the icon displayed for each file in the listing.

Figure 3.9. Icons Settings

Icons Settings

If the file is an image in gif or jpeg format the thumbnail for the image can be optionally shown in the file listing along with the image. With this option, the width and height of the thumbnails can be also specified.