Location: PHPKode > scripts > GentleSource Tell a Friend > ts2.9.2/docu/tell_a_friend_script_english.html
<?xml version="1.0"?>
<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir=" ltr
">
<head>
  <title> Documentation Tell A Friend Script
</title>
    <meta http-equiv="Content-Type" content="text/html; charset= iso-8859-1
" />
    <meta name="robots" content="noindex">



<style type="text/css">
<!--
  h4 {
      font-family:Tahoma,Helvetica,Geneva,Sans-serif,sans-serif;
      margin-top:15px;
      text-align:center;
  }

  
  h5 {
      font-family:Tahoma,Helvetica,Geneva,Sans-serif,sans-serif;
      margin-top:50px;
      margin-bottom:5px;
      text-align:center;
      font-size:11pt;
  }

  
  p, td, br, form, ol, a, ul, li {
      font-family:Verdana,Helvetica,Geneva,Sans-serif,sans-serif;
      font-size:10.5pt;
  }

   
  body {
      background-color:#FFFFFF;
  }   
   

  .chapter {
      width:650px;
      border-width:1px;
      border-style:solid;
      border-color:#006699;
      margin-left:50px;
      padding:10px;
      margin-bottom:20px;
      background-color:#EFEFEF;
      line-height:14pt;
  }

  
  .code {
      font-family:Courier New;
  }

  
  .links {
      width:650px;
      margin-left:50px;
      padding:5px;
      margin-bottom:10px;
      text-align:center;
  }
  
      
  .strong {
      font-weight:bold;
  }

-->
</style>

<body>
  
  <a name="top"></a>
    

  <div class="chapter"><a name="ad"></a>
<h4>Tell A Friend Script presents: Online Appointment Booking</h4>
<p> Our PHP script <a href="http://www.schedule-organizer.de/en/">Schedule Organizer</a> allows a customer, patient or client to schedule an appointment via the company's, doctor's or consultant's homepage. PHP script simplifies and automates appointment administration - the employees responsible save time as there are fewer telephone calls, faxes and letters to answer.
</p>
<p>  <a href="http://www.schedule-organizer.de/en/">Schedule Organizer Website</a>
 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="thanks"></a>
<h4>Documentation Tell A Friend Script</h4>
<p> Thank you for your interest in our Tell A Friend Script. We recommend to read this documentation carefully.
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="links"><a href="#configuration">Configuration</a>&nbsp;&nbsp;
<a href="#html">HTML Template</a>&nbsp;&nbsp;
<a href="#mail">E-mail Template</a>&nbsp;&nbsp;
<a href="#logs">Log File</a>&nbsp;&nbsp;
<a href="#support">Support</a>&nbsp;&nbsp;
<a href="#license">License Information</a>&nbsp;&nbsp;
</div>
<div class="chapter"><a name="introduction"></a>
<h4>Introduction</h4>
<p> Tell-A-Friend-Script will allow you to let visitors of your website send a recommendation per e-mail. 
</p>
<p> It lets you send e-mail as text, or as HTML and it has multiple layers of security that reduce the possibility of unauthorized use. The script also features to log the sent messages. The layout of form and e-mail can be customized as you wish.
</p>
<p> Please pay attention that you upload all files to your server in text mode (ASCII mode). 
</p>
<p> It is important that the script will be called from a form or from a link on your website. That is for security reasons. The script checks the referring site and compares it with the information from the script configuration. In case it fits the script will be executed.
</p>
<p> You can use the script in a direct (the link) and indirect way (the form). The direct way is to link to the file ‘index.php’ directly and use the default templates (HTML and mail).
</p>
<p> The indirect way uses already existing forms within a HTML page. With this method you are able to process several forms with the same script. HTML, mail templates, and all the further parameters are defined through hidden form fields within the HTML form.
</p>
<p> The HTML template of the script has been generated by the specifications of XHTML 1.0. HTML tags like &lt;br&gt; or &lt;input&gt; contain an ending slash (&lt;br /&gt; or &lt;input type=“text“ name=“field“ /&gt;).
 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="configuration"></a>
<h4>Set up and configuration</h4>
<p> Attention: If you get the following error message during script execution – “Wrong or empty referrer (referring site)!“ - you have to insert into the variable “$referring_server” in the file “index.php” your server name (your domain with and without www and the IP address.
</p>
<p> Example:
</p>
<p class="code"> $referring_server = 'www.example.com, example.com, 192.0.34.166';
</p>
<p> In case you have added your server name to the variable and are still seeing this error message please make sure, that you opened the script by clicking on a link at your website (Tell A Friend).
</p>
<p> More variables in the 'index.php': 
</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $script_root	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	This variable contains the following value by default: "./". This means that all pathes start at the script index. You can change the path if you want to integrate this script elsewhere on your web site (include).
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $allow_empty_referer	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Some tools on the user's side do hide the referrer (referring site) for privacy reasons. That can be a firewall or a web browser. You can prohibit the access with an empty referrer by setting this variable to "no" or allow access by setting this variable "yes".
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $language	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Enter here the abbreviation of the language (i.e.: en or de). The language files are stored in the folder ‘languages’.
<br /><br /></td>
                                     </tr>
</table>
<p> The following features have been designed to prevent the abuse of the script by a third party (spammer). You can connect the number of e-mails to the e-mail-address of the sender, e-mail-address of the recipient or to the IP address of the user.
</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $ip_banlist	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	This variable can contain IP addresses of servers that you do not want to access the Script. If you do not want to use this feature, just leave the variable empty.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $sender_count	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	You can determine how often within a certain time range the sender is allowed the send recommendations with the same e-mail address. Enter the number of e-mails that a sender can send with the same e-mail address (0 turns the function off).
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $sender_duration	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Definition of the time range in hours (1, 2, 5, 10, 20, 300). After that time range the user can use the e-mail address again.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $recipient_count	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Like above you can determine how often within a certain time range a page can recommended to the same e-mail address. Enter the number of e-mails with the same recipient e-mail address (0 turns that function off).
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $recipient_duration	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Definition of the time range in hours (1, 2, 5, 10, 20, 300). After that time range the user can send recommendations to that e-mail address again.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $ip_address_count	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	The third option is to connect the number of e-mails to the IP address of the user. Like the two options above you can determine the number of e-mails and the time range. Enter here the maximum number of e-mails which a user can send through the form. Once the user has reached this number he can send more e-mails after the next dial in to the internet. The number 0 (null, zero) turns this function off.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $ip_address_duration	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Definition of the time range in hours (1, 2, 5, 10, 20, 300). After that time range or after the next dial-in to the internet the user can send e-mails again.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> 			</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	When you turn one of those features on, the logging function will be turn on too. Please make sure that the directory ‘log’ and the log file itself (‘log/logfile.txt’) have writable permissions (chmod 777).
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $show_limit_errors	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Once the user has reached the maximum number of e-mails you can show him an error message.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $log_messages	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	With this variable you can set the logging function on or off. If you want to use this feature please make sure that the directory ‘log’ and the log file itself (‘log/logfile.txt’) have writable permissions (chmod 777).
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $text_wrap	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	This variable contains the number of characters after that a line break will be added automatically. In case no value is defined, no line break will be added. 
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $show_error_messages	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	The default value of this variable is ‘yes’ so during the configuration process you will get error messages and hints that help you to install the script. Once the script configuration has been finished you can set off these system messages because it is not necessary to give extern visitors a view in the system.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $path['logfile']	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	This variable contains the path to the log file.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $path['templates']	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	This variable contains the path to the template files (HTML and mail). The path can be relative (./templates/ or templates/) and absolute (i.e.: /usr/local/etc/httpd/.../tell_a_friend/templates/). Please pay  attention to the ending slash.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $file['default_html']	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	This variable contains the file name of the HTML template. This template will then be used automatically.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $file['default_mail']	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	If you want to use the script in the direct way this variable must contain the file name of the mail template. This template will then be used automatically. 
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> $add_text	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	You can add further values, text, variables or other content to this variable. Those content can be displayed in the HTML templates by using markers/placeholders within curly brackets { and }.
<br /><br /></td>
                                     </tr>
</table>
<p> If you want to add your own values to the variable $add_text please follow the pattern from the example entries.
</p>
<pre> 
   $add_text = array(
 
                       'txt_additional' =&gt; 'Additional',
                       'txt_more'       =&gt; 'More'
 
                     ); 
 
</pre>
<p> The first path of each entry is the name of the placeholder. In case you want to use the value of txt_addition in your template enter the name of the entry with curly brackets - {txt_addition}. The name must not contain white spaces or special characters. Only allowed is the _ .
 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="html"></a>
<h4>HTML template customization - templates/form.tpl.html</h4>
<p> The directory 'templates' contains the files for the layout. You can use HTML and CSS to customize the layout as you wish.
</p>
<p> In case you are using a WYSIWYG editor like Dreamweaver, Frontpage or NetObjects please make sure that the software does not make any changes by itself.
</p>
<p> The subfolder 'examples' contains further HTML forms. You can use them as example for you own forms. With the template 'alternative_form.tpl.html' you can let the visitor choose, if he wants to recommend the page he just have visited or if he wants to recommend the homepage. And the template 'advanced_form.tpl.html' contains examples how to integrate checkboxes, radio buttons and select menus in your form.
</p>
<p> The template files contain markers with { and } like: {txt_next_page}. These markers will be replaced by its counterparts from the language file 'languages/language.en.inc.php'. You are free to edit that file and change the words and phrases. You are also free to replace the markers within the template files by real words or put those markers to other positions within the template file. And you are also able to enhance the language file by using the given pattern. 
</p>
<p> Following placeholders are not included in the language file and should not be changed.
</p>
<pre> 
 {check_referer}
 {check_server}
 {message}
 {redirect}
 {referer}
 {server}
 {link}
 {fields}
 
 
 
</pre>
<h4>Include Files</h4>
<p> The script allows you to include files directly into the HTML template files. It makes no difference whether you want to include PHP, HTML or other text files. For example:
</p>
<p> Example:
</p>
<p class="code"> &lt;INCLUDE FILENAME=&quot;header.php&quot;&gt;
</p>
<p> The script automatically replaces this line with the content of the file "header.php". Please pay attention that relative paths (../ etc.) start at the main directory of the script (same level as the index.php file).
</p>
<p> If you use absolute paths (path starts with slash), the path starts at the www root folder of your web account by default.
</p>
<p> Example:
</p>
<pre>
 /logs/
 /images/
 /layout/
 /layout/header.php
 /form_mail/
 /form_mail/templates/
 /form_mail/templates/form.tpl.html
 /form_mail/index.php
 
</pre>
<p> Let us suppose you want to include the file "header.php" into the file "form.tpl.html". If you use a relative path, you need to start at the same level as the file "index.php" is:
</p>
<p class="code"> &lt;INCLUDE FILENAME=&quot;../layout/header.php&quot;&gt;
</p>
<p> If you want to use an absolute path, you need to write your path starting at the www root folder:
</p>
<p class="code"> &lt;INCLUDE FILENAME=&quot;/layout/header.php&quot;&gt;
</p>
<p> You can find example files in the folder "templates/examples_includes/".
</p>
<p> Form Fields
</p>
<p> Please pay attention that your form field names may not start with "multiple_", unless you want to send recommendation e-mails to multiple recipients.
</p>
<p> For every form field name in the template exists automatically a placeholder with the same name that can be used within the HTML template and the mail template as well. 
</p>
<p> The script uses three pre-defined form fields. The following field can also appear as a radio button:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;link&quot; value=&quot;{redirect}&quot; /&gt;
</p>
<p> The other two fields:
</p>
<pre>
 &lt;input type=&quot;text&quot; name=&quot;sender_email&quot; value=&quot;{sender_email}&quot; /&gt;
 &lt;input type=&quot;text&quot; name=&quot;friend_email&quot; value=&quot;{friend_email}&quot; /&gt;
</pre>
<p> You can add more fields to the form but do not change the three mentioned above. Please make sure that those additional field names and placeholder names do not contain white spaces or special characters.
 
 
</p>
<h4>Multiple Recipients</h4>
<p> The script allows you to send a recommendation e-mail to an arbitrary number of recipients. The simplest way would be to add the desired number of form fields - one for each recipient e-mail - to your form.
</p>
<p> You can select any field name (only alphanumeric and underscore), but every field name must start with the word "multiple_" (note the underscore) and end with a consecutively number "_1" (note the underscore).
</p>
<p> In the folder "templates/examples/" you can find an example form and mail template. The HTML template file "multiple_recipientes_form.tpl.html" has been prepared for sending the recommendation e-mail to multiple recipients. The folder also contains the e-mail template file "multiple_recipients_mail.tpl.txt".
</p>
<p> Let us suppose you want to let your visitors send e-mails to up to four recipients. If we choose, for example, the name "recipient_email" as field name, our multiple field names would be following:
</p>
<p> multiple_recipient_email_1
 multiple_recipient_email_2
 multiple_recipient_email_3
 multiple_recipient_email_4
</p>
<p> The complete form fields would look like this:
</p>
<pre>
 &lt;input type=&quot;text&quot; name=&quot;multiple_recipient_email_1&quot; value=&quot;{multiple_recipient_email_1}&quot; /&gt;
 &lt;input type=&quot;text&quot; name=&quot;multiple_recipient_email_2&quot; value=&quot;{multiple_recipient_email_2}&quot; /&gt;
 &lt;input type=&quot;text&quot; name=&quot;multiple_recipient_email_3&quot; value=&quot;{multiple_recipient_email_3}&quot; /&gt;
 &lt;input type=&quot;text&quot; name=&quot;multiple_recipient_email_4&quot; value=&quot;{multiple_recipient_email_4}&quot; /&gt;
</pre>
<p> The field names - surrounded by curly brackets - are automatically the template variables for the field values (value="...").
</p>
<p> The script allows you to assign an arbitrary number of additional form fields to every recipient. Every field that starts with "multiple_" will automatically assigned to the corresponding recipient, based on the trailing number.
</p>
<pre>
 &lt;input type=&quot;text&quot; name=&quot;multiple_first_name_4&quot; value=&quot;{multiple_ first_name_4}&quot; /&gt;
 &lt;input type=&quot;text&quot; name=&quot;multiple_last_name_4&quot; value=&quot;{multiple_last_name_4}&quot; /&gt;
 &lt;input type=&quot;text&quot; name=&quot;multiple_recipient_email_4&quot; value=&quot;{multiple_ recipient _email_4}&quot; /&gt;
</pre>
<p> The script uses the same e-mail template file for every recipient. The template variables (those in curly brackets) have the same name as their corresponding fields in the form template. But you need to replace the trailing numbers with a question mark. The script recognizes those variables and replaces them with correct values. For example:
</p>
<p class="code"> To: &quot;{multiple_first_name_?} {multiple_last_name_?}&quot; &lt;{multiple_email_?}&gt;
</p>
<p> The script uses the same mail template file for all recipients. All non-multiple field values appear in every e-mail.
 
 
</p>
<h4>Mandatory Form Fields</h4>
<p> Every form field can be marked as mandatory field. The form will not be submitted until the form has been filled in. Enter all mandatory field names in following hidden form field in the template:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;&quot; /&gt;
</p>
<p> Example:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;required_fields&quot; value=&quot;lastname, sender_email, friend_email&quot; /&gt;
</p>
<p> You can add more fields but you should not remove one of the three above. 
 
 
</p>
<h4>E-mail Syntax</h4>
<p> Like the mandatory fields you can define fields that you want to be checked for a correct e-mail syntax.
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;email_fields&quot; value=&quot;&quot; /&gt;
</p>
<p> Example:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;email_fields&quot; value=&quot;sender_email&quot; /&gt;
 
 
 
</p>
<h4>Extended Error Messages</h4>
<p> If a required field has not been filled out by a visitor an error message will be displayed above the form fields by default.
</p>
<p> The script allows you to display error messages right beside, above or below a form field. Moreover, the script allows you to alter the appearance of the form label. Following screenshot shows an example:
</p>
<p> <img src="./images/error_messages_en.gif" border="0" alt="" />
</p>
<p> Following three variables are available:
</p>
<pre> {required:fieldname=Error message}
 {syntax: fieldname=Error message }
 {error:fieldname=Default text||=Error message}
 
 
 
</pre>
<h4>{required:fieldname=Error message}</h4>
<p> Let us suppose you have a field "last_name" and you define it as required field. You can use following variable for the error message:
</p>
<p class="code"> {required:last_name=Please enter your last name.}
</p>
<p> In case the visitor has not filled out the field, the variable will be replaced with the error message:
</p>
<p> Please enter your last name.
</p>
<p> You could format the error text using CSS:
</p>
<p class="code"> {required:last_name=&lt;span style=&quot;font-weight:bold;color:#FF0000;&quot;&gt;Please enter your last name.&lt;/span&gt;}
</p>
<p> The error text now appears in bold font and in red color:
</p>
<p> <span style="font-weight:bold;color:#FF0000;"> Please enter your last name.</span>
 
 
</p>
<h4>{syntax:fieldname=Error message}</h4>
<p> Let us suppose you have a field "email" and you define it as e-mail syntax field. You can use following variable for the error message:
</p>
<p class="code"> {required:email=Please enter a valid e-mail address.}
</p>
<p> In case the visitor has not filled out the field correctly, the variable will be replaced with the error message:
</p>
<p> Please enter a valid e-mail address.
</p>
<p> You could format the error text using CSS:
</p>
<p class="code"> {required:email=&lt;span style=&quot;font-weight:bold;color:#FF0000;&quot;&gt;Please enter a valid e-mail address.&lt;/span&gt;}
</p>
<p> The error text now appears in bold font and in red color:
</p>
<p> <span style="font-weight:bold;color:#FF0000;">Please enter a valid e-mail address. </span>
 
 
 
</p>
<h4>{error:fieldname=Default text||=Error message}</h4>
<p> You can use following variable, if you want to change the appearance of the form field label. Let us suppose you have a field "subject " and you define it as required field. You can use following variable in order to change the appearance of the label:
</p>
<p class="code"> {error:subject=Subject||=&lt;span style=&quot;color:#FF0000;&quot;&gt;Subject&lt;/span&gt;.}
</p>
<p> Without an error the first part (everything before the two vertical lines - pipes) will be displayed. In case the visitor has not filled out the field, the variable will be replaced with the second part:
</p>
<p> For a better understanding you should take a look at the example in the folder "templates/examples/".
 
</p>
<h4>Redirect Back or Thank You Page</h4>
<p> After the form has been submitted the user will be redirected to the page he came from or you can define a special page in the following field:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;redirect&quot; value=&quot;{redirect}&quot; /&gt;
</p>
<p> In case you want to redirect the user to a certain page just replace the placeholder {redirect} with the URL of the thanks page.
</p>
<p> Example:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;redirect&quot; value=&quot;http://www.example.com/thanks.html&quot; /&gt;
</p>
<p> Please enter the whole URL including http:// and the domain name (i.e.: http://www.example.com/).
</p>
<p> In case you do not want to redirect back to the referring page or redirect to a thanks page you can display a confirmation page. That page can also contain the form values. Just edit following field:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;redirect&quot; value=&quot;{redirect}&quot; /&gt;
</p>
<p> And change it to:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;static&quot; value=&quot;{redirect}&quot; /&gt;
</p>
<p> The field name changes from "redirect" to "static".
 
 
 
</p>
<h4>Define HTML Template</h4>
<p> You can open the script directly in your browser (call index.php) or call the script from an existing form in a HTML page. In the latter case you will have to define the HTML template in the following field:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;html_template&quot; value=&quot;&quot; /&gt;
</p>
<p> Example:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;html_template&quot; value=&quot;form.tpl.html&quot; /&gt;
 
 
 
</p>
<h4>Define Mail Template</h4>
<p> The mail template can be defined in this hidden form field:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;mail_template&quot; value=&quot;&quot; /&gt;
</p>
<p> You can define one single mail template,
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;mail_template&quot; value=&quot;mail.tpl.txt&quot; /&gt;
</p>
<p> or you can define more than one mail template. Each of these templates can contain different recipients and contents:
</p>
<p class="code"> &lt;input type=&quot;hidden&quot; name=&quot;mail_template&quot; value=&quot;mail.tpl.txt, mail2.tpl.txt&quot; /&gt;
 
 
</p>
<h4>Select Menus</h4>
<p> The script can process select menus like the following:
</p>
<pre>
 &lt;select name=&quot;&quot; size=&quot;&quot;&gt;
   &lt;option value=&quot;&quot;&gt;&lt;/option&gt;
   &lt;option value=&quot;&quot;&gt;&lt;/option&gt;
 &lt;/select&gt;
 
</pre>
<p> An exception are multiple select menus.
</p>
<p> How to make sure the value selected by the user appears after a new load of the form shows the following example:
</p>
<pre>
 &lt;select name=&quot;Salutation&quot; size=&quot;2&quot;&gt;
   &lt;option value=&quot;Mr&quot; {select:Salutation=Mr}&gt;Mr&lt;/option&gt;
   &lt;option value=&quot;Ms&quot; {select:Salutation=Ms}&gt;Ms&lt;/option&gt;
 &lt;/select&gt;
</pre>
<p> The placeholder {select:Salutation=Ms} contains of the following elements. At the first place stands the type of form field you are using. In this case it is a select menu (= select). After that follows a :. At the second place stands the name of the form field. In the example above that would be "Salutation". After that follows an equal sign (=). At the last place stands the value of the option tag (value="").
</p>
<p> To make the selected value appear within the mail template, you need to enter the name surrounded by curly brackets - { } - in the mail template.
 
 
</p>
<h4>Checkboxes</h4>
<p> The script can process checkbox fields like the following:
</p>
<p class="code"> &lt;input type=&quot;checkbox&quot; name=&quot; &quot; value=&quot;&quot;  /&gt;
</p>
<p> How to make sure the value selected by the user appears after a new load of the form shows the following example:
</p>
<p class="code"> &lt;input type=&quot;Checkbox&quot; name=&quot;Newsletter&quot; value=&quot;Yes&quot; {checkbox:Newsletter=Yes} /&gt;
</p>
<p> The placeholder {checkbox:Newsletter=Yes} contains of the following elements. At the first place stands the type of form field you are using. In this case it is a checkbox field (= checkbox). After that follows a :. At the second place stands the name of the form field. In the example above that would be "Newsletter". After that follows an equal sign (=). At the last place stands the value of the option tag (value="").
</p>
<p> To make the selected value appear within the mail template, you need to enter the name surrounded by curly brackets - { } - in the mail template.
 
 
</p>
<h4>Radio Buttons</h4>
<p> The script can process radio button fields like the following:
</p>
<p class="code"> &lt;input type=&quot;radio&quot; name=&quot;&quot; value=&quot;&quot; /&gt;
</p>
<p> How to make sure the value selected by the user appears after a new load of the form shows the following example:
</p>
<p class="code"> &lt;input type=&quot;radio&quot; name=&quot;Salutation&quot; value=&quot;Mr&quot; {radiobutton:Salutation=Ms} /&gt;
</p>
<p> The placeholder {radiobutton:Salutation=Ms} contains of the following elements. At the first place stands the type of form field you are using. In this case it is a radio button field (= radiobutton). After that follows a :. At the second place stands the name of the form field. In the example above that would be "Salutation". After that follows an equal sign (=). At the last place stands the value of the option tag (value="").
</p>
<p> To make the selected value appear within the mail template, you need to enter the name surrounded by curly brackets - { } - in the mail template.
</p>
<p> Examples of the above described features can be found in the template "advanced_form.tpl.html".
 
 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="mail"></a>
<h4>E-mail Template Customization - templates/mail.tpl.txt</h4>
<p> At the top of the mail template are the header data like:
</p>
<ul>
  <li> Recipient - To:
</li>
  <li> Sender - From:
</li>
  <li> Subject - Subject:
</li>
  <li> Carbon copy - CC:
</li>
  <li> Blind carbon copy - BCC:
</li>
</ul>
<p> You can define the e-mail recipient within the template like this:
</p>
<p class="code"> To: {friend_email}
</p>
<p> Additionally, you can add several recipients with carbon copy and blind carbon copy:
</p>
<pre>
 CC: hide@address.com
 CC: hide@address.com
 BCC: hide@address.com
</pre>
<p> The sender can be defined within the mail template or you can use the information from the form:
</p>
<p class="code"> From: {sender_email}
</p>
<p> You also can add the name of the sender. In this case the name is followed by the e-mail address which stands between angle brackets. 
</p>
<p class="code"> From: {firstname} {lastname} &lt;{email}&gt;
</p>
<p> Below the e-mail head area (header) follows an empty line (two line breaks) and below that line follows the mail content. You can customize the mail content as you like. If you add fields to the form you will have to place the name of those fields within curly brackets in the mail template.
 
 
</p>
<h4>Display all form data with one placeholder</h4>
<p> You are able to display all form data with only one placeholder. Just add the placeholder
</p>
<p class="code"> {all_content}
</p>
<p> into the e-mail template.
</p>
<p> In HTML e-mails you can use following variable. All form values are automatically displayed in a table.
</p>
<p class="code"> {all_content_table}
 
 
 
</p>
<h4>Environment variables and server date and time</h4>
<p> The following environment variables are provided by the script. To make these variables appear within the e-mail you can use following placeholders:
</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_user_agent}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Browser software of the user (Mozilla, Netscape, Opera, Internet Explorer).
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_remote_address}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	IP-Address of the user.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_remote_host}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Host name of the user.
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_year}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Year
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_month}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Month
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_day}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Day
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_hour}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Hour
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_minute}	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Minutes
<br /><br /></td>
                                     </tr>
<tr valign="top">
                                       <td class="code" nowrap="nowrap"> {env_second})	</td>
                                       <td>&nbsp;&nbsp;&nbsp;</td>
                                       <td>	Seconds
 
 
 
<br /><br /></td>
                                     </tr>
</table>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="logs"></a>
<h4>The Log File - log/logfile.txt</h4>
<p> The directory ‘log’ and the file ‘logfile.txt’ must be writeable (chmod 777).
 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="support"></a>
<h4>Support</h4>
<p> For the answers to your questions about Form Mail Script, and for the solutions to your problems with Form Mail Script, visit our <a href="http://www.stadtaus.com/forum/">support forum</a>. 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>
<div class="chapter"><a name="license"></a>
<h4>License Information</h4>
<p> You can use the Tell-A-Friend Script for free. If you want to run the script without the link to STADTAUS.com you can purchase the full version online.
</p>
<p> The full version includes free updates and upgrades.
</p>
<ul>
  <li> You may redistribute the script license to a third party. 
</li>
  <li> You may stipulate your own price.
</li>
  <li> The script license applies for one single domain. 
</li>
</ul>
<p> Contact:
</p>
<p> <a href="http://www.stadtaus.com/en/">http://www.stadtaus.com/en/</a><br />
   <a href="http://www.stadtaus.com/forum/">http://www.stadtaus.com/forum/</a>
</p>
<p> More Scripts at <a href="http://www.stadtaus.com/en/">STADTAUS.com</a>:
</p>
<ul>
  <li> Image Gallery Script 
</li>
  <li> Online Appointment Planner 
</li>
  <li> Google Dance Tool 
</li>
  <li> Galerie-Script
</li>
  <li> Tell A Friend Script
</li>
  <li> Form Mail Script
</li>
  <li> Download Center Lite
</li>
  <li> Voting Script
</li>
  <li> Guestbook Script
</li>
  <li> Counter and Referer Script
</li>
</ul>
<p> Please visit our project <a href="http://www.metacollection.com/">MetaCollection</a>. It is a resource for CGI and PHP related script archives.
</p>
<p> Please also visit our project <a href="http://www.greenpolarbear.com/"> Green Polar Bear</a>. The website contains a growing collection of  Royalty Free Photographs.
 
 
 
 
 
 
 
 
 
 
 
</p>
<p align="right"><a href="#top"> Go Top
</a></p></div>

 

  </body>
  
</html>
Return current item: GentleSource Tell a Friend