DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Frontend File Browser

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Oliver Schütze
Changed:2008-03-03T17:08:25
Author:Oliver Schuetze (T-Systems Multimedia Solutions GmbH)
Email:Oliver.Schuetze@t-systems.com
Info 3:T-Systems Multimedia Solutions GmbH
Info 4:

EXT: Frontend File Browser

Extension Key: fefilebrowser

Copyright 2008, Oliver Schuetze (T-Systems Multimedia Solutions GmbH), <Oliver.Schuetze@t-systems.com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: Frontend File Browser 1

Introduction 3

What does it do? 3

Screenshots 6

User manual 9

Installation 9

Quickstart 9

FAQ 11

Administration 11

Page/User TSconfig 11

Permissions 11

Configuration 11

Implementation 12

AJAX 13

Database 13

Classes 13

FAQ 13

Configuration 14

Backend-Configuration 14

Files 14

FAQ 16

Known problems 16

Creation of previews and thumbnails 16

Paste of files and directories 16

Error management 16

Double-click bug 17

Action cancelling 17

Parsing pdf files 17

Performance 17

Crossbrowser compatibility 17

To-Do list 17

title-attribute for actions 17

SSL encryption 18

Extended upload and email functionality 18

Cronjob for deleting of database carcasses 18

Media player 18

Send-to-flickr 18

Multi-user 18

Editor for text and images 18

Upload over ftp 18

Fallback alternative 18

Find deleted units 18

Alternative views of directory content 18

Labelling of trash and paste icon 18

Highlighting of current language 18

Show current directory size 19

Email formatting 19

„Tree and Details“ too large 19

Logging of attacks 19

Closing word 19

Change log 19

Introduction

What does it do?

This extension provides a Web 2.0-Online File Browser, for the use in the TYPO3 frontend. With the help of this extension the user can manage files and directories of a shared area of memory on the server like the habitually explorer on the desktop computer. The following list shows a part of the offered functionalities:

  • often used file and directory actions
  • indexing of files and directories for optimized search
  • navigation through the directory structure
  • slide show, zip-functionality, trash, ...

Functions like drag & drop or different actions in the same window could be offered by using current technologies like Ajax. The objective of this extension is the transference of an intuitive and natural management of a shared area on the server for logged in frontend users (fe_users) into the frontend of an existing TYPO3 installation. The usage for this extension is especially convenient for web portals, which provide a tool for the management of own files for registered and logged in users.

Frontend functions

All frontend functions of the Online File Browser in a detailed view – divided in different regions of the interface:

  • main navigation

    • return to home
    • refresh (the view of the current directory will be updated)
    • create new text files (the target will be the current directory)
    • create new directories (the target will be the current directory)
    • upload files (multiple file uploads are possible)
    • paste units (files and directories)
    • Show content of the trash folder
      • units in the trash folder can be deleted finally
      • units in the trash folder can be restored
    • Show the loading status
  • meta navigation

    • language selection (German and English are possible)
    • logout
  • path navigation

    with the help of this navigation you can switch to parent directories

  • tree view

    • listing of all directories
    • directories can be maximized and minimized
    • files and directories of the list view can be moved in directories of the tree view by drag & drop
    • by double-clicking on a directory it is opened
    • by clicking on the header the tree view module is maximized or minimized
  • preview

    • by clicking on a unit in the list view a preview is shown

    • the preview consists of different information depending on the unit type

    • general information for all elements:

      • permissions
      • keywords
      • preview image
      • name of the unit
    • additional information for directories

      • Total number of files
      • Total number of directories
    • additional information for files

      file size

    • additional information for pictures (png, gif, jpg, jpeg)

      dimensions in pixels

    • additional information for pdf files (only non-encrypted or non-saved (without passwords) files)

      Total number of pages

    • additional information for mp3 files

      length and bit rate

  • list view

    • the list view represents the core of the application
    • listing of all units in the current directory
    • hover effect for all units
    • by moving the mouse over the icons (mouse-over) a thumbnail will be shown
    • by clicking on an element, it will be opened in the preview
    • by double clicking (depending on the unit type):
      • a directory is opened in the list view
      • a text file is opened in the file viewer
      • images are opened in a slide show (Lightbox slide show)
    • actions for all units
      • rename
        • valid file names are required (no umlauts, no special characters)
        • if the file name already exists, a new name will be created: „fileExists_1.jpg“
      • move to trash
        • the application offers the possibility to move units into the trash folder
        • during the deletion of elements they are only hidden to the user but remain in the file system in order to eventually restore them
        • directories are deleted recursively (deleting of non-empty directories is possible)
      • assign keywords to set up a logical structure
        • with the help of keywords the units can be structured logically
        • more than one keyword assignable to a unit
      • copy
        • units can be copied and pasted in any desired directory with the help of the copy/paste icon
        • directories can be copied recursively: all directories and files it contains are copied simultaneously
        • copied elements can be inserted via the paste icon
      • cut
        • units can be cut with the help of the cut icon
        • directories can be cut recursively
      • drag & drop
        • by the use of Ajax in this application you can move units into other directories (the moving is realized as cut and paste)
        • the visual JavaScript effects are enhanced with Ajax requests in the background, instantaneously all actions of the user are performed on the file system of the server
        • the user can move units into files on the tree view and list view
        • directories are moved recursively
    • file actions (not applicably on directories)
      • send files as an attachment of an email
        • with the help of this functionality the user can send files as an attachment of an email
        • the email is extendible with a message text
      • download
        • download the file on the client system
        • the download button initiates the browser's “save as” dialogue
  • modules

    • all modules can be maximized and minimized by clicking on the header of the module
    • the current status of the modules is saved in the database
    • the first version of this extension consists of three different modules
      • zip - functionality
        • with the help of this module the user can create and download zip files
        • via drag & drop he can drop elements on the zip module, all units in the list will be compressed into one archive
        • directories are inserted recursively
        • via the X-button units can be deleted from the archive list
        • the zip-archive can be generated by clicking the create button, the download button delivers the generated archive
      • search functionality
        • all files and directories (except the contents) can be searched for names, file types and keywords
        • by using commas you can search for different search words
        • the icon on the right side of the search results offers a link to the location of the search result
        • in case of an unsuccessful search an info message is shown
      • slide show
        • in the slide show all pictures contained in the current directory are presented
        • two different modes: automatical slide show and manual slide show
        • the navigation is realized via the integrated navigation elements of the Lightbox slide show
Backend functionality

The backend offers the possibility to (de)activate the different modules for the frontend. Only activated modules are presented to the user. The administrator can define the path to the shared area of memory on the server.

Screenshots

Frontend
Login
img-1
Application
img-2
Window „create file“
img-3
Window „create directory“

img-4

Window „file upload“

img-5

Window „trash“

img-6

Window „rename“

img-7

Window „move to trash“

img-8

Window „set keywords“

img-9

Window „send email“

img-10

Window „download“

img-11

Window „search results“
img-12
Backend
Enable modules
img-13
Set relative path

img-14

User manual

Installation

Install the extension with the extension manager (Extension-Key: fefilebrowser). After the creation of the required tables in the database you can configure the extension.

Quickstart

This chapter gives a review over the required basis configuration for the work with this extension. More information can be found in chapter “Administration” of this manual

Create Page

At first a new page in the page tree is needed, on which the extension is inserted as a content element in the next step. The position isn't relevant, because you will insert a completely new TypoScript- Template. The illustration shows the created page.

img-15
Insert extensions as content element

Now you will insert the extension “Frontend File Browser” in the newly created page. To do this, locate this extension in the group of the plug-ins. It is essential that you insert it in the normal column of the new page. A detailed description of the configuration can be found in the chapter “configuration” of this manual.

img-16

Create new site template

The extension brings with it all required css-, html – and js files. That's why you have to create a complete new PAGE object. Consequently the exact position in the page tree is irrelevant. The following TypoScript code implies that the content of the normal column is used for the rendering process.

img-17

Include static extension template

In order to change the extensions layout and styles the CSS Styled Content is used. You can add this extension in the new site template beneath “include static (from extension)”.

img-18

Create new users

For a clearer project structure it is recommended to save the required frontend users in a separate system folder. You have to create a new page with the type “system folder”. On this page all the frontend users allowed to log in are stored. If a system folder with frontend users already exists in your TYPO3 installation, this work step isn't necessary. The extension browses the database table “fe_users” for the user name and grants access to all users filed this table. The following illustration shows the newly created “system folder” in which the users should be managed.

img-19

The creation of new frontend users is shown in the following illustration.

img-20

View in frontend

You can call the site with the extension over the id of the formerly created page.

FAQ

- ...

Administration

Page/User TSconfig

You don't need a special page or user TSconfig code.

Permissions

The basics about the Rights & Permissions concepts of TYPO3 can be found in the "getting started" document: http://typo3.org/documentation/document- library/tutorials/doc_tut_quickstart/0.1.0/view/1/12/#id2856932 for some advanced options see the section “MOD” in “doc_core_tsconfig”: http://typo3.org/documentation/document- library/references/doc_core_tsconfig/4.0.0/view/1/3/#id2798076

Configuration

A detailed description of the configuration process you can find in the chapter “Configuration”.

Implementation

Used software components
PHP classes
  • PclZip class (version 2.4)

    The developer can choose between different possibilities in creating zip-archives with PHP. The Online-File-Browser uses the PclZip class to archive files and directories.

    $elements = $_POST [' elements '];
    require_once (' pclzip .php ');
    $target = 'uploads / tx_fefilebrowser /zip /'. $this -> getCurrentUser-> getUserID () .'.zip ';
    $archive = new PclZip ( $target );
    $list = $archive -> create ( $elements );
    
  • Services_JSON class (version 1.31)

    With this class you can convert an associative array into the JSON format and send it to the client.

  • Furthermore used classes are the Mail class (Version 1.1.14) for sending emails with attachment, the FPDI class (version 1.2) for reading out informations from pdf files and the mphp3 class (version 1.0b) for calculating the length and the bit rate of a mp3 file.

JavaScript libraries
  • Prototype (version 1.5.1)

    Prototype simplifies the programming of modern, Ajax-based web applications, because this framework provides useful functionality for the development of dynamic applications. The following code shows a variety of the applied help functions.

    $('list '). appendChild ( listContent ); // Anhängen von Knoten
    Element . hide (' loadingData '); // Ausblenden eines Elements
    
  • script.aculo.us (version 1.7.1 beta 3)

    For the visual extension of web applications script.aculo.us offers a client sided effect library. This library contains different effects like drag & drop, animation and many more. The following code is used for dragging the names of directories and files.

    new Draggable (
    
    dragdropElementList_ '+i, // ID des Elements
    {
    
    // verschiedene Optionen sind möglich
    
    }
    
    );
    
  • JSON class

    For converting the server response from the json format into a JavaScript object, the parse function of the JSON class is used. The chapter Ajax response examines the processing of the server response in more details.

AJAX

The task of TYPO3 during the initialization of the extension is to render the required HTML template and send the resulting HTML code to the client. This HTML file contains only static informations, for example the html structure, the logo and the icons of the main navigation. Furthermore all the JavaScript and CSS files are transferred to the client. The window.onload-event of JavaScript triggers the client side initialization of the application. The successful transfer of all required files is the trigger for the window.onload event. The initialization consists of the creation of an instance of the AjaxFeFileBrowser class. The following code shows the initialization of the application.

window . onload = function ()
{
        myAffb = new AjaxFeFileBrowser ();
        myAffb . initialize ();
}

The initialize method triggers the creation of instances of different classes. The different regions of the user interface are represented by corresponding JavaScript classes. For the asynchronous loading of the preview content a new instance of the preview class is created.

Request

As already mentioned the initialization method of the AjaxFeFileBrowser class is responsible for the creating instances of different classes. For displaying a preview an instance of the preview class is required. After the creation of that instance it is initialization method is called with the absolute path of the requested file. For executing asynchronous Ajax requests the prototype framework offers a prepared Ajax class. The following code shows the initialization method of the preview class. By using the request method of the Ajax class you can create and send Ajax requests. The first parameter is the target script on the web server and the second parameter is a list of available options.

this . initialize = function ( path )
{
        new Ajax . Request (
                index .php ',
                {
                        // Per POST übertragen
                        method : 'post ',
                        // Callback - Methode bei erfolgreicher Beendigung
                        onComplete : this . buildPreview . bind ( this ),
                        // Parameter -String , der an Server übertragen wird
                        postBody : 'eID= tx_fefilebrowser_pi1 & action = preview & path ='+path +'& lang ='+                                                   eval (" myAffb . getLang () ;")
                }
        );
}
Response

After the processing of the request the server sends the requested information as a string in JavaScript Object Notation (JSON) back to the client. With the help of the method Parse of the JSON class the server response can be converted from text format into an JavaScript object. The access to the several elements is realisable by using the point operator as the following code illustrates. For displaying a preview with additional information the client has to filter the essential information from the response. These information can be integrated in an existing website by using Dynamic HTML (DHTML).

var content = JSON . parse (r. responseText );
var titles = content . titles ;
var item = content . Item ;
...
var previewName = createTextField ( item . name );
eID

The eID mechanism is used for sending Ajax requests from a frontend plug-in to the TYPO3 server without triggering the complete rendering process of the CMS. In this extension instead of handling the Ajax requests by the index.php, all requests are processed by the request.php. By the registration of the request.php in the TYPO3 backend the index.php forwards all incoming requests to the request.php. This only happens when the request consists of the parameter eID = tx_fefilebrowser_pi1. More information can be found in the podcast „Frontend AJAX casestory“ (http://castor.t3o.punkt.de/files/podkast12_v4_techinsight ajax.m4v).

Database

The database.pdf contains the database model.

Classes

The class diagrams of the client-side application logic (JavaScript on page 2) and the server-side logic (PHP on page 1) are situated in the file classes.pdf.

FAQ

- ...

Configuration

Backend-Configuration

In the TYPO3 backend you can configure the extension Frontend File Browser by using flexforms. The tab “modules” contains the possibility to (de)activate the modules shown on the right side of the frontend. The user can only see the activated modules. If modules are deactivated TYPO3 doesn't render the according div container. The code shows the access to the flexforms.

// Flexforms laden
$this -> pi_initPIflexForm ();
...
// Wert der Checkbox auslesen
$slideshow = $this -> pi_getFFvalue ($this ->cObj -> data ['pi_flexform '], 'checkBoxSlideshow ', 'sModules ');
...
// entsprechenden div-Container einfügen
if($slideshow)
        $tmp .= '<div id="slideshowModule"></div>';

The second tab contains the possibility to define the relative path where the frontend users have access to. The search function looks for the relative path and shows only permitted units as search result.

The extension doesn't provide a configuration by using TSconfig or TypoScript templates. An upgrade in this direction is imaginable.

Files

fefilebrowser

file

fefilebrowser

description

This directory is the main directory of this TYPO3 extension. It contains all used scripts, images and configuration files.

fefilebrowserdoc

file

fefilebrowserdoc

description

This directory contains the german and the english documentation of the extension.

fefilebrowserdocclasses.pdf

file

fefilebrowserdocclasses.pdf

description

This file contains class diagrams of the client-side (JavaScript) and the server-side (PHP) application logic.

fefilebrowserdocdatabase.pdf

file

fefilebrowserdocdatabase.pdf

description

In this file you can find a visualisation of the database model of the extension.

fefilebrowserdocmanual.sxw

file

fefilebrowserdocmanual.sxw

description

The documentation in german / english language.

fefilebrowserdocwizard_form.dat

file

fefilebrowserdocwizard_form.dat

description

No description

fefilebrowserdocwizard_form.html

file

fefilebrowserdocwizard_form.html

description

No description

fefilebrowserpi1

file

fefilebrowserpi1

description

This is the plug-in folder, because this extension is a frontend plug- in.

fefilebrowserpi1images

file

fefilebrowserpi1images

description

This folder contains all required images.

fefilebrowserpi1imagesicons

file

fefilebrowserpi1imagesicons

description

This folder contains all used icons (16x16).

fefilebrowserpi1imageslayout

file

fefilebrowserpi1imageslayout

description

This folder contains all required images for styling the layout of the extension.

fefilebrowserpi1imageslightbox

file

fefilebrowserpi1imageslightbox

description

The folder with all images used by the Lightbox slideshow.

fefilebrowserpi1imagesmenu

file

fefilebrowserpi1imagesmenu

description

The folder with all images for the main navigation (48x48).

fefilebrowserpi1imagespreviews

file

fefilebrowserpi1imagespreviews

description

The folder with all images for the different standard preview images (72x72).

fefilebrowserpi1imagesthumbnails

file

fefilebrowserpi1imagesthumbnails

description

The folder with the different standard thumbnails (48x48).

fefilebrowserpi1js

file

fefilebrowserpi1js

description

This folder contains all required JavaScript files.

fefilebrowserpi1jsscriptaculous-js-1.7.1_beta3

file

fefilebrowserpi1jsscriptaculous-js-1.7.1_beta3

description

In this folder you can find the different classes of the free script.aculo.us library.

fefilebrowserpi1jsAjaxFeFileBrowser.js

file

fefilebrowserpi1jsAjaxFeFileBrowser.js

description

This file contains the AjaxFeFileBrowser class of the application.

fefilebrowserpi1jsArchive.js

file

fefilebrowserpi1jsArchive.js

description

This file contains the Archive class (module) for creating zip files.

fefilebrowserpi1jsCreateDirectoryWindow.js

file

fefilebrowserpi1jsCreateDirectoryWindow.js

description

This file contains the CreateDirectoryWindow class for displaying the window for creating directories.

fefilebrowserpi1jsCreateFileWindow.js

file

fefilebrowserpi1jsCreateFileWindow.js

description

This file contains the CreateFileWindow class for displaying the “creating files“ window.

fefilebrowserpi1jsDeleteWindow.js

file

fefilebrowserpi1jsDeleteWindow.js

description

This file contains the DeleteWindow class for displaying the window for deleting of files and directories.

fefilebrowserpi1jsDownloadWindow.js

file

fefilebrowserpi1jsDownloadWindow.js

description

This file contains the DownloadWindow class for displaying the window for downloading files.

fefilebrowserpi1jsEmailWindow.js

file

fefilebrowserpi1jsEmailWindow.js

description

This file contains the EmailWindow class for displaying the window for sending emails with attachment.

fefilebrowserpi1jsGlobalScript.js

file

fefilebrowserpi1jsGlobalScript.js

description

This file contains the window.onload function and different help functions.

fefilebrowserpi1jsJson.js

file

fefilebrowserpi1jsJson.js

description

This file contains the imported JSON class for converting the server response into a JavaScript object.

fefilebrowserpi1jsKeywordWindow.js

file

fefilebrowserpi1jsKeywordWindow.js

description

This file contains the KeywordWindow class for displaying the window for setting keywords.

fefilebrowserpi1jsLightbox.js

file

fefilebrowserpi1jsLightbox.js

description

This file contains the imported Lightbox class for displaying the Lightbox slideshow.

fefilebrowserpi1jsList.js

file

fefilebrowserpi1jsList.js

description

This file contains the list class for listing the content of the current directory (files and directories).

fefilebrowserpi1jsModule.js

file

fefilebrowserpi1jsModule.js

description

This file contains the Module class for managing the different modules of the application.

fefilebrowserpi1jsPath.js

file

fefilebrowserpi1jsPath.js

description

This file contains the Path class for displaying the breadcrumb navigation.

fefilebrowserpi1jsPreview.js

file

fefilebrowserpi1jsPreview.js

description

This file contains the Preview class for displaying a preview.

fefilebrowserpi1jsRenameWindow.js

file

fefilebrowserpi1jsRenameWindow.js

description

This file contains the RenameWindow class for displaying the window to rename of files and directories.

fefilebrowserpi1jsSearch.js

file

fefilebrowserpi1jsSearch.js

description

This file contains the Search class (module) for searching files and directories.

fefilebrowserpi1jsSearchWindow.js

file

fefilebrowserpi1jsSearchWindow.js

description

This file contains the SearchWindow class for displaying the window with the search results.

fefilebrowserpi1jsSlideshow.js

file

fefilebrowserpi1jsSlideshow.js

description

This file contains the Slideshow class (module) for starting a new slide show.

fefilebrowserpi1jsTrashWindow.js

file

fefilebrowserpi1jsTrashWindow.js

description

This file contains the TrashWindow class for displaying a window for listing the trash content.

fefilebrowserpi1jsTree.js

file

fefilebrowserpi1jsTree.js

description

This file contains the Tree class for displaying a directory tree.

fefilebrowserpi1jsUploadWindow.js

file

fefilebrowserpi1jsUploadWindow.js

description

This file contains the UploadWindow class for displaying the window for uploading files to the server.

fefilebrowserpi1jsViewerWindow.js

file

fefilebrowserpi1jsViewerWindow.js

description

This file contains the Viewer class for displaying the window for showing the content of a text file.

fefilebrowserpi1jsWindow.js

file

fefilebrowserpi1jsWindow.js

description

This file contains the Window class for management of the different windows of the application.

fefilebrowserpi1php

file

fefilebrowserpi1php

description

This folder contains all required PHP scripts of the application.

fefilebrowserpi1phpFPDI-1.2

file

fefilebrowserpi1phpFPDI-1.2

description

In this folder you can find the imported FPDI class for parsing pdf files.

fefilebrowserpi1phpmphp3

file

fefilebrowserpi1phpmphp3

description

This folder contains the MPHP3 class for retrieving information from mp3 files.

fefilebrowserpi1phpPear_Mail

file

fefilebrowserpi1phpPear_Mail

description

With the help of the Mail class you can send emails with attachments.

fefilebrowserpi1phpclass.tx_fefilebrowser_application.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_application.php

description

This file contains the Application class of the extension.

fefilebrowserpi1phpclass.tx_fefilebrowser_config.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_config.php

description

In this file you can find different configurations.

fefilebrowserpi1phpclass.tx_fefilebrowser_database.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_database.php

description

The database class is used for the communication with the connected MySQL database.

fefilebrowserpi1phpclass.tx_fefilebrowser_directory.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_directory.php

description

This file contains the directory class of the application.

fefilebrowserpi1phpclass.tx_fefilebrowser_file.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_file.php

description

This file contains the file class of the application.

fefilebrowserpi1phpclass.tx_fefilebrowser_MMFile.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_MMFile.php

description

A special form of the standard file is the multimedia file, which is located in this class.

fefilebrowserpi1phpclass.tx_fefilebrowser_search.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_search.php

description

This file contains the search class of the application.

fefilebrowserpi1phpclass.tx_fefilebrowser_TextFile.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_TextFile.php

description

The text file is another specialization of a standard file.

fefilebrowserpi1phpclass.tx_fefilebrowser_trash.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_trash.php

description

This file contains the trash class which is responsible for gathering all deleted files of a logged in frontend user.

fefilebrowserpi1phpclass.tx_fefilebrowser_unit.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_unit.php

description

The file class and the directory class both inherit from the unit class.

fefilebrowserpi1phpclass.tx_fefilebrowser_user.php

file

fefilebrowserpi1phpclass.tx_fefilebrowser_user.php

description

The user class contains information about the currently logged in frontend user.

fefilebrowserpi1phpdownload.php

file

fefilebrowserpi1phpdownload.php

description

The download script is used for offering the direct download of the files.

fefilebrowserpi1phpjson.php

file

fefilebrowserpi1phpjson.php

description

This file contains the imported JSON class for converting an associative array into an JSON object for transferring to the client.

fefilebrowserpi1phppclzip.php

file

fefilebrowserpi1phppclzip.php

description

With the external PCLZIP class the zip functionality is realised.

fefilebrowserpi1phprequest.php

file

fefilebrowserpi1phprequest.php

description

All incoming Ajax requests are processed by the request.php. This file generates the server response and sends the required information back to the client.

fefilebrowserpi1phpupload.php

file

fefilebrowserpi1phpupload.php

description

With the help of this file the upload functionality is realized.

fefilebrowserpi1static

file

fefilebrowserpi1static

description

No description

fefilebrowserpi1staticeditorcfg.txt

file

fefilebrowserpi1staticeditorcfg.txt

description

No description

fefilebrowserpi1styles

file

fefilebrowserpi1styles

description

This folder contains the CSS files of the application.

fefilebrowserpi1styleslightbox.css

file

fefilebrowserpi1styleslightbox.css

description

These CSS styles are used by the imported Lightbox slide show.

fefilebrowserpi1stylesstyles.css

file

fefilebrowserpi1stylesstyles.css

description

This file contains the general CSS styles of the application.

fefilebrowserpi1templates

file

fefilebrowserpi1templates

description

This folder contains the required HTML templates for the application.

fefilebrowserpi1templatestemplate.html

file

fefilebrowserpi1templatestemplate.html

description

This file contains the basis template for this TYPO3 extension.

fefilebrowserpi1templatesupload_iframe.html

file

fefilebrowserpi1templatesupload_iframe.html

description

This HTML template is used for the <iframe> of the file upload process.

fefilebrowserpi1ce_wiz.gif

file

fefilebrowserpi1ce_wiz.gif

description

23x23 pixels large GIF image for the frontend plug-in as content element.

fefilebrowserpi1class.tx_fefilebrowser_pi1.php

file

fefilebrowserpi1class.tx_fefilebrowser_pi1.php

description

This file contains the main function of the frontend plug-in. The main function renders the application for the logged in user and the login form for all the other users.

fefilebrowserpi1class.tx_fefilebrowser_pi1_wizicon.php

file

fefilebrowserpi1class.tx_fefilebrowser_pi1_wizicon.php

description

No description

fefilebrowserpi1clear.gif

file

fefilebrowserpi1clear.gif

description

No description

fefilebrowserpi1locallang.xml

file

fefilebrowserpi1locallang.xml

description

This file contains different language information for multilingual output.

fefilebrowserChangeLog

file

fefilebrowserChangeLog

description

This file contains all the occurred changes during the runtime.

fefilebrowserext_emconf.php

file

fefilebrowserext_emconf.php

description

This file contains information for the module Extension Manager.

fefilebrowserext_icon.gif

file

fefilebrowserext_icon.gif

description

16x18 pixel large GIF image for the module Extension Manager.

fefilebrowserext_localconf.php

file

fefilebrowserext_localconf.php

description

This file lists all classes which have to be loaded during runtime. In this file you can also find the registration of the request.php for the eID mechanism.

fefilebrowserext_tables.php

file

fefilebrowserext_tables.php

description

This file contains tables and formular descriptions. In this file you can find also the registration of the flexforms and the definition which input fields should be hidden in the backend.

fefilebrowserext_tables.sql

file

fefilebrowserext_tables.sql

description

This file contains all the SQL-CREATE-Statements for new database tables.

fefilebrowserflexform_ds.xml

file

fefilebrowserflexform_ds.xml

description

This file contains the definition of the Flexforms structure in the TYPO3-Backend.

fefilebrowserlocallang.xml

file

fefilebrowserlocallang.xml

description

This file contains different language information for multilingual output.

fefilebrowserlocallang_db.xml

file

fefilebrowserlocallang_db.xml

description

This file contains different language information for multilingual output.

fefilebrowserlocallang_tca.xml

file

fefilebrowserlocallang_tca.xml

description

This file contains different language information for multilingual output.

fefilebrowserREADME.txt

file

fefilebrowserREADME.txt

description

No description

fefilebrowsersetup.txt

file

fefilebrowsersetup.txt

description

No description

FAQ

- ...

Known problems

Creation of previews and thumbnails

During the creation of previews and thumbnails, which contain transparencies, in all cases problems occur that set the transparent image regions to black.

Paste of files and directories

When you paste a file or a directory into an other directory and in the target directory already exists a unit with the same name, the name of the new file or directory will be extended with an index (name_1.jpg). By pasting a unit into the same directory (source = target) the name will be extended with an index too. When you copy a file or a directory you will see the wilful effect, that the newly pasted unit gets a new extended name. By cutting a unit and pasting it into the same directory you will see the problem, that the name will be extended to. This effect is unmeant, because the unit should be moved and not copied.

Error management

For displaying the successful completion of an action the application offers different status messages. Depending on the parameter success in the server response, a status message will be shown. The following code shows the server response for the successful creation of a file.

{"items":{"action":"add","hasDirectories":0,"path":"fileadmin\/Diplom\/frage.txt","iconPath":"typo3conf
\/ext\/fefilebrowser\/pi1\/images\/icons\/txt_ico.png","thumbnailPath":"typo3conf\/ext\/fefilebrowser
\/pi1\/images\/thumbnails\/txt_thumb.png","name":"frage.txt","changeDate":"21.02.2008 10:46","size":"1
 KB","success":1,"type":"text"}}

The first version of this extension keeps ready the differentiation between the success and the error case, but this differentiation isn't used consequently for all actions on the server. That's why the server-side application logic has to be extended in this direction. When an action closed successfully the server sends success = 1 otherwise the server sends success = 0. The success and error messages could be consigned in special XML files.

Potential upcoming errors are for example:

  • the input file doesn't exist on the server
  • problem while uploading files
  • ...

Errors while executing an action:

img-21

A successfully closed action:

img-22

Double-click bug

The current version of the application shows undesired effects after double click on different elements of the user interface:

  • home button
  • refresh button
  • breadcrumb
  • paste button

Action cancelling

When the user cancels a current action by clicking “cancel” on the status message during the execution, the current version only hides the window. By clicking on the cancel button the current action should be aborted. This reaction would be wishful for different actions like the file upload and the email functionality. The duration of these actions relies heavily on the current internet connection of the user.

Parsing pdf files

The parsing of pdf files for getting the page number is realized with the FPDF class. While parsing encrypted and password saved pdf files problems may occur.

Performance

A very important aspect is the performance. Before the practical use of this extension you have to test it intensively. The performance could get down by multiple parallel requests of different users. When various users seize to the file system of the server and send Ajax requests at same time, the application may show undesired effects like over-average long latency. Further analysis in this direction is very important.

Crossbrowser compatibility

This extension (in the first version) is compatible to the current browsers of Mozilla Firefox (version 2) and the Microsoft Internet Explorer (version 7). A cross browser compatibility can't be guaranteed in this first version.

To-Do list

title-attribute for actions

A very useful extension of this application would be title attributes on the different action buttons. Although self-explanatory icons were selected, a title attribute offers an extra orientation to the functionality of the button.

SSL encryption

Information from client to server are sent by default in plain text. That's why these information might be intercepted and read. So sensitive information of a login form should be transferred in a secure way. For the encryption of the login information a browser with SSL is required. The browser encrypt the data before sending these information to the server. The encryption complicates the illegal readout. The activation of the SSL encryption is realizable with the help of a TYPO3 install tool. A detailed description can be found in the literature.

Extended upload and email functionality

The current version only contains a default progress bar. While processing the current request the server application shows the default progress bar. But this progress bar doesn't contain any information about the current status of the action. For length of actions for example file uploads and email sending an extended progress bar is preferable.

Cronjob for deleting of database carcasses

When files or directories are cut, copied or moved an entry is created in the database tx_fefilebrowser_tableunits. When you assign keywords to a unit, this unit is set in this table, too. For this reason the size of this table steadily increases because of data records which must be saved only temporary. Files and directories which exist in the table tx_fefilebrowser_tableunits without any link to other tables should be deleted in periodical intervals.

Media player

An optional extension of the application would be the integration of a media player for displaying multimedia files in the preview and an full screen mode. This version only supports the possibility to view text files in the file viewer and images in the slide show.

Send-to-flickr

Because of the increasing popularity of flickr a useful extension of this application would be functionality to send images directly to a special flickr account.

Multi-user

The current version of this extension is realized for a single user environment. When more users work with this application at the same time some precautions have to be made to prevent inconsistencies. The database table tx_fefilebrowser_tableunits must be extended with the status Open, because you aren't allowed to delete, rename, move (and so on) opened files and directories.

Editor for text and images

A further interesting aspect is the enhancement of the application with an internal editor for text files and images.

Upload over ftp

The current upload process is realized with the Copy function (http). In the case of problems in the live version with the Copy function you can evade the according ftp functions.

Fallback alternative

Although the extension was designed and realized as an Ajax application, an advantage would be to offer a fallback alternative for users without JavaScript. This application would resign of all the Ajax advantages but it guarantees accessibility.

Find deleted units

In a final version of the extension you should clarify if the user can find deleted files and directories with the search function. The current version finds all files and directories independent of this fact. If it is not desired to find deleted units, a test if the unit is cut or deleted should be added. Unavailable Elements shouldn't be listed in the search result.

Alternative views of directory content

An interesting extension of the application is the integration of alternative views of the directory content. The current version offers only a detail view. Imaginable further views could be a list view or a thumbnail view of the content. The thumbnails are already generated in the current version, you only have to realize the correct formatting of the application interface.

Labelling of trash and paste icon

In order to give further information about how much files and directories currently exist in the trash folder and which units exit in the clipboard, an according labelling of the icons could be useful (paste icon --> name of the element, trash icon --> counter how much elements are in the trash).

Highlighting of current language

Another feature which can be realized is the highlighting of the current selected language in the meta navigation.

Show current directory size

An interested aspect is to display the size of directories. For realization of this feature you have to save the current size of every directory in the database. Whenever the file system of the server is changed, the size of all affected directories must be changed and the database must be refreshed.

Email formatting

The formatting of the sent email is another aspect to realize. The current version of the extension offers a plain text email without any individual style.

„Tree and Details“ too large

When you have a lot of elements in your list and you want to drag elements into a directory on the tree view, it could happen that you can't reach the requested directory on the tree. That's why the tree and the preview view on the left and the modules on the right side are fixed apart from a defined y position. When the elements have a fixed position they don't scroll. A resulting problem is that the elements are “jumping” when the browser offers to scroll as effect of the size of the left and right elements.

Logging of attacks

An enhancement in view of security will be to log attacks.

Closing word

This extension is the result of a diploma thesis which the author realized in cooperation with the T-Systems Multimedia Solutions GmbH in Dresden. The author thanks for the interests in this extension and is available for problems. Feedback, Bugs and tips for enhancements are wished-for.

Change log

No changes.

img-23 EXT: Frontend File Browser - 19