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 Filemanager¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2009-05-31T18:04:03 |
Author: | Thomas Waggershauser |
Email: | waggershauser@airware.de |
Info 3: | |
Info 4: |
EXT: Frontend Filemanager¶
Extension Key: air_filemanager
Copyright 2007-2008, Thomas Waggershauser, <waggershauser@airware.de>
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 Filemanager 1
Introduction 1
What does it do? 1
Screenshots 1
Users manual 2
Roles 2
ACL's and inheritance of rights 3
Adminstration 3
The Plugin 3
Configuration 4
Reference 4
Tutorial 5
Known problems 5
To-Do list 5
Introduction¶
What does it do?¶
This is the definitive fontend filemanager extension for typo3, even if many fetures are not implemented right now. The reason for that is, that it uses the dam to store the meta data.
The main purpose for this extension is for the use in online- communities. Every FE-user can upload his own documents to share them with others.
Note: In Version 0.7.0 the rights-handling changed. This Document is not completely up to date!
Screenshots¶
Illustration 1: Filelist
Illustration 2: Upload file
Illustration 3: Owner edits file metadata
If you want to test drive the extension, you can do so under http://www.airware.de .
Users manual¶
The extension needs the dam to work. It adds columns for user and rights to the table tx_dam and creates an own table to index directories, which is not done in the dam.
This allows to create an own frontend access layer in TYPO3, which is similar to ftp.
Roles¶
For each dir and each file, four roles are existing: The owner (usual the one who creates the thing), a fe_group, normal logged in users and anonymous, not logged in guys. While the owner is allowed to do everything, the rights for the other three roles can be adjusted by this owner or an be_user.
There are tupels of 4 bits for each role, similar to the rights in a UNIX filesystem. These are:
- r – allowed to see the file or dir in the dir listing (8)
- e - allowed to edit the metadata (4)
- w - allowed to write in the directory or to overwrite the file (2)
- x – allowed to see the content of the directory (1)
To delete, the “e”- and the “w”-flag are needed.
If you want to edit this permissions in the backend, you need to specify the permissions with the numerical values. Just count the numerics above and you get the exact value.
For Example “r . . x” is 9 or “ r e w x” is 15.
ACL's and inheritance of rights¶
Since version 0.7.0, it's possible to assign a file or dir to an arbitrary number of groups. This is a very nice feature to handle more complex setups, but its not easy to set default-values per typoscript. For that reason we implemented the inheritance feature: Files and folders get rights and acl's from the folder they're created or indexed in.
Subadmin¶
It's now possible to set a group in an ACL as subadmin, to give full privileges to everything below this folder, to the corresponding group. The subadmin-privileges can only be set in the BE.
Recursive changing of rights¶
Subadmins have the possibility, to apply the ACL's of a directory to everything below this directory. Just check the checkbox and save, to do this. Existing ACL's are deleted!
Adminstration¶
After installing you have to include the static typoscript coming with the extension. Then just insert the plugin and you can start.
Some settings can be adjusted in the constants editor. First you should set the path to the filemanager-root.
If you want to set the access for your root-dir, you can edit the record in the list-module. By default, the records are stored in the media-folder of the dam. If you use dam with the default- configuration, you don't see this folder. Just change this setting in the extension-manager (dam), or use the storage-property in Typoscript, to define a different storage-folder.
Illustration 4: Edit directorys in the backend
However, it would be useful to restrict the use of the extension for logged in fe-users, because for that it was mainly written.
The Plugin¶
Since Version 0.6 the Plugin is equipped with a flexform. This allows even non-admin users to use the plugin and apply some configuration.
This feature was added for the “Hochschule Darmstadt”, to allow sub- admins to configure the plugin for there own faculty without having full admin-access.
Illustration 5: Configuring the plugin through flexform
((generated))¶
The Parameter “Startdir”¶
This Parameter defines the path which the Plugin shows by default. This path is relative to the root-path defined with typoscript.
The Parameter “Mode”¶
The default-mode is the same as already known, but there is a new one now: The “Homedir” mode. In this mode, the plugin by default shows the content of a directory with the name of the current fe-user. The path of this directory is root-path + startdir.
If the directory doesn't already exist, it is created with the current fe-user as owner.
The “default categories”¶
These categories are assigned by default to newly uploaded files.
Filemanagergallery¶
Since Version 0.7.2 there exists another plugin pi2 which renders a thumbnailview of images. It uses an own extension of the filemanager- template, which you have to include first.
In this ts-template, thumbs are configured under thumbconf .
Upload Notifications¶
Since Version 0.8.15, it is possible to automatically send an email, when new files are uploaded. This mail goes to all users with read- access to the corresponding directory.
Expiry-Date¶
It is possible to set an expiry-date to every file. After achievement of this date, the file can be automatically deleted via cronjob. The date can be set automatically when a new file is uploaded.
Configuration¶
The filemanager is highly configurable through heavy use of typoscript. If you only want to configure the access-detail, the max uploadsize or want to use a different Template, then just use the constant-editor. If you for example want to add more dam-fields then you need to edit the setup.
Reference¶
root¶
Property
root
Data type
string
Description
Rootdirectory for plugin
Default
fileadmin/
storage¶
Property
storage
Data type
int
Description
Storage for directorys. Defaults to the dam-media-folder
Default
media
maxsize¶
Property
maxsize
Data type
int
Description
Max size for files to upload
Default
1 000 000
damfields¶
Property
damfields
Data type
Description
List of fields, separated by comma
Default
description
defaultFile.rights¶
Property
defaultFile.rights
Data type
defaultRights
Description
default rights for new files
Default
defaultDir.rights¶
Property
defaultDir.rights
Data type
defaultRights
Description
default rights for new directories
Default
defaultCategories¶
Property
defaultCategories
Data type
Description
List separated by comma. These categories are automatically assigned to newly uploaded and indexed files.
Default
allowedCategories¶
Property
allowedCategories
Data type
Description
List separated by comma. When empty, all categories are allowed
Default
fileList¶
Property
fileList
Data type
fileList
Description
Default
uploadForm¶
Property
uploadForm
Data type
cObject
Description
Default
editForm¶
Property
editForm
Data type
cObject
Description
Default
newDirForm¶
Property
newDirForm
Data type
cObject
Description
Default
areYouSure¶
Property
areYouSure
Data type
areYouSure
Description
Default
filesysCreateRights¶
Property
filesysCreateRights
Data type
string
Description
Default
0644
feuserAtIndexing¶
Property
feuserAtIndexing
Data type
bool
Description
Set feuser who does the indexing as owner
Default
1
fileIcons¶
Property
fileIcons
Data type
String
Description
Path to the fileicons for the listview
Default
fileIconsType¶
Property
fileIconsType
Data type
String
Description
Default
gif
thumbs¶
Property
thumbs
Data type
bool
Description
Activate rendering of thumbnails for images
Default
thumbconf¶
Property
thumbconf
Data type
thumbconf
Description
Default
sortconf¶
Property
sortconf
Data type
Description
Default
allowOwnerEditAccess¶
Property
allowOwnerEditAccess
Data type
bool
Description
Default
uploadNotification¶
Property
uploadNotification
Data type
Description
Default
[tsref:plugin.tx_airfilemanager_pi1]
((generated))¶
defaultRights¶
Property
ac_owner
Data type
4-bit tupel
Description
default value for the role “owner”, like described in “roles”
Default
Property
ac_login
Data type
4-bit tupel
Description
default value for the role “login”, like described in “roles”
Default
Property
ac_other
Data type
4-bit tupel
Description
default value for the role “anonymous”, like described in “roles”
Default
Property
inheritance
Data type
bool
Description
de- / activate inheritance of rights
Default
[tsref:plugin.tx_airfilemanager_pi1.defaultRights]
fileList¶
Property
list
Data type
cObject
Description
Default
Property
dirrow
Data type
cObject
Description
Default
Property
filerow
Data type
cObject
Description
Default
[tsref:plugin.tx_airfilemanager_pi1.fileList]
areYouSure¶
Property
template
Data type
cObject
Description
Default
Property
suretext
Data type
String / key/value
Description
Key / Value - pairs
Default
[tsref:plugin.tx_airfilemanager_pi1.areYouSure]
thumbconf¶
Property
imgTypes
Data type
Description
Default
Property
maxThumbWidth
Data type
Description
Default
Property
maxThumbHeight
Data type
Description
Default
Property
enableLightBox
Data type
Description
Default
Property
lightBoxW
Data type
Description
Default
Property
lightBoxH
Data type
Description
Default
Tutorial¶
As example: You want to use the keywords-field of the dam-table. To achieve that, you first have to insert a field in the upload form. To do so create a template file somewhere in the fileadmin-tree. Add a new input field to the UPLOADFORM subpart like this:
<div class="formrow">
<div class="namecol">Keys:</div>
<div class="inputcol"><input name="tx_airfilemanager_pi1[meta][keywords]" type="text"></div>
</div>
The important thing is the name of the inputfield. “meta” means that this information goes in the dam-table, “keywords” is the name of the column.
Now insert the path of this new template for the uploadform in typoscript:
plugin.tx_airfilemanager_pi1.uploadForm.10.template.file = fileadmin/templates/ext/fm.tmpl
Now there's only one thing left: You have to tell the extension to allow to insert keywords in the dam table:
plugin.tx_airfilemanager_pi1.damfields = description,keywords
Known problems¶
The extension renders completely through the method cObjGetSingle() and its not cached. This gives a maximum flexibility but could be a performance problem very easy..
To-Do list¶
Quotas (volume or number of files)
copy, cut and paste
eval fileextensions (upload only for allowed ones)
and much more (not yet on paper..)
EXT: Frontend Filemanager - 6