This plugin has been rebuilt. Please visit this thread for version 2.
Written solely for the purpose of getting filenames from custom fields populated by the upload form in publish, this plugin can be used to display file type, path, domain, description and many other properties of the URL it finds.
Example usage:
{exp:extract_url_plus show="% filename.% extension (% filesize)"}
Some text, etc etc
<a href="http://www.example.com/directory/myphoto.jpg">My file</a>
Some more text?
{/exp:extract_url_plus}
REMOVE SPACE BETWEEN % AND VARIABLE NAME
This would return:
myphoto.jpg (4.87KB)
Available formatting variables to use within the “show” parameter are listed:
% fullurl - The full url (e.g., “http://www.example.com/directory/myphoto.jpg”)
% protocol - (e.g., “http” / “https” / “ftp” / “ftps”)
% subdomain - (e.g., “www”)
% domain - (e.g., “example”)
% tld - (e.g., “com”)
% ip - If the hostname is an IP address, it is available in this variable.
% path - (e.g., “directory/”)
% filename - (e.g., “myphoto”)
% extension - (e.g., “jpg”)
% fullfilename - (e.g., “myphoto.jpg”)
% hostname - If an IP address, this will be identical to the ip; variable, if not it might contain e.g., “www.ecample.com”
% description - A brief description of the file, based on extension type. This can be customised in the plugin file if needed
% filesize - Shows a readable filesize with unit denomination. To use this feature you may need to open the plugin file and edit the line that looks like: var $docpath = ‘/var/www/html/’;
If you are upgrading from an older version:
The plugin will still honour the show parameter with a single variable, without the % sign.
Version 1.3.1
