Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.4. Configuration

The extension support a number of typoscript configuration possibilities as listed in the following table. All configuration is done under the prefix “config.tx_securelinks.”

Property:

Data type:

Description:

Default:

enable

boolean

Activate the extension

0

subdir

string

Indicate what subdirectory (relative to fileadmin/) will be seviced by the extension. By default, links to all files under fileadmin/ will be converted to a call to the pushFile.php script (this is not usually a good idea). Don't forget to deny direct web access to the content of this directory! (If not, this extension is pretty much useless!)

“”

showLicense

int

Specify if a license agreement will be presented to the user before the download. Valid values: 0, 1 or 2

0 :  No license file is shown. Download start immediately.

1:  Show the license file if one is found in the same directory as the linked file. If the license file is not found, no license is presented and the download starts immediately.

2:  Force the display of a license file. If the license file is not found in the same directory as the linked file, an error will be displayed and the download will NOT proceed. This is useful to protect against accidental deletion of the license file.

0

licenseFile

string

The name of the file containing the license to display (in plain text). Filename only, no directory.

license.txt

logFile

string

Path to the file where downloads will be logged (path and filename relative to fileadmin/). If no filename is specified, no logging is done.

Specifying a filename automatically activate the logging. Be sure the file is writable by PHP. The file should not be readable from the web.

“”

[tsref:(cObject).TEST]

License wrapper file

A license wrapper file is used to present the license text to the user. The file must be named “license-wrapper.html”. The file should be a valid html file with a form to let the user accept or not the license. The extension first lookup for the file in the same directory as the file to be downloaded. If not found, it will use the default file in the “res/”  subdirectory of the extension.

The html page should contain the following placeholders:

    1. ###FILENAME### : will be replaced by the file name that the user want to download (no path included)

    2. ###LICENSE### : will be replaced by the full text of the license to display to the user

    3. ###ACTION### : to be used as the action in the form presented to the user to accept the license.

Look at the default file res/license-wrapper.html for an example.

Download wrapper file

If a license was shown to the user and he accepted it, the file res/start-download.html will be displayed. This template file should contain these placeholders:

  1. ###DOWNLOAD_LINK### : will be replaced by the full link that will start the download of the file

  2. ###FILENAME### : will be replaced by the name of the file that will be downloaded.

Look at the default file res/start-download.html for an example.