Help visitors share URLs to your pages

This package implements a simple functionality that allows visitors to your website send URLs of pages they are currently viewing to other people by email.

It places the Tell a friend link on a page that opens a form when clicked. In the form the website visitor specifies the sender's and the recipient's names and email addresses as well as writes a short description of the page.

The CAPTCHA is used on the form for protection from abuse.

Technical description

The form that appears when the user clicks the "Tell a friend" link can be generated on either the server or client side.

If the form is displayed embedded within a page (default), it is generated on the server side. If the form appears as a popup, it is generated on the client side. In the latter case, JavaScript must be allowed on the client side.

You can configure the necessary display mode by editing the PopUp parameter of the TellAFriend function (see below).

Implementing Composite.Community.TellAFriend

  1. Configure the email host (please see "Email Host Setup").
  2. On the Content tab of the page, the Markup Code tab of a template used for this page or the Template tab of an XSLT function used on this page, insert the Composite.Community.TellAFriend function ( Insert > Function) or add the following code:
     
    <f:function name="Composite.Community.TellAFriend" xmlns:f="http://www.composite.net/ns/function/1.0"> 
      <f:param name="PopUp" value="False" /> 
    </f:function>
  3. If necessary, set its optional parameter:
    • PopUp: Shows the form either embedded on a page (False) or as a popup (True). False by default (embedded). Note: JavaScript must be enabled on the client side if the parameter is set toTrue.

Using Composite.Community.TellAFriend

  1. Click the "Tell a friend" on the page.
  2. In the form that appears, fill the fields:
    • From name: The name of the sender
    • From e-mail: The email address of the sender
    • To name: The name of the recipient
    • To e-mail: The email address of the recipient
    • Description: short description of the page
    • Please write the text from the picture: This is where you enter characters form the CAPTCHA image.
  3. Click Submit.

The person whose email address is specified in the To e-mail field will receive an email message that will include the URL of the page (and a description if provided).

Important notes

  1. The email host on your website is set to localhost by default. You can change this setting by editing ~/web.config and changing the /configuration/system.net/mailSettings section. Read more about configuring the e-mail host in web.config.
  2. To use the TellAFriend function with the PopUp parameter set to True, make sure that  JavaScript is enabled on the client side (in a Web browser).

Requirements

Composite C1 version 2.0 or later

SHARE