CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Overview

  1. Shows a small subscription box where users can subscribe to dmail categories.
  2. If no fe_user exists, a hidden tt_address record will be created. Otherwise dmail categories of fe_user gets updatet after step 3
  3. Send a confirmation mail. The user has to confirm/decline his subscription. (tt_address record will be "visible", fe_user record gets update in DB)
  4. Unsubscribe via link in the newsletter
  5. Works with Typo3 4.5 and 4.6

Specials

  • Whenever a fe_user is created by sr_feuserregister or manually in Backend, the extension will check if a tt_address with the same email address already exists. If so, it will delete the tt_address entry (adjustable by TS) ... this way you will have only ONE record per user and no duplicated Newsletter recipients!
  • Compatible with commerce address management
  • Extbase/Fluid flexibility

Tutorial

  1. Install the Extension via EM, check if settings in EM are ok for you
  2. add "sni_newsletter_subscription" to "Include static TS (from extensions)" in your TS-Template
  3. Create a SysFolder (X) where you want to store the subscriptions
  4. Go to EM and set deleteDuplicateAddressPid to X (the newly created page)
  5. In your TS-Setup add this;
    plugin.tx_sninewslettersubscription {
        persistence.classes.Tx_SniNewsletterSubscription_Domain_Model_TtAddress.newRecordStoragePid = X
        persistence.storagePid = X
        settings {
            # Mail settings for confirmation mail;
            siteName = 
            fromMail = 
            fromName = 
            # pid of dmail categories
            module_sys_dmail_category_PIDLIST = 
        }
    }
    
  6. If you want to adjust HTML/EMAIL Templates copy the folder PATH/TO/YOUR/INSTALLATION/typo3conf/ext/sni_newsletter_subscription/Resources/Private/Templates to e.g. fileadmin/templates/newsletterSubscription and add to TS-Setup:
    plugin.tx_sninewslettersubscription.view.templateRootPath = fileadmin/templates/newsletterSubscription/
    

    ... now you can edit the templates ...
  7. insert the registration plugin (via create new content element or directly via TS -- see FAQ below) on any page you like.
  8. Note: you need at least 1 direct_mail category otherwise users can not confirm their subscription!
  9. If you want you can put an "unsubscribe link" in the newsletter template (see FAQ)

FAQ

  • How to insert the plugin via TS?
    This is extbase specific. You can do it like this;
    page.10.subparts.NEWSLETTERBOX = USER
    page.10.subparts.NEWSLETTERBOX {
        userFunc = tx_extbase_core_bootstrap->run
        extensionName = SniNewsletterSubscription
        pluginName = Subscr
    }
    

    (see [[http://forge.typo3.org/projects/typo3v4-mvc/wiki/Dispatcher_rework]]
  • What if i don't want to use dmail_categories?
    You can do this, but nevertheless you have to create at least one dmail_category. Then you can hide the category by editing the template file Subscr/New.html. Delete in that file the part which generates the category checkboxes. Instead of the checkbox part add this;
    ...
    <f:form.hidden name="moduleSysDmailCategory[UidOfCategory]" value="UidOfCategory" />
    ...
    

    Of course you have to substitue UidOfCategory with the real uid of the category.
  • Can user unsubscribe the newsletter?
    Yes they can, via a link in the newsletter mail. The link has to point to a page where the Newsletter Subscription plugin is available and it must contain some special parameters. You could create the link via TS;
    NL = PAGE
    ...
    NL.marks.UNSUBSCRIBE = TEXT
    NL.marks.UNSUBSCRIBE {
      wrap = <a href="/index.php?id=14&w=d&t=###SYS_TABLE_NAME###&u=###USER_uid###&a=###SYS_AUTHCODE###">|</a>
      value = Unsubscribe from our newsletter
    }
    

    Of course you have to insert this marker then in your newsletter (direct_mail) template file
    Note 1: in this example we assume that the Newsletter Subscription plugin is installed on page with uid:14!
    Note 2: mod.web_modules.dmail.authcode_fieldList has to be "uid" (default setting)