DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Agency Registration for tt_address

Author:Stanislas Rolland
Created:2012-04-19T19:27:19
Changed by:Holzinger Franz
Changed:2014-01-23T14:38:20
Classification:agency_tt_address
Keywords:forAdmins, forIntermediates, tt_address, direct_mail
Author:Franz Holzinger
Email:franz@ttproducts.de
Info 4:
Language:en

img-1 img-2 EXT: Agency Registration for tt_address - agency_tt_address

EXT: Agency Registration for tt_address

Extension Key: agency_tt_address

Language: en

Keywords: forAdmins, forIntermediates, tt_address, direct_mail

Copyright 2014-2014, Franz Holzinger, <franz@ttproducts.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Introduction

What does it do?

The Agency Registration for tt_address extension is an email-based subscription application that allows to subscribe to Direct Mail categories with an email address, without having to register as a front end user.

The Agency Registration for tt_address extension is based on the features of extension Agency Registration (agency).

What's new in Version 0

Version 0:

Created as a fork of the extension sr_email_subscribe 2.0.0

Requirements

Extension Agency Registration for tt_address (extension key: agency_tt_address) requires TYPO3 4.4+ and PHP 5.2+. Note that the end of maintenance of TYPO3 4.4 itself has been at the end of April 2012. Please upgrade to TYPO3 4.5+.

It requires extensions Agency Registration (agency) 0.1.2+, Address List (tt_address) 2.2.0+, Static Info Tables (static_info_tables) 2.3.0+, and Static Methods since 2007 (div2007) 1.0.3+ to be installed.

If used in conjunction with Direct Mail, then Direct Mail 2.7+ is required.

Support

You can get support and installation service for this extension at Jambage Forum - Agency .

Please see or report bugs on TYPO3 Forge: http://forge.typo3.org/projects/extension-agency_tt_address

Credits

This extension is derived from the Front End User Admin extension of Kasper Skårhøj.

The email attachment feature is an idea of Volker Graubaum < volker.graubaum(AT)e-netconsulting.de >.

Administration

Migration from sr_email_subscribe

If you have formerly used the Email Address Subscription, then you can easily migrate to «Agency Registration for tt_address» which started as a copy of it.

Create the folder uploads/tx_agencyttaddress before you install agency for the first time.

Keep sr_email_subscribe and sr_feuser_register installed for a moment and install also agency and agency_tt_address. Ignore any conflicts warnings of the Extension Manager during the migration process.

Change the constants and setup from 'p lugin. tx_sremailsubscribe ' and 'p lugin.tx_sremailsubscribe_pi1 ' into ' plugin. tx_agencyttaddress ' .Change the example template HTML and also the CSS files from 'EXT:sr_email_subscribe/pi1/tx_sremailsubcr ibe_htmlmail_xhtml.css' to 'EXT:agency_tt_address/pi/tx_agencyttaddress_htmlmail_xhtml.css'

img-3 Change all the 'Include static (from extensions)' from 'Email Address Subscription CSS-styled (sr_email_subscribe)' selections into 'Agency Registration for tt_address (agency_tt_address)'.

Copy all files from 'uploads/tx_sremailsubscribe' into 'uploads/tx_agencyttaddress'.

Change all your plugins of the 'Email Address Subscription' into 'Agency Registration for tt_address'.

Deinstall sr_email_subscribe and deinstall sr_feuser_register.If you have forgotten to move some plugins, then you will see them like this:

img-4

Modify the HTML template file and CSS file.Replace 'tx- sremailsubscribe-pi1' by 'agencyttaddress' and replace 'tx_sremailsubscribe_pi1' by 'agencytta'.

Copy the localisation folder '/web/typo3conf/l10n/de/sr_email_subscribe/' into '/web/typo3conf/l10n/de/agency_tt_address/'. Rename the pi1 subfolder to pi. Repeat this step for any other language which you need.

Install DirectMail, then add the new table fields in the EM or Install Tool and deinstall DirectMail again or leave it installed.

If you have written your TYPO3 extension which uses hooks, then change your hooks from $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][SR_EMAIL_SU BSCRIBE_EXTkey]['tx_sremailsubscribe_pi1']['registrationProcess'][] into $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][AGENCY_TT_ADDRESS_EXT ]['registrationProcess'][] Notice that the array part «['tx_sremailsubscribe_pi1']» has been removed.

Front End Rendering

HTML Template

The default HTML template provided with the plugin is:

EXT:agency_tt_address/pi/tx_agencyttaddress_css_tmpl.html
CSS Styles

Default CSS styles are defined in the setup field of static template Agency Registration for tt_address .

As usual, the default CSS styles may be modified and moved to a .css file. In such a case the location of the file should be specified by an import rule overriding the default TS template setup:

plugin.tx_agencyttaddress._CSS_DEFAULT_STYLE = @import url("fileadmin/styles/some_style_sheet_file.css");

Alternatively, the selectors may be moved to some site-wide style sheet file and the default styles may be nullified:

plugin.tx_agencyttaddress._CSS_DEFAULT_STYLE >
HTML Template Markers

The following is the list of global and main subparts markers used in the example HTML template.

Global markers:

###CHARSET### = config.metaCharset or iso-8859-1

Main subparts markers:

  • ###TEMPLATE_CREATE### : template used to display the initial subscription form.
  • ###TEMPLATE_CREATE_PREVIEW### : template used to display the (optional) subscription preview form.
  • ###TEMPLATE_CREATE_SAVED### : template used to display confirmation that the subscription account was created (when email confirmation request is disabled).
  • ###TEMPLATE_SETFIXED_CREATE### : template used to display confirmation that the subscription account was created but that an email is being sent to the subscriber to complete the subscription process (when email confirmation request is enabled).
  • ###TEMPLATE_INVITE### : template used to display the invitation form.
  • ###TEMPLATE_INVITE_PREVIEW### : template used to display the (recommended) invitation preview form.
  • ###TEMPLATE_SETFIXED_INVITE### : template used to display confirmation that a subscription account was created and that an invitation email has been sent to the potential subscriber to complete the subscription process or decline the invitation.
  • ###TEMPLATE_INFOMAIL### : template used to display a screen that allows the subscriber to request links to be sent to his email address so that he(she) may update or terminate his(her) subscription.
  • ###TEMPLATE_INFOMAIL_SENT### : template used to display confirmation that the “infomail” message is being sent to the subscriber.
  • ###TEMPLATE_EDIT### : template used to display the subscription account editing form.
  • ###TEMPLATE_EDIT_PREVIEW### : template used to display the (optional) editing preview form.
  • ###TEMPLATE_EDIT_SAVED### : template used to display confirmation that the subscription account was updated.
  • ###TEMPLATE_DELETE_PREVIEW### : template used to display the deletion confirmation form.
  • ###TEMPLATE_DELETE_SAVED### : template used to display confirmation that the subscription was terminated.
  • ###TEMPLATE_SETFIXED_OK### : template used to display confirmation that the subscription process was completed.
  • ###TEMPLATE_SETFIXED_OK_DELETE### : template used to display confirmation that the subscription process was canceled.
  • ###TEMPLATE_SETFIXED_FAILED### : template used to display a message when the subscription or cancellation process could not be completed.
  • ###TEMPLATE_AUTH#### : template used to display a link to the subscription form.
  • ###TEMPLATE_NO_PERMISSIONS### : template used to display a message when some illegal access is attempted.
  • ###EMAIL_TEMPLATE_CREATE_SAVED_HTML### : template for the HTML message sent to the subscriber when he has subscribed (when email confirmation request is disabled).
  • ###EMAIL_TEMPLATE_CREATE_SAVED### : template for the plain text message sent to the subscriber when he has subscribed (when email confirmation request is disabled).
  • ###EMAIL_TEMPLATE_CREATE_SAVED_ADMIN### : template for the plain text notification sent to the site administrator when a visitor has subscribed (when email confirmation request is disabled).
  • ###EMAIL_TEMPLATE_EDIT_SAVED_HTML### : template for the HTML message sent to the subscriber when he has updated his subscription account.
  • ###EMAIL_TEMPLATE_EDIT_SAVED### : template for the plain text message sent to the subscriber when he has updated his subscription account.
  • ###EMAIL_TEMPLATE_EDIT_SAVED_ADMIN### : template for the plain text notification sent to the site administrator when a subscriber has updated his subscription account.
  • ###EMAIL_TEMPLATE_SETFIXED_CREATE_HTML### : template for the HTML message sent to the subscriber when he has created a subscription account and need to confirm his subscription (when email confirmation request is enabled).
  • ###EMAIL_TEMPLATE_SETFIXED_CREATE### : template for the plain text message sent to the subscriber when he has created a subscription account and need to confirm his subscription (when email confirmation request is enabled).
  • ###EMAIL_TEMPLATE_SETFIXED_CREATE_ADMIN### : template for the plain text notification sent to the site administrator when a subscriber has created a subscription account and needs to confirm his subscription (when email confirmation request is enabled).
  • ###EMAIL_TEMPLATE_SETFIXED_INVITE_HTML### : template for the HTML invitation message sent to a person for whom a subscription account has been created and requesting accept the invitation to confirm his subscription, or to decline the invitation (or ignore the message).
  • ###EMAIL_TEMPLATE_SETFIXED_INVITE### : template for the plain text invitation message sent to a person for whom a subscription account has been created and requesting accept the invitation to confirm his subscription, or to decline the invitation (or ignore the message).
  • ###EMAIL_TEMPLATE_SETFIXED_INVITE_ADMIN### : template for the plain text notification sent to the site administrator when an invitation to register has been sent and the invited person needs to confirm his(her) subscription.
  • ###EMAIL_TEMPLATE_SETFIXED_APPROVE_HTML### : template for the HTML message sent to the subscriber when he has confirmed his subscription.
  • ###EMAIL_TEMPLATE_SETFIXED_APPROVE### : template for the plain text message sent to the subscriber when he has confirmed his subscription.
  • ###EMAIL_TEMPLATE_SETFIXED_APPROVE_ADMIN### : template for the plain text notification sent to the site administrator when a subscriber has confirmed his subscription.
  • ###EMAIL_TEMPLATE_SETFIXED_DELETE_HTML### : template for the HTML message sent to the subscriber when he has canceled his subscription.
  • ###EMAIL_TEMPLATE_SETFIXED_DELETE### : template for the plain text message sent to the subscriber when he has canceled his subscription.
  • ###EMAIL_TEMPLATE_SETFIXED_DELETE_ADMIN### : template for the plain text notification sent to the site administrator when a subscriber has canceled his subscription.
  • ###EMAIL_TEMPLATE_INFOMAIL_HTML### : template for the HTML message sent to the subscriber when he wants to update or terminate his subscription.
  • ###EMAIL_TEMPLATE_INFOMAIL### : template for the plain text message sent to the subscriber when he wants to update or terminate his subscription.
  • ###EMAIL_TEMPLATE_INFOMAIL_NORECORD_HTML### : template for the HTML message sent to the subscriber when no subscription with his email was found.
  • ###EMAIL_TEMPLATE_INFOMAIL_NORECORD### : template for the plain text message sent to the subscriber when no subscription with his email was found.
  • ###EMAIL_TEMPLATE_DELETE_SAVED_HTML### : template for the HTML message sent to the subscriber when he has terminated his subscription.
  • ###EMAIL_TEMPLATE_DELETE_SAVED### : template for the plain text message sent to the subscriber when he has terminated his subscription.
  • ###EMAIL_TEMPLATE_DELETE_SAVED_ADMIN### : template for the plain text notification sent to the site administrator when a subscriber has terminated his subscription.

Localization

Language files

The main language file is pi/locallang.xml. You can translate it with the extension 'locallang-XML translation tool'.

See http://wiki.typo3.org/index.php/Translations and http://translation.typo3.org/ . For questions you can ask news://netfielders.de:119/typo3.translation.general (news reader).

Send improvements to translations and text improvements to the translator of your language.

Use the Extension Manager to install the available translations.

Adapting labels

You may adapt the labels in pi1/locallang.xml to to your needs and languages.

Any label may be overridden by inserting the appropriate assignment in your TS template setup:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.labelName = overridingValue

You can find the name of the label you want to modify (or translate) by inspecting the extension file pi/locallang.xml.

Overriding labels specified in TCA

You may also override by the same method labels from other files when they are referenced by the TCA definition of a field (see the tutorial section on Adding fields to the registration form ). This is done as follows:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.tableName.fieldName = overridingValue
Switching salutation mode

You may also switch the salutation mode used in the labels when this is relevant for the language being used and when the labels are either available in the pi/locallang.xml file or provided by TypoScript setup. See the TypoScript Reference section.

Labels with variables

Some labels in pi/locallang.xml have names starting with 'v_'. In those labels, the following variables may be used:

%1$s : the title of the pid containing the subscriber records created by the extension;

  • %2$s : unused
  • %3$s : the name of the subscriber, combining the first, middle and last names;
  • %4$s : the email address of the subscriber;
Adding extra labels

Property extraLabels in TS setup may specify a list of extra labels that may be used in the HTML template.

The values of these labels are specified in TS setup with the same type of assignment as when overriding localized labels:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.extraLabelName = extraLabelValue

Configuration

Configuration steps

These are the steps to configuring the «Agency Registration for tt_address» plugin:

Install the extension using the Extension Manager. If not yet installed, you will be requested to install extensions Agency Registration (agency) 0.1.2+, Address List (tt_address) 2.2.0+, Static Info Tables (static_info_tables) 2.3.0+, and Static Methods since 2007 (div2007) 1.0.3+.

The extension supports the Swift Mailer API provided by TYPO3; if using TYPO3 4.5 or TYPO3 4.6, consider setting ['MAIL']['substituteOldMailAPI'] to '1' in the Install tool, if not already set. With TYPO3 4.7+ the old API is not supported anymore.

Review the configuration settings of extension Address List (tt_address).

Add the following static template to your TypoScript template: Agency Registration for tt_address .

Create a folder page that will contain the subscriber records. Set the TS template constant pid to the page id of this folder.

Create a page; insert the «Agency Registration for tt_address» plugin, setting the Display mode to Create, and setting the Record Storage Pageto the folder that will contain the subscriber records. Set the TS template constant registerPID , confirmPID and editPID to the page id of this page.

If you wish to have confirmation and/or edition on different pages, you may also create a second page, insert the «Agency Registration for tt_address» plugin, setting the Display mode to General and setting the Record Storage Page to the folder that will contain the subscriber records, and set the TS template constants confirmPID and editPID to the page id of this page.

Decide which fields you want to be included on the subscription form and, among those, which ones you want to be required in order to subscribe; using the Constant Editor TS template tool to set TS constants formFields and requiredFields .

Using the Constant Editor TS template tool, review the values of all the TS constants of the plugin. If you do not use the Constant Editor to configure the plugin, please note the possible forms of the constants assignments in the constants section of your TS template: plugin.tx_agencyttaddress. *property* = *value* and plugin.tx_agencyttaddress. *property* = *value* .

When the plugin is operating correctly, adapt the HTML template, the style sheets and the labels to the needs of your web site.

Extension configuration variables

The Extension Manager installation dialog allows you to set the following extension configuration variables:

  • Image upload folder: This is the place where the images are stored. Default is uploads/tx_agencyttaddress.
  • Use image folder: Enable the usage of imageFolder for the upload of images. Default is 0.
  • Address table: Name of the address table to be used in the backend. Default is tt_address

TypoScript Constants

Constants ( plugin.tx_ agencyttaddress )

Please note that the following properties refer to TS template constants, not TS template setup.

If you do not use the Constant Editor to configure the plugin, please note the form of the constants assignments in the constants section of your TS template: plugin.tx_ agencyttaddress . *property* = *value*

formFields

Property

formFields

Data type

string

Description

List of fields to be included on the subscription form. Should be a subset of the columns of the 'tt_address' table.

Note: If Direct Mail (direct_mail) extension is not installed, fields module_sys_dmail_category and module_sys_dmail_html are ignored (removed from the list).

Note: The default HTML template contains markers for the following fields: email, name, first_name, middle_name, last_name, date_of_birth, status, address, city, zone, static_info_country, zip, phone, fax, language, title, company, www, image, comments, module_sys_dmail_category, module_sys_dmail_html, captcha_response

Note: If field captcha_reponse is included, a captcha image will be inserted on the subscription creation and on the infomail forms.

Default

email, first_name, last_name, date_of_birth, address, city, zone, static_info_country, zip, mobile, phone, language, title, company, www, module_sys_dmail_html, module_sys_dmail_category, image, comments, hidden

requiredFields

Property

requiredFields

Data type

string

Description

List of fields that must be filled in on the subscription form. Should be a subset of the list specified on the 'formFields' property.

Note: Field captcha_response should not be set as required.

Default

email, first_name, last_name

authcodeFields

Property

authcodeFields

Data type

string

Description

Authentication code fields: the list of fields that are used in the calculation of authentication codes for delete and edit actions.

Note: Direct Mail extension uses only uid in its calculations. But the list may also be configured in the configuration of Direct Mail.

Default

uid

codeLength

Property

codeLength

Data type

int

Description

Length of the authentication codes.

Note: Direct Mail extension uses only 8 in its calculations.

Default

8

See the manual of extension Agency Registration (agency) for the documentation of the other constants.

Constants ( plugin.tx_ agencyttaddress )

Please note that the following properties refer to TS template constants, not TS template setup.

If you do not use the Constant Editor to configure the plugin, please note the form of the constants assignments in the constants section of your TS template: plugin.tx_agencyttaddress. *property* = *value*

file.attachmentFile

Property

file.attachmentFile

Data type

string

Description

File name of a file to be attached to the subscription confirmation email.

Default

EXT:agency_tt_address/pi/tx_agencyttaddress_sample.txt

HTMLMailCSS

Property

HTMLMailCSS

Data type

string

Description

File name of the HTML emails style sheet. If HTML emails are enabled, this file contains the CSS style sheet to be incorporated in these emails.

Default

EXT:agency_tt_address/pi/tx_agencyttaddress_htmlmail_xhtml.css

TypoScript Setup

When installing this extension, you should NOT use the following setting:

config.disableAllHeaderCode = 1

This setting will prevent the inclusion of Javascript essential to the correct behavior of the profile editing features.

extraLabels

Property

extraLabels

Data type

string

Description

Comma-separated list of additional labels to use in the HTML template.

See section Labels and localization about adding extra labels.

Default

None

Sending invitations

Create a page, limiting access to this page to users who will be authorized to send invitations to subscribe. Insert the Email Address Subscription plugin, setting the Display mode to 'Invite'and setting the Record Storage Pageto the folder that will contain the subscriber records.

When a subscription account is created through this page, an invitation message is sent to the email address specified on the subscription account. The invited person may accept or decline the invitation.

Using frames

If the subscription confirmation and editing pages (confirmPID and editPID) are designed to be displayed within frames, then you should add the following lines to your TS template setup:

[globalVar = TSFE:id = {$plugin.tx_agencyttaddress.confirmPID}, TSFE:id = {$plugin.tx_agencyttaddress.editPID} ]

config.page.frameReloadIfNotInFrameset = 1

config.linkVars >

config.linkVars = L,tx_agencyttaddress,fD,cmd,rU,aC

config.no_cache = 1

[global]

after setting plugin.tx_agencyttaddress.confirmPID and plugin.tx_agencyttaddress.editPID in your TS template constants.

Note that cmd, rU and aC are in the list for compatibility with the Direct mail extension.

Reducing the length of URL's

You may find that the url's sent in emails to the subscriber are too long and may be broken when using plaintext emails.

Using plain text emails and notification_email_urlmode

If you are using plaintext emails ( enableHTMLMail is set to 0), then, in your TS template setup, set config.notification_email_urlmode = 76 or config.notification_email_urlmode = all . See TSRef for information about this CONFIG setup property.

Using the short URL feature, possibly with RealURL

This approach is compatible with both HTML and plain text emails. Simply enable the feature by setting the TS constant useShortUrls = 1 in your TS template. You should also review the default value of TS constant shortUrlLife and set it to a value that fits your needs.

If you are using the RealURL extension, you should add something like the following to your RealURL configuration in the $TYPO3_CONF_VARS['EXTCONF']['realurl'] variable of localconf.php:

'postVarSets' => array(
    '_DEFAULT' => array(
        'subscribe' => array(
            array(
                'GETvar' => 'agencytta[regHash]'
            )
    )
),

Using Captcha

It is possible to activate the display of a captcha image and a text field, where the user must enter the text displayed on the image.

Extension sr_freecap must have been installed. The captcha_response field should not be specified as a required field.

Set in TS Constants:

formFields := addToList(captcha_response)

or, using the TS Constant Editor, add captcha_response to the list of fields

and in TS Setup:

plugin.tx_agencyttaddress {
  create.evalValues.captcha_response = freecap
    ## Adding captcha to the infomail form
  infomail.fields := addToList(captcha_response)
  infomail.evalValues.captcha_response = freecap
}

Silently not sending infomail to a non-subscribed email address

The plugin may be configured to silently refuse to send an infomail if the email address that was entered in not subscribed.

When this is configured, if a non-subscribed email address is entered in the infomail dialogue, the infomail is not sent, but the website visitor in not informed that the email is not subscribed and that the email is therefore not sent.

Set in TS Setup:

plugin.tx_agencyttaddress {
  email.INFOMAIL_NORECORD = 0
}

Tutorial: Adding custom fields to the subscription form

Extend the tt_address table

The simplest way to extend the tt_address table is to create a small extension that will define the required fields in the database and the TCA. Your small extension will not contain any plugin or other processing.

Extension Kickstarter is a wizard that will help you create this small extension. If not yet installed, install the extension using the Extension Manager. Once installed, you access the Kickstarter Wizard through the Extension Manager back end module. Just remember that you will not need to create any plugin or TypoScript.

Once your extension is created, install it. This will make the fields you have defined available to all other extensions.

Add the fields in the HTML template

You need to update the HTML template in order to include in the proper subparts the fields you have defined. The subparts of interest are:

###TEMPLATE_CREATE###

###TEMPLATE_CREATE_PREVIEW###

###TEMPLATE_INVITE###

###TEMPLATE_INVITE_PREVIEW###

###TEMPLATE_EDIT###

###TEMPLATE_EDIT_PREVIEW###

and perhaps some of the email subparts.

Have a look at how the pre-defined fields are included in each of the subparts, and do the same for the fields you are adding.

The HTML for a field named myNewFieldName in the CREATE, INVITE and EDIT subparts would look like:

<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->
<dt>
        <label for="agencyttaddress-myNewFieldName">###LABEL_MYNEWFIELDNAME###</label>
        <span class="agencyttaddress-required">###REQUIRED_MYNEWFIELDNAME###</span>
</dt>
<dd>
        <!-- ###SUB_ERROR_FIELD_myNewFieldName### -->
        <p class="agencyttaddress-error">###EVAL_ERROR_FIELD_myNewFieldName###</p>
        <!-- ###SUB_ERROR_FIELD_myNewFieldName### -->
        <!-- ###SUB_REQUIRED_FIELD_myNewFieldName### -->
        <p class="agencyttaddress-error">###MISSING_MYNEWFIELDNAME###</p>
        <!-- ###SUB_REQUIRED_FIELD_myNewFieldName### -->
        <input id="agencyttaddress-myNewFieldName" type="text" size="40" maxlength="50" title="###TOOLTIP_MYNEWFIELDNAME###" name="FE[tt_address][myNewFieldName]" class="agencyttaddress-text" />
</dd>
<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->

In the case of a field of type textarea, check, radio and select, the HTML for the field should rather look like the following:

<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->
<dt>
        <label for="agencyttaddress-myNewFieldName">###LABEL_MYNEWFIELDNAME###</label>
        <span class="agencyttaddress-required">###REQUIRED_MYNEWFIELDNAME###</span>
</dt>
<dd>
        <!-- ###SUB_ERROR_FIELD_myNewFieldName### -->
        <p class="agencyttaddress-error">###EVAL_ERROR_FIELD_myNewFieldName###</p>
        <!-- ###SUB_ERROR_FIELD_myNewFieldName### -->
        <!-- ###SUB_REQUIRED_FIELD_myNewFieldName### -->
        <p class="agencyttaddress-error">###MISSING_MYNEWFIELDNAME###</p>
        <!-- ###SUB_REQUIRED_FIELD_myNewFieldName### -->
        ###TCA_INPUT_myNewFieldName####
</dd>
<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->

In each PREVIEW subpart, you need to add lines like:

<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->
<dt>###LABEL_MYNEWFIELDNAME###</dt>
<dd>###FIELD_MYNEWFIELDNAME###</dd>
<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->

or

<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->
<dt>###LABEL_MYNEWFIELDNAME###</dt>
<dd>######TCA_INPUT_MYNEWFIELDNAME###</dd>
<!-- ###SUB_INCLUDED_FIELD_myNewFieldName### -->

Modify the TS template Constants and Setup

Using the Constant Editor, modify the value of the following constants of plugin tx_agencyttaddress:

formFields : add to the list of fields the names of the fields that you have defined and that you want to be displayed in the front end subscription form; if the field is not in this list the subpart

<!--###SUB_INCLUDED_FIELD_ myNewFieldName ###--> will be deleted;

requiredFields : add to the list of fields the names of the fields that you have defined and that you want to be treated as required fields; if the field is not in the list OR if the field is in this list and is correctly filled, the subpart

<!--###SUB_REQUIRED_FIELD_ myNewFieldName ###--> will be deleted.

You may also specify in the TS template Setup some default values and validation rules to be applied by the extension to the additional fields.

If there are no validation rules, you should set:

plugin.tx_agencyttaddress.create.evalValues.myNewFieldName =

If your field is a select field and if you wish to enable multiple selection, you should also set:

plugin.tx_agencyttaddress.parseValues.myNewFieldName  = multiple

Add the language labels for the new fields

The language labels for the additional database fields should be added in Step1 above. These will be used by the back end forms.

The language labels used by the front end plugin should be added in the TS template setup using the method described in section Localization of this document. For each language of interest to you with languageCode , you may need the following statements for each additional field with myNewFieldName :

the basic field label:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.myNewFieldName = myNewFieldLabel

the message displayed when the field is required but missing:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.missing_myNewFieldName = missingRequiredFieldMessage

same as previous but for the invitation form:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.missing_invitation_myNewFieldName = missingRequiredFieldMessageOnInvitationForm

the message displayed when a validation rule evalRuleName applicable to the field is not satisfied:

plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.evalErrors_evalRuleName_myNewFieldName = errorMessageForEvalRule

Add the hook for $TCA

TYPO3 does not read in the $TCA modified in your extension. Therefore agency_tt_address has a hook which takes care that the files ext_tables.php of your extension are read in and its result will be added to the $TCA for the table tt_address also in the front end.

Put this line into the file ext_localconf.php of your extension mynewext (create it, if it does not exist):

if (TYPO3_MODE == 'FE') {
        $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['agency_tt_address']['extendingTCA'][] = 'mynewext';
}