When the securelinks extension is first installed, it does nothing by default. The extension needs to be configured and enabled in the typoscript template.
Here is a minimal configuration:
Include the static template securelinks in the main template.
In the typoscript template, add these lines:config.tx_securelinks.enable = 1config.tx_securelinks.subdir = _private/
The first line enables the extension. The second line indicates which subdirectory will be used (relative to fileadmin/). Links to files in this directory (and subdirectories) will be substituted for a call to the pushFile.php script. Be sure to block direct access to the content of this directory in the web server.
Let's say the files in the directory fileadmin/_private/licensed/ are licensed and you want to display a license agreement to the user before he downloads a file, just put the license text (in plain text format) in the file fileadmin/_private/licensed/license.txt, and add the following line to the template:
config.tx_securelinks.showLicense = 1
With this line, the extension will look for a file named “license.txt” in the same directory as the linked file and if found, it will show its content, and a button that the user must click to accept the license. The download will start only after the user has agreed to the license.
If you want to log downloads done through the extension, add a line like this to the typoscript template:
config.tx_securelinks.logFile = _private/downloads.log
You may specify the filename and directory as you wish (relative to fileadmin/) as long as PHP has write access to the file. The filename may include formating tokens as used in the php strftime() function. These tokens will be substituted at runtime. For example, on May 25, 2009, the filename “_private/downloads-%Y%m%d.txt” will be substituted by “_private/downloads-20090525.txt”.
The log file will contain a line for each download, listing a timestamp, the frontend user name (or anonymous if not available), the filename, and the license agreed to if one was presented to the user. The full name, email address and company name will also be added if they are available.
Warning: The content of this log file should not be readable from the web!