EXT: File List

Extension Key: dr_blob

Language: en

Version: 2.3.2

Keywords: forAdmins, forIntermediates, forAdvanced

Copyright 2000-2010, Daniel Regelein, <daniel.regelein@diehl-informatik.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.org


Table of Contents

EXT: File List 1

Introduction 3

What does it do? 3

Screenshots 3

Integration with other Extensions 5

Users manual 6

Creating a new record 6

Creating a file category 8

Adding a “Filelist” content element to a page 8

Configuration of the content element “Filelist” 9

Explaining the List-Types 11

The vFolderTree 12

The Personalize-Feature 14

Administration 15

(System-) Requirements 15

Server settings 15

Installation 15

Storage Types 18

Admin Notifications 18

The Update wizard 19

Access Restriction for Backend Users 19

Categories 20

Integration with indexed_search 21

PageTSconfig 23

UserTSconfig 23

Configuration 24

Configuration Value Priority 24

HTML Example Template 24

Template-Marker Reference 24

Including the Static Template 26

TypoScript Reference 27

Registers 32

Tutorial 33

Customizing [more]-, [back]- & [download]-links 33

Using an own sysfolder for each language 34

Generate a list of the top 5 downloads 35

Specific Sort Sequence 35

Customizing downloads-filenames 36

RealURL integration 37

RSS Feeds from dr_blob 38

Development: Extending dr_blob 39

Feature wishes & Bug reports 39

ChangeLog 40

Credits 43

Thanks to... 43



Introduction

What does it do?

First of all... What is a blob? A BLOb is a fieldtype in a RDBMS and means Binary Large Object.

This Extension adds a frontend plugin to display a list of files (Binary Objects).

Google is able to index the files's contents.

The files are either stored in the filesystem in a folder inside- or outside the TYPO3 document root directory, or directly in the database.

The link pointing to a file is masked, so it is not possible to download a file by url hacking.

The records are managed in the backend.

Whenever a record of the type dr_blob is created it the uploaded file is quoted and stored in a database column or an predefined (secure) folder.

When storing a file in the database, you can store up to 2 ^ 32 bytes per row; That are 4GB (!) in every row, depending on your disk space and the upload settings in php.ini and my.cnf.

Storing the files in the database has the following advantages:

  1. The records are a part of the backup of the database server

  2. The disk space of the application server isn't used that much.

  3. The file does not exist physically on the hard disc...

  4. ...so it is not possible to get the file via URL-Hacking.

Records can be categorized, and lists can be configured to show only a records having specific categories.

The list of the displayed records can be narrowed down by using the standard TYPO3 features starttime, endtime, hide and restrict access to a fe-group.

In the frontend you can choose between a common list of records, a customizable list of special items (“VIP-Items”) for highlights or something, and a personalized collection of items each FE-user can define for himself. This mode allows authorized frontend users to subscribe several filelists on several pages to display a list of records of their interest. Therefore only the latest records are displayed. Using this function it is possible to generate personalized lists for every user.

The extension also has a search function to search for records in a special list.

The extension offers completely design freedom ensured by using the TYPO3 inbuilt template engine.

Screenshots

  1. A Basic file list


  2. The Virtual Folder Tree (“vFolder Tree”)






  1. Detailed view of a single record




  1. Personalized lists




Integration with other Extensions

The Extension dr_blob is able to integrate itself with the following Extensions (if installed)

Extension Key

What does it do

t3skin

If the “new” Backend Skin is used, dr_blob comes with other icons than it would do if the classic skin is used.

css_styled_content

The RichTextEditor-Field used to describe a file can be modified using PageTS

indexed_search

The indexed_search-Engine searches inside the dr_blob-Files

linkhander

If available, dr_blob-File-download-links become available from the browselink-popups

Users manual

Creating a new record

For creating new records you've to use the List-Mode. Select the sys folder containing the records from which the frontend plugin receives its data.

Then just click the link Create new record or hit the according button:


Fields of a File record

Title

This field contains the record's title and has to be filled out.

Record storage type

Use this field to select where to store the file. Currently files can either be stored in the database, or in the filesystem. When the files is stored in the filesystem, ensure that the storage folder is outside the TYPO3 root directory. (see chapter Installation for details)

Language

Use this field to define the language of this record.

Original Translation

Use this field to attach the translated version to the default language record.

Version

Field to manage the version tag of a record.

Author / Author's eMail address

This field can be used to tell users the author and his email-address

Description

This is the main text of a record. Depending on your editor component it is possible that the editor shown in the upstanding picture varies to yours.

Image

Add additional images to the record to describe it. Could for example be used as preview for the download content.

Filename

The filename is only necessary if a file is attached. The field is filled out automatically when the record is saved for the first time. If the record is already saved you can set a custom filename here.

Filesize

The filesize field is set automatically when a file is attached to this record. It contains the number of bytes the attached file has.

You cannot edit this field.

File checksum

The checksum field is set automatically when a file is attached to this record. It contains a md5-hash of the file.

You cannot edit this field.

Filetype

The filetype field is set automatically when a file is attached to this record. It contains the the content type of the attached file.

You cannot edit this field.

File

This field is used to select the file that shall be attached to the document. To select the file from the hard disc hit the according button 'browse' and select the file.

When the record is saved, the fields filename, filesize, file checksum and filetype will be set automatically.

VIP-Record

This checkbox prepares the record to be shown on the TOP-List of your website. If the hook is not set the record won't be listed in a top list.

Download Counter

This read only field show the number of times an attached file has been downloaded yet. Use the according button to reset it to zero.

File Categories

Use this field to categorize the record. The administrator can configure pages to show only records that have a specific category.

Hide

This field is one of the four fields to control the visibility of a record. The record won't be shown if it is marked hidden.

Starttime

This field is one of the four fields to control the visibility of a record. The record won't be shown if the value of starttime is a point in the future.

Endtime

This field is one of the four fields to control the visibility of a record. The record won't be shown if the value of endtime is a point in the past.

Access

This field is one of the four fields to control the visibility of a record. The record won't be shown if current frontend user isn't a member of the group selected here. You can also configure this record to be only shown if a user is logged in (independent of the group membership) or if no user is logged in.

Creating a file category

After choosing File Category the following input mask will appear:


Fields to describe a category




Fields of a file category

Hide

The category won't be shown on the website if it is marked hidden.

Title

This field contains the category's' title and has to be filled out.

Adding a “Filelist” content element to a page

  1. To add a new Filelist-Content-Element to a page perform the following steps:

  2. Goto the page where the filelist shall be insert, and hit the button Create Page Content.

  3. Select The Option Pagecontent --> Click here for a wizard!

  4. Select the plugin Filelist. The number of elements listed here may vary from yours.




  1. Select the position where to place the plugin

  2. Enter a Header for the plugin and hit the save-Button

  3. To ensure the cleanness of your backend you should create at least one page of type sysfolder as the data storage of the filelist entries.

Configuration of the content element “Filelist”

Data Source-Tab




Startingpoint / Recursive

Select the sys folder(s) / pages where the records are being stored by selecting them in the field Starting Point.

The recursive level sets the level of sub folders that are also included.

If you are using the vFolderTree, the datasource and recursive level are used to define the tree.

Category mode / Category selection

Select whether to show all records, independent what categories they are associated with, or whether to show only records that have the categories selected in the field Category Selection.

General Settings




What shall be displayed

The field What shall be displayed allows you to choose of of the four list-types the plugin offers. Each list-type has it's advantages. See the chapter Explaining the List-Types for detailed information about them.

The default value is the LIST-Mode.

Template File

Field to upload a template file for the plugin. An Example Template is placed in the sub folder res in the extension root directory. This value overwrites the template file set via TypoScript for the current plugin.

If no template is set, the extension uses its own standard templates.

Page where to display single items

Allows you to define a custom page on which the details of a record shall be displayed. That pages also needs to have a plugin of the type dr_blob.

If nothing is selected, the plugin sends the single record to the current page.

This is useful when you have other plugins / information on this page and don't want them to be affected by the filelist.

Page where to return to

You can select to which page the single mode shall return to. That pages also needs to have a plugin of the type dr_blob.

If nothing is selected, the plugin sends the single record to the current page.

This information only makes sense on pages with a dr_blob-plugin and the view-type SINGLE.

“Order by” this field (LIST MODE)

Set the default sorting of records in the LIST Mode (and so the list of results of the SEARCH mode too).

Have a look at the chapter Specific Sort Sequence for details on the Custom Backend Sorting - Value

Ascending or Descending

Set the default sorting direction of records in the LIST Mode (and so the list of results of the SEARCH mode too).

Number of items to list

Sets the number of items a list (no matter what type) contains.

Show "Add to Personal Container" (LIST-Mode)

If this value is set and the current plugin-mode is the list mode, authorized users will find a button that gives them the possibility to add the data sources of the current plugin to their personal list of item they are interested in. Once this button was clicked, it changes itself to remove the selection of this folder.

“vFolderTree”-Settings


Show the Virtual Folder Tree

Set this value to render a virtual folder tree in the frontend. The values entered for Starting Point and Recursive level define the values and the depth of the folder tree.

This feature is limited to the LIST-View currently.

Initial State of the vFolder Tree

This option determines what to render if a page containing a vFolder Tree is accessed, and no folder is selected yet.

Don't show any records initially renders an empty list.

Show the records of the first folder renders a list of the files found in the first folder managed by the vFolder Tree.

Show the records of all folders... show the records of all folders.

Folder Subscription Mode

This parameter acts toghether with the personalize-feature. It is only necessary if a list is created with a vFolder Tree and a Personalize-Button. The parameter defines what users subscribe for:

You can either allow users to subscribe to all folders at once, or to allow them to subscribe each single folder of the vFolder Tree.

Explaining the List-Types

This extensions differentiates between a few list types, all of them have advantages and disadvantages.

The LIST-Mode

The LIST-Mode is the default option.

The mode generates a sortable list of the entries,for example in table form. You can define the attribute the list is sorted after initially.

It also allows you to enable the “Add to Favorites”-Button. Using this button, logged in users can subscribe the list. See the PERSONAL-Mode for more information.

It is also combinable with a virtual folder tree (the vFolderTree), that renders an explorer-like view on part of the page tree the plugin is configured to manage.

The SEARCH-Mode

The SEARCH-Mode shows up a search box. Using this search box a user can search various attributes in a list for a string.

The SEARCH-Mode uses the LIST-Mode to render the results.

The fields used in the search function can be set using TS.

The TOP-Mode

The TOP-Mode consists only records that are marked as VIP-Records.

The PERSONAL-Mode

The PERSONAL-Mode displays records from pages the logged-in user subscribed.

Each authorized user can combine lists regarding her / his personal needs. Therefore plugins using the LIST-Mode can be configured to show a button that allows user a add that plugin 's sys folders to his favorites.

This option is for the usage on big web projects, where several filelists on several pages receive their data from a lot of several sysfolders. User can subscribe items from the file lists they are interested in.

You do not have to select the datasource (Object of type “page”) for this mode.

The DUMMY-Mode

The DUMMY-Mode generates no output. It is used as a listener to be able to download files that are linked from somewhere (f.e. dr_blob-Files that are linked from rte) without having another dr_blob (pi1)-plugin somewhere in your pagetree.

The vFolderTree

The vFolderTree (Virtual Folder Tree) shows up a directory tree of the pages you defined as Startingpoint on the Content element. The recursive level defines the depth.

Access Restriction

The folders displayed in the tree are normal pages or sysfolders. Right click on a folder that is part of the tree in the backend, an choose Visibility Settings.




Now you can define the users, that are allowed to see this folder in the frontend.


Localization

The vFolders shown in the tree can be localized by adding a Page Translation (“Alternative Page Language”) for the Page or Sysfoler.




The Personalize-Feature

To understand the personalize-feature imagine a web project containing about 20 different file lists on different pages and in different contexts. There are several frontend user with different interests.

Each of the lists mentioned above can be appointed with a personalize button.

Every frontend user browses the various pages, and subscribes the contens he is interessted in. That may be one- or more file list(s).

Place a plugin of the type dr_blob configured with the PERSONAL-mode on one page (for example the welcome page). Within this plugin (rendered in list-style) an authorized user will find the latest records from the lists he subscribed.

Administration

(System-) Requirements

The following table shows the versions of the different systems required for this Extension.

Server

TYPO3

You should have at least TYPO3 4.0.0. The extension may work with older TYPO3 versions too, but there is no guarantee.

PHP Interpreter

dr_blob expects at least php5 on the Webserver

Database

Every MySQL-Version TYPO3 works with

The Extension has not been tested with other database management Systems than MySQL yet. If you do so feel free to inform me about the results.

Extension Requirements

indexed_search

The integration of the files managed with dr_blob using the indexed_search-Extension has only been testet with indexed_search Version 2.11

linkhandler

The integration offers the possibility to link dr_blob-records from the RTE using the browselinks-Popup

Conflicts with Extensions

None :-)

Server settings

php.ini

These settings define whether the php application server accepts file uploads and how big the files may be.

Parameter

Value

file_uploads

(def. 'On') Ensure that this option is enabled

post_max_size

Max. POST-size PHP will accept

upload_max_filesize

(def. 1M) Sets the maximum upload filesize. Please notice that raising only this value maybe won't have any affects; Also rise value max_allowed_packet in the my.cnf-file

memory_limit

Defines the memory limit php is allowed to use. When uploading a blob file, it is written into memory first, so rise this value if it does not fit your need.

Remember to restart the application server service (web server) after changing these value

my.cnf

Settings in my.cnf are only necessary if the storage type “database” is enabled.

Parameter

Value

max_allowed_packet

( def. 2M ) This field defines the max. Packet size the mysql database will accept. Raise this value to increase the maximum filesize.

Remember to restart the database service after changing the value

Installation

Install the extension using the extension manager.

Creating database tables

The FileList-Extension needs four database tables:

Database table

...needed for

tx_drblob_content

Database table for storing the content (Title, description, the entire file,...). The “data”-table

tx_drblob_personal

Database table to store which user subscribed which list

tx_drblob_category

Database table for storing categories

tx_drblob_category_mm

Database table for associating files with categories


The Extension is now installed.

Extension Configuration

The Extension configuration can be done using the Extension Manager or the the Install Tool.




Accessing category records

This option allows you to select where the plugin searches for category records. You can either select StoragePID to use the General record storage path of the Sysfolder (with is limited to one target), or you can select IDList to define multiple targets using the PageTS of the sysfolder containing the file records.

Enable Download-Counter Reset

It determines whether it's possible to reset the field that counts how often a file has been downloaded yet. If this option is set to true, you'll have to enable it for non-admin-users using the exclude-fields.

Use IndexedSearch Integration

Select whether to enable integration of dr_blob with the indexed_search-Extension, or not. If you choose to, dr_blob will xClass the indexer-class of the indexed_search.

There are a few parameters that have to be considered too, see chapter Integration with indexed_search.

File Storage Locations

You can select three different file storage types.

If no type is selected, the database storage type is used

File System Storage Folder

If you wish to store files in the filesystem, you have to define a folder where the files shall be stored. Therefore a default folder is created: [t3_documentRoot]/uploads/tx_drblob/storage. You can also place the files in a folder outside the document root directory, just ensure you webserver-demon has write-access to this folder.

(Really) Delete Files

Define whether files are really deleted, and not just be marked as when a record is deleted. Thus files cannot be restored when a record is restored.

Storage Types

This extension allows you to store the file attached to a record in one of the following three locations. Every location has advantages and disadvantages:

Storage Type

Type

Where is the file stored

Security

Performance

Database

1

In a database column

high

Low

Filesystem (secure)

2

In the directory defined in the extension configuration

medium

Medium / high

Filesystem (unsecure)

3

In the TYPO3 upload folder

low

high



For more detailed information refer to the dr_blob developer manual (Fileref: EXT:dr_blob/doc/developer.sxw)

Admin Notifications

The dr_blob – Extension notifies you if something is not configured well, or if a potential security reason in correlation with dr_blob exists:

Configured upload folder does not exist

The following message occurs when the file storage method “filesystem” is available, and the extension cannot find the configured upload path / cannot write into that path.


You can solve it with configuring an existing- and writeable folder in your webspace

Configured upload path is available over the web

The following message occurs when the file storage method “filesystem” is available, and the configured folder may be available over the web. This is an security advice; an attacker could download a file, and decode it even if the file is access restricted.


Solve it by moving the storage folder to a location outside the webserver's document root directory.

The Update wizard

In the version of this documentation (version 2.3.0) the update wizard can assist you in the following cases:

Access the updater using the Extension manager


Select the option you'd like to update, and hite the “DO IT”-Button.

Access Restriction for Backend Users

The following fields of a single record are exclude fields and allow access restriction.

Field

Description

Hide

This field is one of the four fields to control the visibility of a record. The record won't be shown if it is marked hidden.

Start

This field is one of the four fields to control the visibility of a record. The record won't be shown if the value of start time is a point in the future.

Stop

This field is one of the four fields to control the visibility of a record. The record won't be shown if the value of end time is a point in the past.

Access

This field is one of the four fields to control the visibility of a record. The record won't be shown if current frontend user isn't a member of the group selected here. You can also configure this record to be only shown if a user is logged in (independent of the group membership) or if no user is logged in.

VIP-Record

This check box prepares the record to be shown on the TOP-List of your website. If the hook is not set the record won't be listed in a top list.

Download-Counter

NOTICE: Field can be deactivated using the PlugIn Configuration Options.

This is a read only-field. It shows the number of times a record has been downloaded yet. It can be reseted to zero using the according button.

Filesize

The file size field is set automatically when a file is attached to this record. It contains the number of bytes the attached file has.

This field cannot be edited.

Filetype

The file type field is set automatically when a file is attached to this record. It contains the the content type of the attached file.

This field cannot be edited.

File Checksum

The file checksum- field is set automatically when a file is attached to this record. It contains a md5-has of the attached file.

This field cannot be edited.

Language

This field sets the language of the record. A record can be configured to be shown for all languages. Records that are translated have to belong to a language version with the type “[All]” of [default]

Original Translation

This field only appears when an non-default record is edited. It allows editors to attach the current record to an default record.

File category

Associates the record with one or more categories.

Categories

The extension supports the use of categories. Therefore the sysfolder where records shall be created has to be configured from where to take the category records. This can be done in two different way, depending on the selection made in the Extension manager. You can either use the sysfolder's General Record Storage Path, or define a list of sysfolders from which the extension fetches the categories. See the Chapter Administration --> Installation for information on how to select the one of both solutions.

Using StoragePID

Edit the page details of the sysfolder where file records shall be created. Define the folder you want to be used as the storage of the categories in the field General Record Storage page.


Using the General Record Storage page






Using IDList

Edit the page details of the sysfolder where file records shall be created. Define a list of the PageIDs of the Sysfolders you want to be used as the storage of the categories in the field PageTS. Use the following line of TypoScript therefore:

TCEFORM.tx_drblob_content.category.PAGE_TSCONFIG_IDLIST = [Folder1],[Folder2],[...]

Use the PageID instead of [Folder1]. It is also valid to define only one Sysfolder here.


Using IDList




Integration with indexed_search

Since Version 2.0.0 it is possible to index files managed by dr_blob-Extension with the TYPO3 indexed_search-Engine. To do so ensure the following:

The files are indexed using the common features of the indexed_search-engine. To index a Microsoft Word document for example, you'll need the catdoc-Parser. Have a look at the indexed_search-Documentation for details.

If everything is configured well, you'll get the following results:

...via WEB->INFO




...via the Indexing-Module







PageTSconfig

Save & Preview

If you decided to store files in a sysfolder (thats the best practise), you'll might miss the “Save & Preview”-Function.

Thus sysfolders cannot be displayed in the frontend, you'll have to enter a pageID on which to preview the created record.

Do that by entering the following into the PageTS-Config field of the sysfolder containing the records:

tx_drblob.previewPid = [Target PageID]

You can choose whether to preview the records in LIST- or in SINGLE-Mode. Therefore enter the following line:

tx_drblob.previewMode = list

or

tx_drblob.previewMode = single

linkhander-Integration

The following lines are used (by default) to integrate dr_blob with the linkhandler-extension (if installed)

RTE.default.tx_linkhandler.dr_blob.label = Secure File
RTE.default.tx_linkhandler.dr_blob.listTables = tx_drblob_content 
mod.tx_linkhandler.dr_blob.label = Secure File
mod.tx_linkhandler.dr_blob.listTables = tx_drblob_content

css_styled_content-Integration

The following lines enables the description field's richtext-editor to be modified using PageTS. It is executed by default, but my be disabled.

RTE.config.tx_drblob_content.description.proc.overruleMode = ts_css

Using IDList for category selection

Edit the page details of the sysfolder where file records shall be created. Define a list of the PageIDs of the Sysfolders you want to be used as the storage of the categories in the field PageTS. Use the following line of TypoScript therefore:

TCEFORM.tx_drblob_content.category.PAGE_TSCONFIG_IDLIST = [Folder1],[Folder2],[...]

Use the PageID instead of [Folder1]. It is also valid to define only one Sysfolder here.

UserTSconfig

Setting default values

This will set the language field for newly created records to “[ALL]”:

TCAdefaults.tx_drblob_content.sys_language_uid = -1

Configuration

Configuration Value Priority

The are three possible ways for the plugin to use a configuration parameter: Setting a parameter using the plugin configuration (FlexForm), setting a parameter using the TypoScript Setup, or leaving both blank to use the default value.

To be as dynamic as possible I defined a flat hierarchy (from the high priority 1 to the low priority 3):

Priority

Parameter Setting (Example: templateFile)

1

Template set in the plugin configuration

2

Template File set in the TypoScript Setup

3

Standard (Reference-)Template

If both ( Plugin Configuration and TypoScript Setup ) are left blank, the Extension uses its default (hardcoded-) value.

HTML Example Template

There is also a file called dr_blob.tmpl, which contains the default templates for all possible modes. I suggest you to build your templates by modifying this file. It is located in the sub folder res under the root directory of the extension, typically typo3conf/ext/dr_blob/res

The SEARCH mode has its own template marker, called ###TEMPLATE_SEARCH###. The results a search returns are displayed in the list mode ( ###TEMPLATE_LIST### ), and so the template for list mode is also used. If a search returns no results the marker ###TEMPLATE_SEARCH_NOITEMS### is used.

Template-Marker Reference

Template Subparts

This table shows you the default template subpart marker the extension uses.

Subpart Marker

Description

###TEMPLATE_LIST###

Template for the LIST mode. This mode is also used to display search results.

###TEMPLATE_LIST_NOITEMS###

Template for the LIST mode if a normal list does not contain any entries.

###TEMPLATE_TOP###

Template for the TOP-Mode

###TEMPLATE_TOP_NOITEMS###

Template for the TOP-Mode. Used if the list does not contain entries.

###TEMPLATE_PERSONAL###

Template for the PERSONAL-Mode

###TEMPLATE_PERSONAL_NOITEMS###

Template for the PERSONAL-Mode. Used if the list does not contain entries.

###TEMPLATE_PERSONAL_ADD_FOLDER###

Template for the button that allows users to add a folder to their favorites

###TEMPLATE_PERSONAL_REMOVE_FOLDER###

Template for the button that allows users to remove a folder from their favorites

###TEMPLATE_SEARCH###

Template containing the search bar.

###TEMPLATE_SEARCH_NOITEMS###

Template to display the message that seach has no results

###TEMPLATE_SINGLE###

Template for the Detail-View of a single item.



You can overwrite these subpart marker by using the according configuration parameter in TypoScript (plugin.tx_drblob_pi.listView.altSubpartMarker). To demonstrate this, the example template comes with a demo-part that willl generate a list the five files that where downloaded most.

Subpart Marker

Description

###TEMPLATE_MOSTDOWNLOADED###

Example for an overwritten subpart marker

###TEMPLATE_MOSTDOWNLOADED_NOITEMS###

Example for the MOSTDOWNLOADED-Subpart if the list does not contain items.

Template Marker

This chapter shows which markers are available for the four different template types (LIST, TOP, SINGLE, PERSONAL).

Marker

Description

LIST

PERSONAL

TOP

SINGLE

###BLOB_TITLE###
###LANG_TITLE###

The marker contains the title of a record.

X

X

X

X

###BLOB_DESCRIPTION###
###LANG_DESCRIPTION###

The marker contains the description of a record.

X

X

X

X

###BLOB_AUTHOR###
###LANG_AUTHOR###

The marker contains the author (cruser) of a record

X

X

X

X

###BLOB_AUTHOR_EMAIL###
###LANG_AUTHOR_EMAIL###

The marker contains the email address of the author (cruser) of a record

X

X

X

X

###BLOB_CATEGORIES###
###LANG_CATEGORIES###

The marker contains the categories assigned to a record

X

X

X

X

###BLOB_IMAGES###
###LANG_IMAGES###

The marker contains the image assigned to the record

X

X

X

X

###BLOB_CRDATE###
###LANG_CRDATE###

The marker contains the create date of the record

X

X

X

X

###BLOB_LASTCHANGE###
###LANG_LASTCHANGE###

The marker contains a the date the record has been saved last.

X

X

X

X

###BLOB_AGE###
###LANG_AGE###

The marker contains the age of a record

X

X

X

X

###BLOB_VERSION###
###LANG_VERSION###

The marker contains the version-flag of a record

X

X

X

X

###BLOB_DOWNLOADCOUNT###
###LANG_DOWNLOADCOUNT###

The marker contains the number of times the according attached file was downloaded yet

X

X

X

X

###BLOB_FILENAME###
###LANG_FILENAME###

The marker contains the filename of an attached file.

X

X

X

X

###BLOB_FILESIZE###
###LANG_FILESIZE###

The marker contains the filesize in Bytes of an attached file.

X

X

X

X

###BLOB_FILETYPE###
###LANG_FILETYPE###

The marker contains the content-type of the file

X

X

X

X

###BLOB_CHECKSUM###
###LANG_CHECKSUM###

The marker contains the checksum of the file

X

X

X

X

###BLOB_FILEICON###
###LANG_FILEICON###

The marker contains an <img>-tag displaying the fileicon according to the filename of the attached file.

The Extension uses (per default) the normal TYPO3 fileicons.

X

X

X

X

###BLOB_UID###
###LANG_UID###

The marker contains the id of the file

X

X

X

X

###LANG_NOITEMS###

No-Items-Found-Message

X

X

X

X

###LANG_MORE###

The marker allows to insert a button to the single-view of a record (instead of having to wrap the title), like [more]. The value can be set via TS.)

X

X

X


###LANG_BACK###

The marker allows to insert a button back from the single-view of a record




X

###LANG_DOWNLOAD###

The marker allows to insert a button to download a record (instead of having to wrap the title), like [download]. The value can be set via TS.

The advantage of using this marker is that it is translated according to the page language.

X

X

X

X

###BLOB_ISFILEATTACHED###

This marker indicates whether a file is attached- or not. It is mainly used to render a string adding a CSS class to a container, like class=”noFileAttached”

X

X

X

X

###LANG_LISTHEADER###
###LANG_PERSONALHEADER###
###LANG_TOPHEADER###

The marker is substituted with a headline for the according mode, like ###LANG_PERSONALHEADER### → “My Favorites”

X

X

X

X

###BLOB_VFOLDERTREE###
###LANG_VFOLDERTREE###

This marker contains the rendered vFolderTree

X




###BLOB_SORTLINK_TITLE###

The marker contains the List Header of the column Title wrapped in a sort Link

X

X

X


###BLOB_SORTLINK_CRDATE###

The marker contains the List Header of the column Create Date wrapped in a sort Link

X

X

X


###BLOB_SORTLINK_LASTCHANGE###

The marker contains the List Header of the column LastChange wrapped in a sort Link

X

X

X


###BLOB_SORTLINK_AUTHOR###

The marker contains the List Header of the column Author wrapped in a sort Link

X

X

X


###BLOB_SORTLINK_AUTHOR_EMAIL###

The marker contains the List Header of the column Author's eMail address wrapped in a sort Link

X

X

X


###BLOB_SORTLINK_FILESIZE###

The marker contains the List Header of the column Filesize wrapped in a sort Link

X

X

X


###BLOB_SORTLINK_FILETYPE###

The marker contains the List Header of the column Filetype wrapped in a sort Link

X

X

X


Wrapped subpart marker

Marker

Description

LIST

PERSONAL

TOP

SINGLE

###BLOB_LINK_ITEM###

Link wrapped in <a>-Tags to the single view of a record

X

X

X


###BLOB_LINK_FILE###

Link wrapped in <a>-Tags to download a record

X

X

X

X

###BLOB_LINK_BACK###

Link wrapped in <a>-Tags back from the SingleView




X

Special Marker for the SEARCH-Mode

Marker:

Description:

###FORM_URL###

This marker contains the URL the form is sent to.

###SWORDS###

This marker contains the word the user searched for.

###LANG_SEARCH###

This marker contains the Local Language String for the button's title.

Special Marker for the PERSONAL_ADD / PERSONAL_REMOVE - Modes

Marker:

Description:

###FORM_METHOD###

This marker contains the method the form uses send its data.

###FORM_TARGET###

This marker contains the URL the form is sent to.

###ACTION###

Marker containing the values of the field action (IMPORTANT)

###ITEMS###

Marker containing the values of the field items (IMPORTANT)

###LANG_PERSADD###

Localized label for the “Subscribe”-Button

###LANG_PERSREMOVE###

Localized label for the “Unsubscribe”-Button

Including the Static Template

Please include the static template delivered with dr_blob. Including this template has the advantage that you do not have to reconfigure your TypoScript Code when updating dr_blob in order to enable new features.

Edit your TypoScript Template Object using the “Edit the whole record”-button. Navigate to the “Includes”-Tab, and add dr_blob's static template.




TypoScript Reference

Different Options for different modes

We have to differ between options in extension-global scope, and options for a special Mode (or View).

TypoScript Array

Scope

plugin.tx_drblob_pi1 {}

Extension-Global settings

plugin.tx_drblob_pi1.listView {}

Settings for the LIST-Mode

plugin.tx_drblob_pi1.personalView {}

Settings for the PERSONAL-Mode

plugin.tx_drblob_pi1.singleView {}

Settings for the SINGLE-Mode

plugin.tx_drblob_pi1.topView {}

Settings for the TOP-Mode

Extension Global Settings

The example TypoScript Template has to be inlcuded as static. Use the “Include static (from extensions)” feature in your template record.

Property:

Data type:

Description:

Default:

userFunc


Method to use to initiate the plugin

tx_drblob_pi1->main

templateFile

String

This is the option to set if you like to define one template for multiple dr_blob plugins in your page tree . See Configuration --> Templates for additional information.


Example:

plugin.tx_drblob_pi1 {
  templateFile = fileadmin/template.tmpl
}

Reference Template

fileExtIconFolder

String

Use this Option to define a custom folder containing the file extension icons. The files have to be named as follows: [EXTENSION].gif

If no icon if found for the current file extension the image default.gif is used.


Example:

plugin.tx_drblob_pi1 {
  fileExtIconFolder = fileadmin/icons/
}

typo3/sysext/cms/tslib/media//fileicons/

searchFieldList

String

Comma-seperated string of the fields the search function searches. Possible fields are title, description and blob_name

Example:

plugin.tx_drblob_pi1 {
  searchFieldList = title,description
  emptySearchAtStart = 0
}

All possible fields

emptySearchAtStart

Boolean

If set the SEARCH will show the search box at start. Otherwise a full list of items is shown.

1

tryToOpenFileInline

Boolean

If set, files that the users browser knows how to deal with (typically .pdf-, Office- or Image-Files) won't be downloaded but will be opened in a browser window

1

code

String

Defines the mode to render. Must be one of these options:

  • top

  • list

  • single

  • search

  • personal

  • dummy


renderAsXML

Boolean

Determines whether to active special elements used for rendering as XML (f.e. For RSS feeds). Normally you won't need it

0

pidList

Int/String

Comma-Seperated list of the Storage PIDs


recursive

Int

Recursive Level

0

singlePID

Int

PageID where to render the SINGLE-View


backPID

Int

PageID where to return to from the SINGLE-View


downloadFilenameUserFunc

userFunc

Enter a userFunc that will be executed just before the file is downloaded. This allows you to modify the filename of downloaded files.


stdWrap

->stdWrap

Standard Wrap for the whole content generated by dr_blob


_CSS_DEFAULT_STYLE

String

Default CSS-styles for dr_blob (pi1).

Example:

plugin.tx_drblob_pi1 {
  _CSS_DEFAULT_STYLE (
    .tx_drblob_list-row1 { color: #FFFFFF }
    .tx_drblob_list-row2 { color: #AAAAAA }
    .tx_drblob_list-head { text-align: left; }
  )
}


_LOCAL_LANG

String

This parameter allows you to overwrite the values from the language file. See ext/dr_blob/pi1/locallang.xml for a list of all translated words. Example:

plugin.tx_drblob_pi1._LOCAL_LANG {
  default.list_button_show = [ details ]
  de.list_button_show = [ Details ]
}


TS Options for all Modes

Property:

Data type:

Description:

Default:

altSubpartMarker

String

Value to override a default template subpart with, f.e. When you want to use a custom template subpart for a list of the most downloaded files

Please note: if no records are found, the Extension uses [CUSTOMARKER]_NOITEMS


Example:

plugin.tx_drblob_pi1.listView {
  altSubpartMarker = TEMPLATE_MOSTDOWNLOADED
}


age_stdWrap

->stdWrap

stdWrap for the Age


author_stdWrap

->stdWrap

stdWrap for the Author


Example:

plugin.tx_drblob_pi1.singleView.author_stdWrap {
  typolink.parameter.field = author_email.
  typolink.ATagParams = class=”emaillink
}


category_stdWrap

->stdWrap

stdWrap for the list of categories.


Example:

plugin.tx_drblob_pi1.singleView {
  categoryDivider = ,
  category_stdWrap {
    wrap = <ul>|</ul>
    split {
      token = ,
      cObjNum = 1
      1.current = 1
      1.wrap = <li>|</li>
    }
  }
}


categoryDivider

String

This value appears between the category titles shown in the records.

, (Comma)

date_stdWrap

->stdWrap

Here you can set the date formating for the template marker

###BLOB_CRDATE### and ###BLOB_LASTCHANGE### using a stdWrap.


Example:

plugin.tx_drblob_pi1.listView {
  #May use 'date'...
  date_stdWrap.date = d.m.Y
  #...or 'strftime'...
  date_stdWrap.strftime = %d.%m.%Y
}

m/d/Y

stdWrap of Type 'date'

description_stdWrap

->stdWrap

stdWrap for the Description-Field


Example:

plugin.tx_drblob_pi1.listView {
  description_stdWrap {
    stripHtml = 1
    crop = 250
  }
}


downloadcount_stdWrap

->stdWrap

Wraps the number of times a file has been downloaded yet


downloadLink_stdWrap

->stdWrap

stdWrap for download-Links


Example:

plugin.tx_drblob_pi1.listView {
  downloadLink_stdWrap {
    typolink.target = _blank
  }
}


email_stdWrap

->stdWrap

Formats the email address of the author of a record using a stdWrap.

The value parameter will be overwritten.


Example:

plugin.tx_drblob_pi1.singleView {
  email_stdWrap {
    typolink.ATagParams = class=”emaillink
  }
}


filechecksum_stdWrap

->stdWrap

Wraps the filechecksum


fileicon_stdWrap

->stdWrap

Wraps the file icon


Example:

plugin.tx_drblob_pi1.listView.fileicon_stdWrap {
  wrap = |
  cObject = IMAGE
  cObject.file.import = 
     {$plugin.tx_drblob.fileExtIconFolder}
  cObject.file.import.field = blob_filext
  cObject.file.import.wrap = |.gif
  cObject.altText.field = blob_filext
  cObject.titleText.field = blob_filext

  cObject.stdWrap.ifEmpty.cObject = IMAGE
  cObject.stdWrap.ifEmpty.cObject.file.import = 
     {$plugin.tx_drblob.fileExtIconFolder}
  cObject.stdWrap.ifEmpty.cObject.file.import.wrap = 
     default.gif
}


filename_stdWrap

->stdWrap

Wraps the filename


filesize_stdWrap

->stdWrap

Formats the filesize of a record using a stdWrap.


Example:

plugin.tx_drblob_pi1.singleView {
  filesize_stdWrap.bytes = 1
  filesize_stdWrap.bytes.labels = B| KB |MB |GB
}

1

B| KB |MB |GB

filetype_stdWrap

->stdWrap

Wraps the file type


images_stdWrap

->stdWrap

Wraps the image(s) assigned to a record. Should be rendered by an IMAGE- or an IMGTEXT-Object


isFileAttached_stdWrap

->stdWrap

This stdWrap is used to render whether a file attached- or not. Per default it generates a string like “class=”noFileAttached” “.

If no file is attached, the value 0 is wrapped, if a file is attached the value 1 is wrapped


title_stdWrap

->stdWrap

stdWrap for the title


version_stdWrap

->stdWrap

stdWrap for the version


Special Options for the ListView, the Personal-View, and the Top-View

The Options listed below are modified using the TS Object according the the mode:

Property:

Data type:

Description:

Default:

alternatingLayouts

Integer

Indicates how many alternating designs the script should expect in the html template (compare with tt_news where I got the idea of providing multiple layouts)


Example:

If you define a subpart like:
"<!--###BLOBITEM###--> ... <!--###BLOBITEM###-->"
this is used all the time.

If you define a similar subpart:

"<!--###BLOBITEM_1###--> ... <!--###BLOBITEM_1###-->"

which might show another set of colors, this is used every second time instead of the default! This is because "alternateLayouts" is set to 2.

If you define a similar subpart

"<!--###BLOBITEM_2###--> ... <!--###BLOBITEM_2###-->" ...

this will be used every third time IF (!) "alternateLayouts" is set to 3. If you do not set it to 3, the first two alternating designs will be used only.

2

limit

Integer

Number of records to show


listOrderBy

String

Enter the field name to sort after

title

listOrderDir

Bool

Enter the sorting direction (0 for ascending, 1 for descending

0

categoryMode

Int

0 = Don't care about the category selection

1 = Combine categories with a logical OR

2 = Combine categories with a logical AND

0

categorySelection

Int / String

Categories to use


moreLink_stdWrap

->stdWrap

stdWrap for more-Links


Example:

plugin.tx_drblob_pi1.listView {
  moreLink_stdWrap {
    typolink.ATagParama = class=”MyLinkClass”
  }
}


Special Options for the ListView

Property:

Data type:

Description:

Default:

vFolderTitleNO_stdWrap

->stdWrap

Wraps the folder title of currently not selected folders

|

vFolderTitleACT_stdWrap

->stdWrap

Wraps the folder title of the currently selected folder

<b>|</b>

vfolder_stdWrap

->stdWrap

Wraps the whole vFolderTree

|

vFolderIcon

IMAGE

Folder-Icon of a single vFolder


			

vFolderGfxFolder

String

Folder (in the file system) containing the Images used for rendering the vFolderTree


			

vFolderTreeEnable

0

Define whether to show the vFolderTree by default in LIST-Mode – or not

0

vFolderTreeInitialState

String

Define the initial state of the vFolderTree (use none for no records, first for the first folder, or all for the contents of all folders)

none

vFolderTree_FolderSubscriptionMode

String

Expects either “all”, or “selected”

Use all for your users to subscribe all folders in the scope of the vFolderTree, or selected for your users to subscribe only the selected folder.

selected

showAdd2Fav

Bool

Define whether do display the “Add 2 Favorites”-Button per default

0

Special Options for the SingleView

Property:

Data type:

Description:

Default:

substitutePagetitle

Bool

Use File-Title as Pagetitle?

1

substituteIndextitle

Bool

Use File-Title in indexed_search-Engine Index?

1

backLink_stdWrap

->stdWrap

Wraps the backlink back to the list view


Integration with the extension “linkhandler”

Have a look at the linkhandler extension manual (http://typo3.org/documentation/document-library/extension-manuals/linkhandler/current)

[Tsobj: plugin.tx_linkhandler.tx_drblob_content]

Property:

Data type:

Description:

Default:

forceLink

Bool

Force the creation of an typolink to a page also when the linked record are not available for the current fe_user.

0

parameter

Int

Target PageID with a plugin of type dr_blob


no_cache

Bool

Should be set to 1

1

additionalParams

String

URL to attach to the link

&tx_drblob_pi1[downloadUid]={field:uid}

additionalParams.insertData

Bool

Set this to 1

1

useCacheHash

Bool

Does not matter, can be set to o

0

Example

Have a look at the static template that comes with the extension.

plugin {
  tx_drblob_pi1 {
    templateFile = fileadmin/SITE/assets/tmpl/template.tmpl
    searchFieldList = title,description
    emptySearchAtStart = 1
    listView {
      limit = 25
      date_stdWrap.date = d.m.Y
      category_stdWrap = |
      categoryDivider = ,
      alternatingLayouts = 2
      fileicon_stdWrap {
        wrap = |
        cObject = IMAGE
        cObject.file.import = fileadmin/SITE/assets/fileicons/
        cObject.file.import.field = blob_filext
        cObject.file.import.wrap = |.gif
        cObject.altText.field = blob_filext
        cObject.titleText.field = blob_filext
        
        cObject.stdWrap.ifEmpty.cObject = IMAGE
        cObject.stdWrap.ifEmpty.cObject.file.import = fileadmin/SITE/assets/fileicons/
        cObject.stdWrap.ifEmpty.cObject.file.import.wrap = default.gif
      }
      images_stdWrap {
        wrap = |
        cObject = IMGTEXT
        cObject {
          imgList.field = images
          imgPath = uploads/pics/ 
          imgStart = 0
          imgMax = 1      
          imgObjNum = 1
          1 = IMAGE
          1.file.import.current = 1
          1.file.maxW = 50
        }
      }
      vFolder_stdWrap.wrap = <div>|</div>
      vFolderTitleNO_stdWrap.wrap = |
      vFolderTitleACT_stdWrap < .vFolderTitleNO_stdWrap
      vFolderTitleACT_stdWrap {
        typolink.aTagParams = class=”myFolderTitleCSS”
      }
    }
    singleView {
      substitutePageTitle = 1
      substituteIndexTitle = 1
      date_stdWrap.strftime = %d.%m.%Y
      
      categoryDivider = ,
      category_stdWrap {
        wrap = <ul>|</ul>
        split {
          token < plugin.tx_drblob_pi1.singleView.categoryDivider 
          cObjNum = 1
          1.current = 1
          1.wrap = <li>|</li>
        }
      }
      
      email_stdWrap {
        typolink {
          ATagParams = class=”myEmailLinkCSS”
          ATagBeforeWrap = 1
        }
        wrap = <img src=”fileadmin/SITE/assets/email.gif” alt=”Send me an email” />|
      }

      images_stdWrap {
        wrap = |
        cObject = IMGTEXT
        cObject {
          imgList.field = images
          imgPath = uploads/pics/
          imgStart = 0
          cols = 3
          colspace = 0
          rowspace = 2
          imgObjNum = 1
          1 = IMAGE
          1.file.import.current = 1
          1.file.maxW = 250px
      }
    }

    isFileAttached_stdWrap {
      setContentToCurrent = 1
      cObject = COA
      cObject.10 = TEXT
      cObject.10.value = tx-drblob-noFileAttached
      cObject.10.if.isFalse.current = 1
      cObject.20 = TEXT
      cObject.20.value = tx-drblob-fileAttached
      cObject.20.if.isTrue.current = 1
      wrap = class="|"
    }
  }
}



plugin.tx_linkhandler.tx_drblob_content {
  forceLink = 0
  parameter = 4
  no_cache = 1
  additionalParams = &tx_drblob_pi1[downloadUid]={field:uid}
  additionalParams.insertData = 1 
  useCacheHash = 0
}

Registers

Registers act like a type of clipboard which is in this case used to traverse values from the dr_blob plugin to the TypoScript setup.

Using fields from the SingleView for Page Meta Information

The registers “blobAuthor”, “blobAuthorEmail” and “blobDescription” can be used to fill values from the file record to the <meta> tags of the page with the SINGLE view on it. In other modes the register is not filled (Just as it is in tt_news)

This example assumes, that you've installed the extension “Meta tags extended” (extKey: metatags). The output of the extension is added to the “page” object as “headerData.999” (extension default).

page.headerData.999 {
local >
  local {
    description.data = register:blobDescription
    author.data = register:blobAuthor
    email.data = register:blobAuthorEmail
  }
}

Tutorial

Customizing [more]-, [back]- & [download]-links

This chapter describes how to customize the links to a fiile, to the details-page, or back from the details page to the list mode.

Basic: Modifying Language Marker (Example 1)

Templates

The frontend-layout of the extension can (as you know) be customized using the html-templates rolled out with the extension.

Let's have a look at the markers used there:

LANG_MORE
LANG_BACK
LANG_DOWNLOAD
LINK_ITEM
LINK_BACK
LINK_FILE

The markers LINK_ contain <a>-Tags that link either to the single view or to a file. They have to wrap the text you want to use as the link title, for example <!--###LINK_FILE###-->[get File]<!--###LINK_FILE###--> will be parsed to <a href=”WHATEVER.com”>[get File]</a>

For multi-language-support you should use the marker LANG_MORE or LANG_DOWNLOAD. These values are parsed using the TYPO3 Frontend Localization Engine. The localized content can be manipulated using TS.

TypoScript

You can define the value used for the [more]- and the [download]-Button using the following TS-marker:

plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].list_button_download = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].list_button_show = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].personal_button_download = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].personal_button_show = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].top_button_download = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].top_button_show = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].single_button_download = VALUE
plugin.tx_drblob_pi1._LOCAL_LANG.[LANG].single_button_back = VALUE
Example
plugin {
  tx_drblob_pi1 {
    _LOCAL_LANG  {
      de {
         list_button_show = <img src="fileadmin/SITE/assets/control/show.gif" border="0" />
         personal_button_show = [show me more]
         top_button_show < plugin.tx_drblob_pi1._LOCAL_LANG.de.personal_button_show
      }
    }
  }
}

Advanced: Using TypoScript (Example 2)

This chapter shows up another way to render the more- and download link. The method used is a more advanced way and requires higher skills on TypoScript the stdWrap features.

Template

Add the subpart marker to the HTML reference template, but do not use them to wrap a word like ###LANG_MORE###.

<!--###LINK_MORE###--><!--###LINK_MORE###->
<!--###LINK_FILE###--><!--###LINK_FILE###->

The BackLink from the singleView looks (in this example) like this;

<!--###LINK_BACK###-->###LANG_BACK###<!--###LINK_BACK###->
TypoScript
plugin.tx_drblob_pi1{
  _LOCAL_LANG.de.single_button_back = zurück
  _LOCAL_LANG.default.single_button_back = back

  singleView.backLink_stdWrap.wrap = [ | ]

  listView.moreLink_stdWrap {
    wrap = |
    cObject = IMAGE
    cObject.file = fileadmin/SITE/assets/control/show.gif
    cObject.border = 0
  }
  
  topView.downloadLink_stdWrap {
    wrap = |
    cObject = IMAGE
    cObject {
      file = GIFBUILDER
      file {
        backColor = #abcdef
        XY = 100,15
        10 = TEXT
        10 {
          text = DOWNLOAD
          fontSize = 10
          fontFile = verdana
          fontColor = #ffffff
          offset = 10,10
        }
      }
    }
  }
}

Using an own sysfolder for each language

I suggest using the TYPO3 Inbound Localization Features, the method described here is just a workaround!

Some people ask how to configure the plugin to use an own sysfolder for each language. They don't want to use the inbound localization features, whyever. Their page tree could look like that...:


If you simply create new objects, the database-column sys_language_uid will be set to 0. This equals the default frontend language, so the created documents are only shown when the default frontend language is requested.

The easiest way to workaround this is to set the language-flag for each record to [ALL], so the record is shown no matter which language is reqested.






Set the page in the plugin configuration to the according sysfolder, and do that for each language you want to use:


UserTSconfig

A little assistance may be to preselect the language field so that you don't have to change it everytime you create a record. Therefore add the following line of TypoScript to an user's or a group's User TS-Config-Field:

Simply add for following line

TCAdefaults.tx_drblob_content.sys_language_uid = -1

This will set the language field to '[ALL'] per default.

Generate a list of the top 5 downloads

Either create a plugin and configure it, or use the following TypoScript Code

lib.mostDownloadedFiles = USER
lib.mostDownloadedFiles {
  userFunc = tx_drblob_pi1->main
  code = list
  limit = 5
  pidList = 50
  recursive = 0

  listView {
    altSubpartMarker = TEMPLATE_MOSTDOWNLOADED
    listOrderBy = download_count
    listOrderDir = 1
  }
}

Specific Sort Sequence

Filelists configured to generate a simple list can be sorted after a few criteria, like the title or the creation date.

Specific Sort Sequence allows you to sort a list in a non-logical way. Therefore you've to configure the content element to sort by Custom Backend Sorting in the field "Order by" this field (LIST-Mode).




Use the arrows to define a custom hierarchy.




Customizing downloads-filenames

Custominzing the filenames of the downloads is very easy to handle in this version: For a method that adds the current date to the filename just add two lines of TypoScript Code, and write your according php function:

TypoScript

includeLibs.myCustomFilesnames = fileadmin/user_customFilenames.php
plugin.tx_drblob_pi1.downloadFilenameUserFunc = user_customFilenames

PHP-Code

<?php
function user_customFilenames( $filename, $param ) {
	return date( 'Y-m-d', time() ) . '_' . $filename;
}
?>

Result:




...easy, isn't it?

RealURL integration

This tutorial demonstrates how to integrade dr_blob with realurl. There fore a way for

is shown up.

Prettying links to the single view / for the vFolder Tree

The code shown below has to be add to the realurl configuration file. It allows you to change the link layout from

http://your.web.site/index.php?id=1&tx_drblob_pi1[showUid]=1&cHash=023eb845faa54f0253ef4a2e34e7b099

http://your.web.site/index.php?id=1&tx_drblob_pi1[pid]=99&cHash=845faa54f0253e4e7b099f4a2023ebe3

to

http://your.web.site/xyz/downloads/filetitle

http://your.web.site/xyz/downloads/foldername

RealURL-Configuration
'postVarSets' => array(
	'_DEFAULT' => array(
		'downloads' => array(
			array(
				'GETvar' => 'tx_drblob_pi1[showUid]',
				'lookUpTable' => array(
					'table' => 'tx_drblob_content',
					'id_field' => 'uid',
					'alias_field' => 'title',
					'addWhereClause' => ' AND NOT deleted',
					'useUniqueCache' => 1,
					'useUniqueCache_conf' => array(
						'strtolower' => 1,
						'spaceCharacter' => '-',
					),
				),
			),
			array(
				'GETvar' => 'tx_drblob_pi1[pid]',
				'lookUpTable' => array(
					'table' => 'pages',
					'id_field' => 'uid',
					'alias_field' => 'title',
					'addWhereClause' => ' AND NOT deleted',
					'useUniqueCache' => 1,
					'useUniqueCache_conf' => array(
						'strtolower' => 1,
						'spaceCharacter' => '-',
					),
				),
			),
		),
	),
)

Prettying Download-Links

This is even more complex. The way shown up here is just a proof of concept. In a production enviroment it would have to be generate by a script. Let me know if you wrote a and are willing to share it.

The demo shown below will change to link

http://your.web.site/index.php?id=1&tx_drblob_pi1[downloadUid]=1

to

http://your.web.site/xyz/downloads/filename.pdf

RealURL-Configuration
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']=array (
	'_DEFAULT' => array (
		/*
		[...]
		 */
		'fileName' => array (
			'defaultToHTMLsuffixOnPrev' => 0,
			'acceptHTMLsuffix' => 1,
			'index' => array (
				'print' => array (
					'keyValues' => array (
						'type' => 98,
					),
				),
				'filename.pdf' => array(
					'keyValues' => array (
						'tx_drblob_pi1[downloadUid]' => 1,
					),
				)
			),
		),

RSS Feeds from dr_blob

In the current Version dr_blob is shipped with a static template for the generation of a RSS 2.0 feed. Therefore it uses the template file under EXT:dr_blob/res/rss_2.tmpl

The Static template creates a PAGE-Object and uses the output of dr_blob as a template. The typical RSS fields, like the feed title and its description are substituted using TypoScript




To use it just include the static template for RSS feeds and customize it according to your needs (Using TS constants and TS setup)

Development: Extending dr_blob

Please refer to the developer manual, fileref: EXT:dr_blob/doc/developer.sxw

Feature wishes & Bug reports

When you encounter a bug (hope you won't ;-), or if you are missing a feature, feel free to participate in the development process by using the dr_blob-forge on http://forge.typo3.org/projects/show/extension-dr_blob

Post issues, bugs and feature requests, and help me to make dr_blob to the extension you need.

ChangeLog

(The date-format is yyyy-mm-dd)

Version

Changelog

Date

1.0.x

First published Version

2005-10-20

1.1.x

Features:

  • Added the Search function


Bugfixes:

  • Some bugfixes

2005-10-27

1.2.x

Features:

  • Implemented the TYPO3 Localization Features

  • Added a cache control header for downloadable files

  • Added the TypoScript Variable to set a global template as well as the template file priority.

2005-11-29

1.3.x

Features:

  • Added the possibility to display fileicons according to the attached files

  • Added the calculation for the filesize

  • Did some changes in the record input mask

  • Prepared for the versioning used by workspaces

2005-12-12

1.4.0

Features:

  • Added the personalizable list as well as the according configuration buttons and the flexform value.

  • Added the template marker to display the number of times a record was downloaded yet


Bugfixes:

  • Fixed a bug that occurred after attaching a file and pressing the Save&New Button and caused the loss of the file.

  • Fixed a bug that occurred in IE6 when sending Cache Control Headers. The downloaded file was not readable

2006-03-21

1.5.0

Features:

  • Added the TypoScript-Marker that defines a folder for custom file extension-icons.

  • Changed the date_stdWrap-Option in TS. „date_stdWrap“ now is a real stdWrap.

  • Added the possibility to reset the download counter of an attached file.

  • Added specific sort sequence to the list mode.

  • Added the field-change-function to the custom TCA fields.


Changes:

  • Migrated the locallang-files to the <T3locallang> XML-data-structure.

  • Moved the definition of the custom input elements to an own class to avoid a naming conflict.

  • Replaced the XCLASS through a hook on TCEmain


Bugfixes:

  • Fixed the bug of the file-icons being displayed from the wrong folder (the one from T3 3.x)

  • Enabled overwritting LocalLang-Labels via the TS Object [...]._LOCAL_LANG.

  • Now hiding the default-language-version of localized records.

2007-04-10

1.5.1

Features:

  • Added the template-markers BLOB_MORE, BLOB_DOWNLOAD, LINK_ITEM & LINK_FILE

  • Added the foldericon


Changes:

  • Changed fieldnames in FE locallang to enable them to be set via TS

  • The template-markers BLOB_TITLE_LINK, BLOB_MORE_LINK & BLOB_DOWNLOAD_LINK are deprecated

  • The fields "sys_langugage_uid" and "l18n_parent" are now changeable using TCA


Bugfixes:

  • Re-wrote parts of the localization features. They finally should work now ;-)

2007-05-04

1.6.0

Features:

  • Added the categorization feature

  • Added the TS config parameter to set the fields used by the search function

  • Added Template Marker for Localization of field fames. They use the namespace ###LANG_[field]###

  • The eMail-address-marker now uses a cObject to allow spam protection of the email addresses.


Changes:

  • Removed CSS Classes that didn't use the namespace tx_drblob_ from the reference template

  • The example extension template has to be included static now.


Bugfixes:

  • Removed a bug preventing the PERSONAL-mode from wrapping the date correctly.

2007-06-14

1.6.1

Features:

  • The eMail Link is now configurable using a stdWrap

  • The filesize is now configurable using a stdWrap

  • Added a SORTLINK-Marker for the filesize (blob_size) and filetype (blob_type)


Changes:

  • Removed the TS-Values fileExtIconHeight and fileExtIconWidth. They are now detected automaticlly

  • Changed the is_vip – field from type “enum” to type “tinyint” to increase dbal-compatibility

  • Changed the field blob_size from varchar to int to allow sorting

2007-09-25

1.7.0

Features:

  • It's now possible to store files either in the database, or in the filesystem

  • The fields "Author", "Filename", "Filesize", "Filetype" and "Title" are now configurable using a stdWrap

  • Added the possibility to substitute Page- and Indextitle in SingleView

  • Added CSH for backend forms

  • Outsourced all non-english language labels for the translation tool

  • Added the possibility to open a file inline (inside a browser window / browser tab)

  • Added a checksum for all newly uploaded files

  • Added a template marker showing the Age of a record


Changes:

  • The layout of the TCA-Form for a filerecord has been changed.

  • Removed vars that where marked as deprecated (BLOB_TITLE_LINK, BLOB_MORE_LINK & BLOB_DOWNLOAD_LINK)


Bugfixes:

  • Fixed a bug that occured with Firefox when downloading a file with a filename that contains blank spaces.

2008-06-22

2.0.0

Features:

  • Added the vFolder Tree

  • Attached files can be indexed by the indexed_search

  • Save & Preview works now


Changes:

  • Now using the new documentation template

  • The Version-Field is now shown in the Backend form


Bugfixes:

  • Fixed a bug preventing the SINGLE-Mode from rendering the file checksum

2009-01-25

2.1.0

Features:

  • List is now also sortable by the download counter

  • You can override the default template subparts (f.e. TEMPLATE_LIST) with a custom value

  • Added warning-messages for admins shown if something is not configured well.

  • Added plugin-descriptions in the page module

  • You can now choose to delete files really (Not just to mark them as deleted)

  • The folder containing the vFolderTree-Graphics can now be changed using TS

  • Integrated dr_blob with linkhandler

  • The FlexForm-Values “code”, “pidList”, “recursive”, “listOrderBy”, “listOrderDirection”,”singlePID”, “backPID”, “limit” & “showAdd2Fav” are now also configurable using TS


Bugfixes:

  • Fixed a bug in the indexer-xclass preventing files from being indexed when using realurl

  • Files stored in the filesystem are now versionized correctly

  • Integrated the vFolderTree-Graphics into the extension

  • Fixed a bug that caused a loss of blank spaces in the download counter wrapper

2009-07-16

2.1.1

Bugfixes:

  • Fixed the illegal merge of development- and live-version causing a wrong BE record interface

2009-08-03

2.1.2

Bugfixes:

  • Fixed a potential security issue

2009-12-02

2.2.0

Feature:

  • Sorting is possible in all modes now (Feature #4127)

  • Added an update mechanism (Currently used for updating records without a checksum-value) (Feature #5712)

  • Register "blobDescription" added (Feature #5741)

  • Implemented the possibility to set the vFolderTree initial mode (Feature #5084)

  • Added the TypoScript configuration spots for the cateorization features

  • Added category AND-combinaion (Feature #5039)

  • Added the API-Spot downloadFilenameUserFunc (Feature #5685)

  • Added 4 hooks (Feature #5445)

  • vFolder Subscription Mode for the PERSONAL settings (Feature #5692)


Change:

  • stdWraps are now wrapped using their own cObject (Feature #5681)

  • The fileicon is now wrapped by its own TypoScript directive (Feature #5695)

  • Removed the default TypoScript (ext_typoscript_setup.txt) (Feature #5713)

  • Download-Objects are now allowed on standard pages (Feature #4452)

  • Render the BackLink from SingleMode using a stdWrap (Feature #5779)

  • Optimized big parts of the code.


Bugfix:

  • piVars are lost when sorting in vFolderTree- or in Search-Mode (Issue #5714)

  • File-Upload fails in workspaces on new records (Issue #4213)

  • Fixed the template marker for ###LANG_CHECKSUM### in the default template (Issue #4996)

2009-12-30

2.2.1

Bugfix:

  • Support for internet explorer 8 (Issue #5878)

  • Starttime- and endtime limitations (Issue #6690)

  • Usage of $this->cObj (Issue #6703)

2010-03-14

2.3.0

Feature:

  • Added the Storage Type "Unsecure" (Feature #3929)

  • Added a static template to generate a RSS 2.0 feed (Feature #7694)

  • Added the fields "author" and "author_email" (Feature #6866)

  • Preview of downloadable files (Feature #6839)

  • Add addToInsertRecords (Feature #4453)

  • Added the PageBrower (Feature #3931)

  • Enabled Versioning V.2 (Feature #7060)


Minor Feature:

  • Added two registers (one for the author, one for the author's email) (Feature #6866)

  • stdWrap for the whole plugin (Feature #6686)

  • Added a hook for postprocessing the mime type (Feature #7156)


Change:

  • Category Selection (Feature #7621)

  • Add Configuration option for altSubpartMarker in the Plugin Configuration (Feature #6247)

  • Changed the records backend mask for the usage with Tabs

  • workover the update wizard

  • Allowed multiple frontend groups (Feature #6964)

  • Created a new reference template (Feature #5781)

  • Setting backpid from flexform (Feature #5780)

  • Removed the ico-folder because it makes the extension to heavyweight.


Bugfix:

  • Duplicate entries when combining categories with OR (Issue #7040)

2010-05-25

2.3.1

Bugfix:

  • Update-wizard enters the wrong author (Issue #7952)

  • Trying to access a deleted file is not handled correctly (Issue #7953)

2010-05-27

2.3.2

Bugfix:

  • Usage of $ICON_TYPES is deprecated since 4.4 (Issue #9561)

  • Invalid method declaration in tx_drblob_div (Issue #8482)

  • page browser (Issue #8181)

2010-09-07

Credits

Thanks to...