Adding an E-mail Page Component

From Documentation
Jump to: navigation, search

Adding an E-mail Page Component

With the NetObjects Fusion E-mail Page component, your site visitors can send pages of your site that are interesting or relevant to themselves or others directly from their browser. Instead of opening their e-mail program, copying and pasting the content in an e-mail, and sending it, visitors simply fill out an online form with the necessary information (recipient's name, e-mail address, etc.) and then submit the form. The NetObjects E-mail Page component makes it easy for site visitors to send out pages to their friends, giving you the opportunity to increase site traffic.

The NetObjects E-mail Page component consists of two components:

  • The E-mail Page component, which is used to send site pages via e-mail.
  • The E-mail Page Stats component, which can be used to gather statistics about which pages are being sent most often.

Adding an E-mail Page Component to a Page

There are two methods for placing the E-mail Page component on a page:

  • Placing the E-mail Page component directly on each page that will be sent by e-mail.

This is a simple way of using the E-mail Page component, and it is recommended when you have just a few pages on your site that you want visitors to be able to send to others.

  • Placing the E-mail Page component on a separate page and then creating links to the page containing the E-mail Page component.

This method is recommended when you have a site with many pages. You place the E-mail Page component on a page and create links to the page that contains the component (a link such as "E-mail this page to a friend"). When this link is clicked, the page containing the e-mail form will open in the browser in either a new page or a pop-up window. Site visitors fill in and submit the form to send the page.

Placing the E-mail Page Component Directly on a Page

  1. In Page view, select NOF E-mail Page > E-mail Page from the Custom Components menu.
  2. Draw a box on the Layout to indicate where you want to position the E-mail Page Component.

The NOF E-mail Page dialog appears.

  1. If you have not created a Component Suite, create a new one by typing a name for the suite in the New name field. To include the component as part of an existing suite, click the Existing radio button and select the Component Suite that you want to add the component to. See Using Component Suites.
  2. From the Profile drop-down list, select the settings profile that you want to use for the component. If you have not created a settings profile, the default profile will be used. See Creating Component Profiles.
  3. Click OK to close the NOF E-mail Page dialog.

The E-mail Page dialog box appears.

  1. Follow the steps for configuring the E-mail Page Component settings.

Configuring the E-mail Form

After you have placed the E-mail Page Component on your site, you can customize the form that visitors fill out to send pages of your site. You can modify text labels and apply CSS styles to the default form labels. You can also add additional form labels and corresponding objects'such as text boxes, check boxes, and radio buttons to collect additional information. For example, if you wanted to obtain additional information from visitors who are sending pages, such as what specific information they find interesting, you can add an additional text box in which the user can enter that information.

Usually, when you first place an E-mail Page component on the Layout of a page in NetObjects Fusion, the E-mail Page dialog box appears. If you close the dialog box and you want to configure the component setting in a future moment of time, follow the next steps:

  1. Select the component on the Layout. You will see the NOF _Name of the Component_Properties window.
  2. Click on Click to edit and then press the (..) button.

Customizing E-mail Form Labels

  1. On the Fields tab of the E-mail Page dialog box, configure the labels that will appear on the e-mail form next to the corresponding form object. The default labels are listed in the left-hand pane of the E-mail Page dialog box.
    • From (e-mail). The e-mail address of the person sending the page will be typed in this text field.
    • To (e-mail). The e-mail address of the person who will receive the page will be typed in this text field.
    • Cc. The e-mail addresses of others who will receive this e-mail will be typed in this text field.
    • Bcc. The hidden e-mail addresses of other people who will receive this e-mail will be typed in this text field.
    • From (name). The name of the person sending the page will be typed in this text field.
    • To (name). The name of the person who will receive the page will be typed in this text field.
    • Subject. The subject of the e-mail will be typed in this text field.
    • Message. The sender of the site page can send a message along with the page to the recipient in this text field. The message will be sent only if either ZIP or URL format is selected. See Choosing Formats by which Pages Can Be Sent.
    • E-mail format. This is a combo-box that will display the following values the site visitor can select from: HTML (images embedded), HTML (link to images), Plain text, and URL.
    • Captcha. The shown code text will be typed in this text field.
  2. Edit the default label text by selecting the label you want to change and replacing the text in the Label field.
  3. Add a new label and form object by clicking the add (+) button, selecting Standard Controls and entering a name for the field in the Name text field.

If you remove the Captcha label, you can add it back by clicking the add (+) button, and selecting Captcha from the Custom Controls section.

When you add a new form label, a corresponding form object is also created. Select the desired form object type from the Type drop-down menu. Form objects are used to define the type of input a user enters in a form. For example, a visitor can type text in a text field or select a check box to respond to questions on a form. Text fields and check boxes are types of form objects.

The default form object for new items is a single-line text field, but you can also choose to add a text box, radio button, check box, and button.

  • To remove a label and its form object, select the label and click the remove (-) button.
  • To change the order in which form elements will appear on the e-mail form, click the label name and move the label on the form using the up and down arrows.
  • On the Field tab of the E-mail Page dialog box, you can set the properties for the form objects corresponding to the labels that appear on the e-mail form.

The Control Settings section will display the properties for each label relative to the form object Type.

  • To apply a custom CSS style to the form object, type the name of the CSS style in the text box or select the style from the drop-down list.

To create a custom CSS style that will be available for the component form object. See Using Style Sheets with Custom Components.

Customizing Form Objects

On the Fields tab of the E-mail Page dialog box, you can set the properties for the form objects corresponding to the labels that appear on the e-mail form. The Control Settings section will display the properties for each label relative to the form object Type.

Specifying E-mail Form Error Events

You can assign requirements for each form field so that the form cannot be successfully submitted unless all of the required fields are completed correctly. For example, you can apply a rule for a text box so that the site visitor is required to enter text before submitting the form. If the site visitor leaves the text field blank and submits the form, the form will refresh with error markers, and the visitor will not be able to submit the form until all fields with errors are completed correctly.

  1. In the E-mail Page dialog, click the label for the form element to which you want to apply validation options.
  2. Click the Error events tab.
  3. Select a validation requirement from the Error event drop-down list.

Available error events will vary depending on the type of form object to which the error event is being applied.

  1. Click the Active to check box so that the error event will be activated on the form.

You can also suspend validation requirements for the form element by clearing the Active check box.

  1. Edit the default error message text by replacing the default text in the Message field.

Error messages for each form element that did not meet validation requirements will appear below the form.

  1. To apply a custom CSS style to the form object, type the name of the CSS style in the text box or select the style from the drop-down list.

To create a custom CSS style that will be available for the component form object, see Using Style Sheets with Custom Components.

Choosing Formats by which Pages Can Be Sent

In the E-mail Page dialog, you can choose the format by which visitors can send site pages.

  1. In the E-mail Page dialog, click the Field tab.
  2. Click E-mail Format in the field list.
  3. Click the Field tab within the Properties tabs to the right of the Fields list.
  4. In the Elements field, select the formats by which you want visitors to be able to send pages.
    • HTML (images embedded). The entire page will be sent, including images, links, etc.
    • HTML (link to images). The entire page will be sent, but links to each image's source will display in place of the image.
    • Plain text. The page will be sent as plain text, not HTML. Images will not appear in the e-mail.
    • URL. Only the website address (URL) of the Web page will be sent.
  5. Choose the type of list in which to display options. You can select either a drop-down list or a list box.
  6. If ListBox is selected as the type, click the Allow multiple selections check box to allow visitors to select more than one option in the list.

Configuring the E-mail Page Component Server-Side Settings

The NOF E-mail Page component requires specific server-side settings to work properly in a browser. You can configure these settings on the General tab of the Current Site Options dialog. The server settings are displayed on the General tab of the E-mail Page dialog.

  1. In the E-mail Page dialog, click the General tab.

Script type displays either ASP or PHP, depending on settings from the General tab of the Current Site Options dialog. The default xml fetch script for the language type twill be uploaded to your Web server. The script will parse the .xml data to your website.

  1. Click the Publish scripts in debug mode check box to view in-depth troubleshooting information should the component not function properly when published.
  2. Select the language (English or German) of your component script.
  3. Check the Keep statistics of e-mailed pages check box and type the location of the flat file database or file where you want the statistics to be kept.

By default, the results are sent to the emailpage.csv file that is created in the /db folder, in the directory you publish the site to. Create the /db folder and grant write permissions to it so the .csv file can be created in it.

  1. Click the Wizard button to launch the DB Creation Wizard. See Using the DB Creation Wizard.

If you do not use the Wizard button next to the Database field and you leave ../db/emailpage.csv in the default value, then you will have to manually create the /db folder on the server (in the folder where you publish the site) and grant write permission to the /db folder.

  1. Enter the Server (IP) address and Port of the server that will handle sending the e-mail pages.
  2. If necessary check the smtp requires authentication check box and then fill in the Username and the Password fields with the SMTP user name and password.
  3. Check the smtp requires ssl check box if the SMTP server requires a secure connection (SSL).

Note: Consult your host provider or site administrator to obtain details about the Server IP and/or the port number, and also to request information about authentication and/or SSL possibly required by the SMTP server.

Note: The secure connection (SSL) and authentication for an SMTP server are used by some host providers to increase security and stem the flow of email messages propagating spam, viruses, and worms.

  1. To save the E-mail Page Component settings as a profile which can be applied to additional E-mail Page components that you add to your site, click Save Profile. See Creating Component Profiles.
  2. Click OK to close the E-mail Page dialog.

Adding the E-mail Stats Component

Use the E-mail Stats Component on a site with the E-mail Page Component to display a ranking of the most frequently e-mailed pages of your site.

On the published site, the page containing the E-mail Stats Component will display a table with the URLs of the most frequently e-mailed pages, as well as the number of times each page has been e-mailed. If you do not want site visitors to be able to view the statistics on the E-mail Stats Component page, exclude the page from the navigation by clicking on the page in Site view and checking the Exclude from navigation check box on the Page Properties panel.

  1. Open the page that will contain the E-mail Page Stats in Page view.
  2. From the Custom Components toolbox, select NOF E-mail Page > E-mail Stats.
  3. Draw a box on the Layout to indicate where you want to position the E-mail Stats Component.

The NOF E-mail Page dialog appears.

  1. If you have not created a Component Suite, create a new one by typing a name for the suite in the New name field. To include the component as part of an existing suite, click the Existing radio button and select the Component Suite that you want to add the component to. See Using Component Suites.
  2. From the Profile drop-down list, select the settings profile that you want to use for the component. If you have not created a settings profile, the default profile will be used. See Creating Component Profiles.
  3. Click OK to close the NOF E-mail Page dialog.

The E-mail Stats dialog box appears.

  1. Configure the E-mail Stats Component settings. See Configuring the E-mail Stats Component's Settings.
  2. Configuring the E-mail Stats Component's Settings

    To configure the E-mail Stats Component's Settings:

    1. On the Settings tab, set the number of most frequently e-mailed pages that you are keeping statistics for. Type the number you want or select it using the up and down arrows.
    2. Configure your server settings on the General tab. The General tab contains the same fields as in the E-mail Page dialog's General tab. See Configuring the E-mail Page Component Server-Side Settings.

    If you have selected a Profile in the NOF E-mail Page dialog when adding the component, the profile information will appear in the General tab.

    1. Click OK.