Anleitung Newsletter bei Anmeldung

© 2008 Estelco

(no warranty) released under GPL

1. BACKUP MACHEN!!!

2. Anpassungen für Dateien:

create_account.php

ca. Zeile 48
require_once (DIR_FS_INC.'xtc_write_user_info.inc.php');
danach einfügen
require_once (DIR_FS_INC.'xtc_random_charcode.inc.php');
ca. Zeile 75
$newsletter = '0';
ändern in
$newsletter = xtc_db_prepare_input($_POST['newsletter']);
ca. Zeile 338
    $smarty->caching = 0;
davor einfügen
    if ($newsletter) {
      $vlcode = xtc_random_charcode(32);
      $link = xtc_href_link(FILENAME_NEWSLETTER, 'action=activate&email='.$email_address.'&key='.$vlcode, 'NONSSL');
      $sql_data_array = array ('customers_email_address' => xtc_db_input($email_address), 'customers_id' => xtc_db_input($_SESSION['customer_id']), 'customers_status' => xtc_db_input($_SESSION['customers_status']['customers_status_id']), 'customers_firstname' => xtc_db_input($firstname), 'customers_lastname' => xtc_db_input($lastname), 'mail_status' => '0', 'mail_key' => xtc_db_input($vlcode), 'date_added' => 'now()');
      xtc_db_perform(TABLE_NEWSLETTER_RECIPIENTS, $sql_data_array);
      // assign vars
      $smarty->assign('LINK', $link);
    } else {
      $smarty->assign('LINK', false);
    }
ca. Zeile 395
$smarty->assign('INPUT_EMAIL', xtc_draw_input_fieldNote(array ('name' => 'email_address', 'text' => ' '. (xtc_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? ''.ENTRY_EMAIL_ADDRESS_TEXT.'' : ''))));
danach einfügen
$smarty->assign('INPUT_NEWSLETTER', xtc_draw_checkbox_field('newsletter', '1', true));

lang/SPRACHE/lang_SPRACHE.conf

suchen nach
[create_account]
danach einfügen
text_newsletter = 'Newsletter:'

templates/TEMPLATE/module/create_account.txt

suchen nach
  <tr>
    <td class="main">{#text_email#}</td>
    <td class="inputRequirement">{$INPUT_EMAIL}</td>
  </tr>
danach einfügen
  <tr>
    <td class="main">{#text_newsletter#}</td>
    <td class="inputRequirement">{$INPUT_NEWSLETTER}</td>
  </tr>

templates/TEMPLATE/mail/english/create_account_mail.html

{if $LINK}
<table  width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Thank
        you for subscribing our newsletter. <br>
        Please you click on the activation link to activate this service. If you
        should <br>
        not have registered yourselves in newsletter and/or the receipt of the
        Newsletters <br>
        is not wanted, we wish you to do nothing. Your address is then deleted
        automatically <br>
        with the next actualization of the data base.
      <table width="100%"  border="0" bgcolor="f1f1f1">
    <tr>
          <td><b>Your activation-link:<br>
            </b>><a href="{$LINK}">{$LINK}</a>
      </td>
    </tr>
  </table></font></td>
  </tr>
</table>
{/if}

templates/TEMPLATE/mail/english/create_account_mail.txt

{if $LINK}Thank you for for subscribing our newsletter.

You receive this Mail because you want to receive our newsletter.
Please you click on the activation link to activate this service. If you should
not have registered yourselves in newsletter and/or the receipt of the Newsletters
is not wanted, we wish you to do nothing. Your address is then deleted automatically
with the next actualization of the data base.

Your activation-link:
{$LINK}{/if}

templates/TEMPLATE/mail/german/create_account_mail.html

an der gewünschten Stelle einfügen
{if $LINK}
<table  width="100%" border="0" align="center" cellpadding="4" cellspacing="0">
  <tr>
    <td><p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Vielen Dank für die Anmeldung zu unseren Newsletter.</b></p>
Bitte klicken Sie auf den Aktivierungslink damit Ihre Mailadresse für den Newsletterempfang freigeschalten wird.
Sollten Sie sich nicht in unserern Newsletter eingetragen haben bzw. den Empfang des Newsletters nicht wünschen bitten wir Sie gar nichts zu tun.
Ihre Adresse wird dann bei der nächsten Aktualisierung der Datenbank automatisch gelöscht.
      <table width="100%"  border="0" bgcolor="f1f1f1">
    <tr>
      <td><b>Ihr Aktivierungslink:<br></b>><a href="{$LINK}">{$LINK}</a>
      </td>
    </tr>
  </table></font></td>
  </tr>
</table>
{/if}

templates/TEMPLATE/mail/german/create_account_mail.txt

an der gewünschten Stelle einfügen
{if $LINK}Vielen Dank für die Anmeldung zu unseren Newsletter.

Sie erhalten diese Mail weil Sie unseren Newsletter empfangen möchten.
Bitte klicken Sie auf den Aktivierungslink damit Ihre Mailadresse für den Newsletterempfang freigeschalten wird.

Sollten Sie sich nicht in unserern Newsletter eingetragen haben bzw. den Empfang des Newsletters nicht wünschen
bitten wir Sie garnichts zu tun. Ihre Adresse wird dann bei der nächsten Aktualisierung der Datenbank automatisch gelöscht.

Ihr Aktivierungslink:
{$LINK}{/if}