Hallo!
Ich möchte eines meiner Projekte mit der Extension direct_mail versehen. (Sorry, hab vergessen direct_mail im Titel zu erwähnen, vielleicht könnt ihr das umbenennen!) Dazu brauche ich auch tt_address und direct_mail_subscription. Ich habe diese Erweiterungen in folgender Reihenfolge mit in den genannten Versionen installiert:
* tt_address 2.2.1
* direct_mail 2.6.0
* direct_mail_subscription 1.1.0
* TYPO3 ist in der Version 4.2.3 installiert
Wenn ich einen neuen Eintrag über direct_mail_subscription in tt_address hinzufügen lasse, funktioniert das, nur der Haken für die HTML E-Mails findet keine Beachtung und wird nicht in die Datenbank übernommen.
Das gleiche beim Ändern des Profils: Weder wird der Haken richtig ausgelesen und angezeigt noch kann ich ihn ändern. (Die "1" im Feld module_sys_dmail_html hatte ich für diesen Test mit phpMyAdmin direkt in der Datenbank erzeugt.)
Warum das? Weil ich auch als Backend Admin, wenn ich einen tt_address-Eintrag zum Bearbeiten öffne, kein Feld für module_sys_dmail_html angezeigt bekomme. Das soll so mit Sicherheit auch nicht sein. Damit hätte ich beim manuellen Eintragen eines Newsletter-Abonnenten keine Kontrolle über diese Einstellung.
Das direct_mail_subscription Template habe ich ins Deutsche übersetzt und so angepasst, dass es Vor- und Nachname in die entsprechenden Felder von tt_address schreibt. Das erschien mir sinnvoll nachdem das kombinierte Namensfeld nicht mehr "State of the Art" ist. Dieses ist übrigens im tt_address Setup deaktiviert.
Zu meiner Schande muss ich gestehen, dass ich das Root TS Template nicht selbst geschrieben hab. Ich hab mich da inspirieren lassen und es an meine Bedürfnisse angepasst. Trotzdem gibt es noch einige Zeilen deren Bedeutung mir nicht 100%-ig klar sind... #paralyzed#
Ich wäre für jede Anregung dankbar! #angry#
Gruß Bernhard
Ein Auszug aus meiner direct_mail_subscription Template Datei:
<!-- ###TEMPLATE_CREATE### begin
Form for creation of a new newsletter recipient
-->
<form name="tt_address_form" method="post" action="###FORM_URL###">
###GW1B###Abonnieren Sie unseren Newsletter###GW1E###
###GW2B###
<!--###SUB_REQUIRED_FIELD_first_name### begin
This is shown only if the form is submitted and the field is configured to be "required" and at the same time not filled in.
The syntax is of the comment 'name' is: SUB_REQUIRED_FIELD_[enter-the-field-name-here]
-->
<div class="error">Sie müssen dieses Feld ausfüllen!</div>
<!--###SUB_REQUIRED_FIELD_first_name### end -->
<div class="dms-field"><label>Vorname*</label><input type="text" name="FE[tt_address][first_name]" /></div>
<!--###SUB_REQUIRED_FIELD_last_name### begin
This is shown only if the form is submitted and the field is configured to be "required" and at the same time not filled in.
The syntax is of the comment 'name' is: SUB_REQUIRED_FIELD_[enter-the-field-name-here]
-->
<div class="error">Sie müssen dieses Feld ausfüllen!</div>
<!--###SUB_REQUIRED_FIELD_last_name### end -->
<div class="dms-field"><label>Nachname*</label><input type="text" name="FE[tt_address][last_name]" /></div>
<!--###SUB_REQUIRED_FIELD_email### begin
Same as above...
EVAL_ERROR_FIELD_email is in addition an error message defined in TypoScript in case an email address does not verify to be of correct syntax.
-->
<div class="error">Sie müssen dieses Feld ausfüllen!<br />###EVAL_ERROR_FIELD_email###</div>
<!--###SUB_REQUIRED_FIELD_email### end-->
<div class="dms-field"><label>E-Mail*</label><input type="text" name="FE[tt_address][email]" /></div>
###CE_CATLIST###
<div class="dms-field"><label>HTML E-Mails?</label><input class="dms-check" type="checkbox" name="FE[tt_address][module_sys_dmail_html]" value="1" /></div>
<div class="dms-field"><input type="submit" name="whatever" value="Abonnieren" class="dms-button" /><input type="submit" name="whatever" value="Abbrechen" onclick="document.forms[0].action='###BACK_URL###';" class="dms-button" /></div>
###HIDDENFIELDS###
</form>
<p>Sie haben bereits unseren Newsletter abonniert und möchten sich <a href="###FORM_URL###&cmd=infomail&backURL=###FORM_URL_ENC###">abmelden oder Ihr Profil bearbeiten? Klicken Sie hier!</a></p>
###GW2E###
<!-- ###TEMPLATE_CREATE### end-->
<!-- ###TEMPLATE_EDIT### begin
This is the form used to edit the existing users.
The form works with non-logged in users based on email-verification
-->
<form name="tt_address_form" method="post" action="###FORM_URL###">
###GW1B###Profil bearbeiten###GW1E###
###GW2B###
<!-- ###SUB_REQUIRED_FIELDS_WARNING### begin
This is a general warning about incorrectly filled in fields.
-->
<div class="error">Einige der erforderlichen Felder sind nicht korrekt ausgefüllt.</div>
<!-- ###SUB_REQUIRED_FIELDS_WARNING### end -->
<!--###SUB_REQUIRED_FIELD_first_name### begin
This is shown only if the form is submitted and the field is configured to be "required" and at the same time not filled in.
The syntax is of the comment 'name' is: SUB_REQUIRED_FIELD_[enter-the-field-name-here]
-->
<div class="error">Sie müssen dieses Feld ausfüllen!</div>
<!--###SUB_REQUIRED_FIELD_first_name### end -->
<div class="dms-field"><label>Vorname*</label><input type="text" name="FE[tt_address][first_name]" /></div>
<!--###SUB_REQUIRED_FIELD_last_name### begin
This is shown only if the form is submitted and the field is configured to be "required" and at the same time not filled in.
The syntax is of the comment 'name' is: SUB_REQUIRED_FIELD_[enter-the-field-name-here]
-->
<div class="error">Sie müssen dieses Feld ausfüllen!</div>
<!--###SUB_REQUIRED_FIELD_last_name### end -->
<div class="dms-field"><label>Nachname*</label><input type="text" name="FE[tt_address][last_name]" /></div>
<!--###SUB_REQUIRED_FIELD_email### begin
Same as above...
EVAL_ERROR_FIELD_email is in addition an error message defined in TypoScript in case an email address does not verify to be of correct syntax.
-->
<div class="error">Sie müssen dieses Feld ausfüllen!<br />###EVAL_ERROR_FIELD_email###</div>
<!--###SUB_REQUIRED_FIELD_email### end-->
<div class="dms-field"><label>E-Mail*</label><input type="text" name="FE[tt_address][email]" /></div>
###CE_CATLIST###
<div class="dms-field"><label>HTML E-Mails?</label><input class="dms-check" type="checkbox" name="FE[tt_address][module_sys_dmail_html]" value="1" /></div>
<div class="dms-field"><input type="Submit" name="whatever" value="Update" class="dms-button" /></div>
###HIDDENFIELDS###
</form>
<p>Klicken Sie hier, um Ihr <a href="###FORM_URL###&rU=###REC_UID###&aC=###AUTH_CODE###&cmd=delete">Abonnement zu löschen!</a></p>
###GW2E###
<!-- ###TEMPLATE_EDIT### end-->
Ein Auszug aus meinen Root Constants und meinem TS Root Setup:
# ROOT LEVEL CONSTANTS
# EXT: Direct Mail Subscription
plugin.feadmin.dmailsubscription.file.templateFile = fileadmin/templates/direct_mail_subscription.html
plugin.feadmin.dmailsubscription.pid = 19
plugin.feadmin.dmailsubscription.email = newsletter@[...]
plugin.feadmin.dmailsubscription.emailName = Newsletter
plugin.feadmin.dmailsubscription.wrap2 = <div class="dms"> | </div>
plugin.feadmin.dmailsubscription.wrap1 = <h3> | </h3>
# ROOT LEVEL TYPOSCRIPT SETUP
# EXT: DIRECT MAIL SUBSCRIPTION
includeLibs.directmailsubscribe = EXT:direct_mail_subscription/pi/class.dmailsubscribe.php
plugin.feadmin.dmailsubscription >
plugin.feadmin.dmailsubscription = USER_INT
plugin.feadmin.dmailsubscription {
userFunc = user_feAdmin->init
includeLibs = media/scripts/fe_adminLib.inc
templateFile ={$plugin.feadmin.dmailsubscription.file.templateFile}
cObjects {
CATLIST = USER
CATLIST.userFunc = user_dmailsubscribe->makeCheckboxes
CATLIST {
templateFile = {$plugin.feadmin.dmailsubscription.file.templateFile}
pid = {$plugin.feadmin.dmailsubscription.pid}
hideNonTranslatedCategories = 0
}
}
create.userFunc_afterSave = user_dmailsubscribe->saveRecord
# Global wraps
wrap1.wrap = {$plugin.feadmin.dmailsubscription.wrap1}
wrap2.wrap = {$plugin.feadmin.dmailsubscription.wrap2}
color1.wrap = {$plugin.feadmin.dmailsubscription.color1}
color2.wrap = {$plugin.feadmin.dmailsubscription.color2}
color3.wrap = {$plugin.feadmin.dmailsubscription.color3}
# Tables + Commands
table = tt_address
# Info-mail setup
setfixed=1
setfixed.approve {
_FIELDLIST = uid
hidden = 0
}
setfixed.DELETE = 1
setfixed.DELETE._FIELDLIST = uid
delete = 1
defaultCmd=create
# Info-mail setup
infomail = 1
infomail.default {
label = FORGOTPASSWORD
}
# Edit setup
edit = 1
edit.fields = first_name, last_name, email, module_sys_dmail_html
edit.required = first_name, last_name, email
edit.evalValues {
email = uniqueLocal, email
}
# Create setup
create = 1
create.preview = 0
create.fields = first_name, last_name, hidden, email, module_sys_dmail_html
create.required = first_name, last_name, email
create.noSpecialLoginForm = 1
#create.defaultValues.module_sys_dmail_html = 1
# Initially hide the user until he approves!
create.overrideValues.hidden = 1
create.evalValues {
email = uniqueLocal, email
}
authcodeFields = uid
authcodeFields.addKey =
authcodeFields.addDate =
evalErrors.email.uniqueLocal = Offenbar sind Sie bereits mit dieser E-Mail-Adresse registriert.
evalErrors.email.email = Dies ist keine gültige E-Mail-Adresse!
parseValues.module_sys_dmail_category = checkArray,setEmptyIfAbsent
parseValues.module_sys_dmail_html = setEmptyIfAbsent
pid = {$plugin.feadmin.dmailsubscription.pid}
email.from = {$plugin.feadmin.dmailsubscription.email}
email.fromName = {$plugin.feadmin.dmailsubscription.emailName}
email.admin = {$plugin.feadmin.dmailsubscription.email}
email.field = email
}
Mein TS Setup des Newsletter Ordners:
page = PAGE
page.headerData.10 = TEXT
page.headerData.10.value (
<style type="text/css">
* {margin:0; padding:0;}
body {background: #eee;}
div#main {padding: 12px;}
</style>
)
page.bodyTag = <body>
page.10 < styles.content.get
page.10.wrap = <div id="main"> | </div>