Overview #
Enables file upload functionality.
Field Type Parameters: #
Max File Size
(optional) – Obsolete. The maximum upload file size is determined by the PHP.ini file. No specification needed.Folder
(optional) – Directory where all uploaded files will be stored. Default is /images.File Types
(optional) – List of acceptable file types, separated by spaces.Save As File Name
(optional) – Specify the name for a newly uploaded file. You can use field tags [fieldname].Custom PHP
(optional) – PHP file/function to process file content before download. Must be located at /components/com_customtables/customphp.
Value Processing Parameters: #
Basic usage:
{{ FieldName }}
Usage with parameters:
{{ FieldName(Security, Link, Icon, Target Window) }}
Security
(optional) – Encrypts the file link and restricts access time.Link
(optional) – How the link should be displayed.Icon
(optional) – Select the icon size.Target Window
(optional) – Target browser window for opening the link.
Example:
{{ FieldName("timelimited","filename-link",32,"parent") }}
Pure Value (Unprocessed): #
Example:
{{ FieldName.value }}
Edit Record Parameters: #
Parameters for configuring the input element for file uploads.
Basic usage:
{{ FieldName.edit }}
Usage with parameters:
{{ FieldName.edit(CSS Class, Attributes) }}
CSS Class
(optional) – Name(s) of the CSS class(es).Attributes
(optional) – Optional attributes such as: disabled, onclick, onchange, etc.
Custom PHP file that can be executed before file download, to prepare or change file content #
Custom PHP – PHP file/function that will process file content before being downloaded by the user. This only works with private file link, see security parameter above.
File must be located at “/components/com_customtables/customphp”.
Function name must be like this CTProcessFile_filename($original_file_content,&$row)
Example: {{ FieldName(“paidfile”) }}
Lets call the file “privatefile.php”
<?php
defined('_JEXEC') or die('Restricted access');
function CTProcessFile_privatefile($original_file_content,&$row){
return str_replace('*activation_key*','23098ueu028',$original_file_content);
}
Leave a Reply
You must be logged in to post a comment.