.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt ======================================== 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: 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, 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 .. _Table-of-Contents: Table of Contents ----------------- `EXT: Agency Registration for tt\_address 1 <#__RefHeading__2180_116188488>`_ **`Introduction 3 <#__RefHeading__2182_116188488>`_** `What does it do? 3 <#__RefHeading__2184_116188488>`_ `What's new in Version 0 3 <#__RefHeading__6065_221449167>`_ `Requirements 3 <#__RefHeading__6381_1627904414>`_ `Support 3 <#__RefHeading__2188_116188488>`_ `Credits 3 <#__RefHeading__2190_116188488>`_ **`Administration 4 <#__RefHeading__2198_116188488>`_** `Migration from sr\_email\_subscribe 4 <#__RefHeading__9744_1422146781>`_ `Front End Rendering 5 <#__RefHeading__9748_1422146781>`_ `Localization 7 <#__RefHeading__2202_116188488>`_ **`Configuration 9 <#__RefHeading__2204_116188488>`_** `Configuration steps 9 <#__RefHeading__2206_116188488>`_ `Extension configuration variables 9 <#__RefHeading__2210_116188488>`_ `TypoScript Constants 9 <#__RefHeading__2212_116188488>`_ `TypoScript Setup 10 <#__RefHeading__2214_116188488>`_ `Sending invitations 11 <#__RefHeading__2218_116188488>`_ `Using frames 11 <#__RefHeading__2220_116188488>`_ `Reducing the length of URL's 11 <#__RefHeading__2222_116188488>`_ `Using Captcha 11 <#__RefHeading__4754_738236175>`_ `Silently not sending infomail to a non-subscribed email address 12 <#__RefHeading__1289_929537368>`_ **`Tutorial: Adding custom fields to the subscription form 13 <#__RefHeading__2224_116188488>`_** `Extend the tt\_address table 13 <#__RefHeading__2226_116188488>`_ `Add the fields in the HTML template 13 <#__RefHeading__2228_116188488>`_ `Modify the TS template Constants and Setup 14 <#__RefHeading__2230_116188488>`_ `Add the language labels for the new fields 14 <#__RefHeading__2232_116188488>`_ `Add the hook for $TCA 14 <#__RefHeading__1214_563545228>`_ **`Change Log 16 <#__RefHeading__2238_116188488>`_** .. _Introduction: Introduction ------------ .. _What-does-it-do: 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: What's new in Version 0 ^^^^^^^^^^^^^^^^^^^^^^^ Version 0: Created as a fork of the extension sr\_email\_subscribe 2.0.0 .. _Requirements: 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: 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: 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: Administration -------------- .. _Migration-from-sr-email-subscribe: 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: Front End Rendering ^^^^^^^^^^^^^^^^^^^ .. _HTML-Template: HTML Template """"""""""""" The default HTML template provided with the plugin is: :: EXT:agency_tt_address/pi/tx_agencyttaddress_css_tmpl.html .. _CSS-Styles: 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: 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: Localization ^^^^^^^^^^^^ .. _Language-files: 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: 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: 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 <#0.0.Tutorial:%20A dding%20fields%20to%20the%20registration%20form%7Coutline>`_ ). This is done as follows: :: plugin.tx_agencyttaddress._LOCAL_LANG.languageCode.tableName.fieldName = overridingValue .. _Switching-salutation-mode: 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: 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: 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 ------------- .. _Configuration-steps: 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: 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: TypoScript Constants ^^^^^^^^^^^^^^^^^^^^ .. _Constants-plugin-tx-agencyttaddress: 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*** .. ### BEGIN~OF~TABLE ### .. _formFields: formFields ~~~~~~~~~~ .. container:: table-row 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: requiredFields ~~~~~~~~~~~~~~ .. container:: table-row 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: authcodeFields ~~~~~~~~~~~~~~ .. container:: table-row 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: codeLength ~~~~~~~~~~ .. container:: table-row Property codeLength Data type int Description Length of the authentication codes. Note: Direct Mail extension uses only 8 in its calculations. Default 8 .. ###### END~OF~TABLE ###### See the manual of extension Agency Registration (agency) for the documentation of the other constants. .. _Constants-plugin-tx-agencyttaddress: 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*** .. ### BEGIN~OF~TABLE ### .. _file-attachmentFile: file.attachmentFile ~~~~~~~~~~~~~~~~~~~ .. container:: table-row 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: HTMLMailCSS ~~~~~~~~~~~ .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _TypoScript-Setup: 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. .. ### BEGIN~OF~TABLE ### .. _extraLabels: extraLabels """"""""""" .. container:: table-row 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 .. ###### END~OF~TABLE ###### .. _Sending-invitations: 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: 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: 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: 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: 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: 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: 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: Tutorial: Adding custom fields to the subscription form ------------------------------------------------------- .. _Extend-the-tt-address-table: 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: 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: ::
###REQUIRED_MYNEWFIELDNAME###

###EVAL_ERROR_FIELD_myNewFieldName###

###MISSING_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: ::
###REQUIRED_MYNEWFIELDNAME###

###EVAL_ERROR_FIELD_myNewFieldName###

###MISSING_MYNEWFIELDNAME###

###TCA_INPUT_myNewFieldName####
In each PREVIEW subpart, you need to add lines like: ::
###LABEL_MYNEWFIELDNAME###
###FIELD_MYNEWFIELDNAME###
or ::
###LABEL_MYNEWFIELDNAME###
######TCA_INPUT_MYNEWFIELDNAME###
.. _Modify-the-TS-template-Constants-and-Setup: 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 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 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: 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: 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'; } .. _Change-Log: Change Log ---------- See: `http://forge.typo3.org/projects/extension- agency\_tt\_address/repository/entry/trunk/ChangeLog `_ 16 .. ######CUTTER_MARK_IMAGES###### .. |img-1| image:: img-1.png .. :align: left .. |img-2| image:: img-2.png .. :border: 0 .. :height: 21 .. :hspace: 9 .. :id: Grafik2 .. :name: Grafik2 .. :width: 87 .. |img-3| image:: img-3.png .. :align: left .. :border: 0 .. :height: 218 .. :id: Grafik1 .. :name: Grafik1 .. :width: 368 .. |img-4| image:: img-4.png .. :align: left .. :border: 0 .. :height: 118 .. :id: Grafik3 .. :name: Grafik3 .. :width: 250