Readme for the plugins for TFU/JFU/WFU

More plugins can be found on the website:
http://www.tinywebgallery.com/en/tfu/web_plugin.php

Have fun using JFU/TFU/WFU,

Michael

E-mail plugin documentation

The e-mail plugin replaces and enhances the internal e-mail notification for an
upload. The default e-mail plugin sends an e-mail to the given address with a 
subject and a body where you can set 2 variables only. 

With this plugin this now changes dramatically. You have now 17 variables 
available you can use in the subject and in the body of the e-mail. 
The body is now not a simple line anymore but a complete template where you can 
design text and also html e-mails. 
You are also able to send a 2nd e-mail to a different e-mail. The default for 
Joomla is the uploader itself.

Installation and setup

Please extract all files to the tfu folder:
- email_plugin.php - The plugin itself
- email_template_config.txt - example text template for the first e-mail that 
                              gets its parameters from the config
- email_template_user.html - example html template for the 2nd e-mail which is 
                             preconfigured to send an e-mail to the Joomla user 
                             that upload files.

For the first e-mail the sender, recipient and the subject is read from the 
configuration and the email_template_config.txt is used. Please look at the 
e-mail template and adopt it to your needs. The plugin does automatically detect 
if is is an text or html e-mail (html emails start with an <).

For the 2nd e-mail you have to set $send_2nd_mail=true; in the file 
email_plugin.php. Then the sender and the subject is read from the configuration 
and the recipient is the Joomla user who uploaded the files. If you want to use 
the 2nd e-mail in a different environment simply change the code to your needs. 
Same applies for a different subject.

In the file email_plugin.php you can also define the parameters that should be 
printed for each uploaded file. Please see list_pattern in the file. There you 
also find the documentation. 

Please note that this plugin is only first help to write your custom e-mails. 
Feel free to adopt it to your needs if yu e.g. want to add attachments or use 
a smtp server to send the e-mails.

Below you find the available parameters you can use in the subject and the templates. 

Available Parameters:

You can use the following parameters in the subject and in the text and html e-mails:

{emailfrom} - The sender of the e-mail 
{emailto} - The recipient of the first e-mail  
{username} - The username. In Joomla this is the username. Otherwise the ip 
{userid} - The Joomla user id. Empty otherwise.
{userdisplayname} - The Joomla user display name. Empty otherwise.
{useremail} - The Joomla user e-mail. Empty otherwise. Default e-mail forthe 2nd e-mail if enabled.
{currenttime} - The current time
{folder} - The upload folder
{nrfiles} - Number of uploaded files
{filelist} - The file list like defined in the email_plugin.php. There the following parameters can be used:
     {id} = id of the db plugin - only available if the db plugin is used!
     {filename} = file name only
     {file} = file name with folder 
     {description} = uploaded description in the description mode 
     {size} = size of the uploaded file
{htmlfilelist} - Like the file list but instead of return a <br /> is used.
{ulfilelist} - Like the file list but formated in an <ul><li>...</li><li>...</li></ul>

You can also get the last entries of the $list_pattern directly if available:
     {last_id} = id of the db plugin - only available if the db plugin is used!
     {last_filename} = file name only
     {last_file} = file name with folder 
     {last_description} = uploaded description in the description mode 
     {last_size} = size of the uploaded file
     
Have fun using TFU, JFU, WFU,
Michael Dempfle