Frontenduser - Newsletter - Kombi + individuelle Profildaten
-
- Beiträge: 71
- Registriert: Do 3. Nov 2005, 15:01
- Wohnort: Ulm
- Kontaktdaten:
hi
der Link dürfte jetzt wieder gehen...ist mir doch glatt der Ordner abhanden gekommen beim letzten Webseite Redesign.
Eine Doku hab ich aber selbst nicht wirklich. Komme irgendwie garnicht dazu...vielleicht lässt sichs realisieren wenn der nächste Kunde das in ähnlicher Form mal wieder braucht.
der Link dürfte jetzt wieder gehen...ist mir doch glatt der Ordner abhanden gekommen beim letzten Webseite Redesign.
Eine Doku hab ich aber selbst nicht wirklich. Komme irgendwie garnicht dazu...vielleicht lässt sichs realisieren wenn der nächste Kunde das in ähnlicher Form mal wieder braucht.
Media in Vita - Medienagentur
Webdesign, Programmierung, Design
Webdesign, Programmierung, Design
I'm not familiar with all the details of this package. But this should be possible.
Generate the groups; configure the newsletter handler or form article to use user selected groups and select these groups.
Now the difficult part begins:
Take a look into the now final form article (on the webpage). You should get a select field containing the groups. Take a look into the HTML. Note the id of each group and the name of the select field.
Change the form template (this is the easiest way) and remove the {GROUPS} part and replace just by.
Copy the module template (new module template + cut + paste) and change the id.
Clone the form module. Change the name of the template to the new one.
Now you have to form modules. Specify these modules in the article templates as needed and assign the templates to the articles/categories. -
If someone uses the article with the first module, he/she will get joined to the first group; if someone uses the other article with second module, he/she will get joined to the second group (so we have multiple join modules, but only one handler [and only one handler article, as it is not possible to use more than one]).
There are some glitches: If someone has joined, he/she can't join again (e.g. if he/she also likes to get joined to the second group).
It is possible to manipulate the id - so someone may join to the other group, if he/she knows the correct group id.
Regards,
HerrB
Note: If you don't get a selectbox if you have specified and activated user selected groups, than the module template may have been changed and the {GROUPS} is not available anymore. This is no problem, but then you have to take a look into the module output code window to get the information, how the select field would have been named. Additionally, you have to take a look into the Extras -> Newsletter -> Groups and the links to select a group to get the id.
Generate the groups; configure the newsletter handler or form article to use user selected groups and select these groups.
Now the difficult part begins:
Take a look into the now final form article (on the webpage). You should get a select field containing the groups. Take a look into the HTML. Note the id of each group and the name of the select field.
Change the form template (this is the easiest way) and remove the {GROUPS} part and replace just by
Code: Alles auswählen
<input type="hidden" name="<Name of the select element>" value="<One of the ids>" />
Copy the module template (new module template + cut + paste) and change the id.
Clone the form module. Change the name of the template to the new one.
Now you have to form modules. Specify these modules in the article templates as needed and assign the templates to the articles/categories. -
If someone uses the article with the first module, he/she will get joined to the first group; if someone uses the other article with second module, he/she will get joined to the second group (so we have multiple join modules, but only one handler [and only one handler article, as it is not possible to use more than one]).
There are some glitches: If someone has joined, he/she can't join again (e.g. if he/she also likes to get joined to the second group).
It is possible to manipulate the id - so someone may join to the other group, if he/she knows the correct group id.
Regards,
HerrB
Note: If you don't get a selectbox if you have specified and activated user selected groups, than the module template may have been changed and the {GROUPS} is not available anymore. This is no problem, but then you have to take a look into the module output code window to get the information, how the select field would have been named. Additionally, you have to take a look into the Extras -> Newsletter -> Groups and the links to select a group to get the id.
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Hallo erstmal
Jetzt ist es soweit ich habs kaputt gespielt. Lief alles Bestens aber jetzt
1. Nach der Anmeldung ist bei allen Benutzername = sysadmin
Woran kann das liegen?
2. Die Löschmodul funktioniert nicht mehr.
Ich denke das liegt auch an 1.
Bin gerade völlig ratlos wo ich noch suchen kann. Wer schön wenn mir jemand helfen könnte.
1. Nach der Anmeldung ist bei allen Benutzername = sysadmin
Woran kann das liegen?
2. Die Löschmodul funktioniert nicht mehr.
Ich denke das liegt auch an 1.
Bin gerade völlig ratlos wo ich noch suchen kann. Wer schön wenn mir jemand helfen könnte.
Was hast Du denn geändert?
Gruß
HerrB
Gruß
HerrB
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
Das Output-Modul, das hier im rar-Archiv drinsteckt hat einige Bugs (s. Diskussion des Newsletter-Threads von HerrB).
hier mal die aktualisierte Version, damit lüppt es zumindest bei mir:
Output Handler-Modul
hier mal die aktualisierte Version, damit lüppt es zumindest bei mir:
Output Handler-Modul
Code: Alles auswählen
<?php
cInclude("classes", "class.newsletter.recipients.php");
cInclude("classes", "class.newsletter.php");
cInclude("classes", "class.frontend.users.php");
cInclude("classes", "class.phpmailer.php");
$objProperties = new PropertyCollection;
$objRecipients = new RecipientCollection;
$strMessage = " ";
$arrSettings = array();
$arrSettings["JoinSel"] = $objProperties->getValue("clientsetting", $client, "newsletter", "joinsel");
$arrSettings["JoinMultiple"] = $objProperties->getValue("clientsetting", $client, "newsletter", "joinmultiple");
$arrSettings["JoinGroups"] = $objProperties->getValue("clientsetting", $client, "newsletter", "joingroups");
$arrSettings["FrontendLink"] = $objProperties->getValue("clientsetting", $client, "newsletter", "frontendlink");
$arrSettings["FrontendConfirm"] = "CMS_VALUE[5]";
$arrSettings["FrontendDel"] = "CMS_VALUE[6]";
$arrSettings["SenderEMail"] = "CMS_VALUE[7]";
// Setting default values
if ($arrSettings["JoinSel"] == "" || $arrSettings["JoinGroups"] == "") {
$arrSettings["JoinSel"] = "Default";
}
if ($arrSettings["FrontendConfirm"] == "") {
$arrSettings["FrontendConfirm"] = "ActivateUser";
}
if ($arrSettings["FrontendDel"] == "") {
$arrSettings["FrontendDel"] = "DeleteUser";
}
if ($action == "subscribe") {
if (!isset($email) || !$email) {
$strMessage = mi18n("Please specify an e-mail address.");
} elseif (!isValidMail($email)) {
$strMessage = mi18n("Please specify a valid e-mail address.");
} elseif ($objRecipients->emailExists($email)) {
$strMessage = mi18n("This e-mail address has been already registered for the newsletter.");
} elseif (!isset($Nachname) || !$Nachname ) {
$strMessage = mi18n("Please specify a valid surname.");
} elseif (!isset($Vorname) || !$Vorname ) {
$strMessage = mi18n("Please specify a valid name.");
} else {
$email = ereg_replace("\n", "", $email);
$email = ereg_replace("\r", "", $email);
unset($recipient);
/* Analyze group specification */
switch ($arrSettings["JoinSel"]) {
case "Selected":
$recipient = $objRecipients->create($email, $emailname, 0, $arrSettings["JoinGroups"]);
break;
case "UserSelected":
$intSelCount = count($GroupSel);
if ($intSelCount == 0) {
$recipient = $objRecipients->create($email,$emailname); // No group selected
} else {
if ($intSelCount > 1 && $arrSettings["JoinMultiple"] != "enabled") {
$strMessage = mi18n("Please select one group, only.");
} else {
/* Recipient wants to join special groups */
$arrGroups = explode(",",$arrSettings["JoinGroups"]);
/* Check, if received data is valid and matches the group selection */
$blnError = false;
foreach ($GroupSel as $join) {
if (!is_numeric($join) || !in_array($join, $arrGroups)) {
$blnError = true;
break;
}
}
if ($blnError) {
$strMessage = mi18n("There was an error processing your request. Please ask the webmaster for help.");
} else {
$recipient = $objRecipients->create($email, $emailname, 0, implode(",",$GroupSel));
}
}
}
break;
default:
$recipient = $objRecipients->create($email,$emailname);
}
if ($recipient) {
$mail = new phpmailer();
$blackboxidcatart = $objProperties->getValue("clientsetting", $client, "Newsletter", "idcatart");
$body = mi18n("txtMailSubscribe")."\n".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?changelang=".$lang."&idcatart=".$blackboxidcatart."&confirm=".$recipient->get("hash")."\n\n";
$mail->From = $arrSettings["SenderEMail"];
$mail->FromName = $arrSettings["SenderEMail"];
$mail->AddAddress($email);
$mail->Mailer = "mail";
$mail->Subject = mi18n("Newsletter: Confirmation");
$mail->Body = $body;
// $mail->AltBody = $body;
if($mail->Send()) {
// if (mail("$email", mi18n("Newsletter: Confirmation"), "$body", 'From: '.$arrSettings["SenderEMail"]."\n"."X-Mailer: Contenido [PHP/" . phpversion()."]")) {
$strMessage = mi18n("Dear subscriber,<br>your e-mail address is now subscribed for our newsletter. You will now receive an e-mail asking you to confirm your subscription.");
if ($arrSettings["FrontendLink"] == "enabled") {
$frontendusers = new FrontendUserCollection;
if (!$frontendusers->userExists($email)) {
if ($frontenduser = $frontendusers->create($email)) {
if ($arrSettings["FrontendConfirm"] == "ActivateUser") { // Inform about frontend user account creation
$strMessage .= mi18n("<br><br>After the confirmation you will also receive a password which you can use with your e-mail address to logon to special areas on this website.");
// Erweiterte FEUser Profil Daten speichern
$FEUserID = $frontenduser->get("idfrontenduser");
$oFEUser = new FrontendUser;
$oFEUser->loadByPrimaryKey($FEUserID);
$oFEUser->setProperty("address", "title", $Titel);
$oFEUser->setProperty("address", "surname", $Vorname);
$oFEUser->setProperty("address", "name", $Nachname);
$oFEUser->setProperty("address", "zip", $Postleitzahl);
$oFEUser->setProperty("adress", "city", $Ort);
$oFEUser->setProperty("address", "street", $Strasse);
$oFEUser->setProperty("address", "land", $Land);
$oFEUser->setProperty("address", "company", $Firma);
$oFEUser->setProperty("address", "telefone", $Telefon);
$oFEUser->setProperty("address", "fax", $Fax);
$oFEUser->setProperty("address", "mobile", $Mobil);
$oFEUser->setProperty("address", "homepage", $Homepage);
}
} else {
$strMessage .= mi18n("<br><br>Sorry, there was a problem creating your website account. Please ask the webmaster for help.");
}
}
}
} else {
$strMessage = mi18n("Sorry, there was a problem sending the confirmation mail to your e-mail address. Please ask the webmaster for help.");
}
} else {
$strMessage = mi18n("Sorry, there was a problem subscribing your e-mail address for the newsletter. Please ask the webmaster for help.");
}
}
} elseif ($action == "delete") {
if (!isset($email) || !$email) {
$strMessage = mi18n("Please specify an e-mail address.");
} elseif (!isValidMail($email)) {
$strMessage = mi18n("Please specify a valid e-mail address.");
} elseif ($recipient = $objRecipients->emailExists($email)) {
$mail = new phpmailer();
$blackboxidcatart = $objProperties->getValue("clientsetting", $client, "Newsletter", "idcatart");
$body = mi18n("txtMailDelete")."\n".$cfgClient[$client]["path"]["htmlpath"]."front_content.php?changelang=".$lang."&idcatart=".$blackboxidcatart."&unsubscribe=".$recipient->get("hash")."\n\n";
$mail->From = $arrSettings["SenderEMail"];
$mail->FromName = $arrSettings["SenderEMail"];
$mail->AddAddress($recipient->get("email"));
$mail->Mailer = "mail";
$mail->Subject = mi18n("Newsletter: Cancel subscription");
$mail->Body = $body;
// $mail->AltBody = $body;
if($mail->Send()) {
// if (mail($recipient->get("email"), mi18n("Newsletter: Cancel subscription"), $body, 'From: '.$arrSettings["SenderEMail"]."\n"."X-Mailer: Contenido [PHP/" . phpversion()."]")) {
$strMessage = mi18n("Dear subscriber,<br>a mail has been sent to your e-mail address. Please confirm the cancelation of the newsletter subscription.");
} else {
$strMessage = mi18n("Sorry, there was a problem sending you the cancelation confirmation e-mail. Please ask the webmaster for help.");
}
} else {
$strMessage = mi18n("Sorry, the e-mail address was not found.");
}
} elseif (strlen($confirm) == 30 && is_alphanumeric($confirm)) {
$objRecipients->select("idclient = '$client' AND idlang='$lang' AND hash = '$confirm'");
if ($recipient = $objRecipients->next()) {
// $idrecipient = $recipient->get("idnewsrcp");
$idrecipient = $recipient->get("idnewsrcp");
$email = $recipient->get("email");
$recipient->set("confirmed",1);
$recipient->set("confirmeddate", date("Y-m-d H:i:s"), false);
$recipient->set("deactivated",0);
$recipient->store();
$strMessage = mi18n("Thank you! You have confirmed your subscription to our newsletter!");
$newsletters = New NewsletterCollection;
$newsletters->select("idclient = '$client' AND idlang='$lang' AND welcome='1'");
if ($newsletter = $newsletters->next()) {
$result = $newsletter->send($objProperties->getValue("clientsetting", $client, "Newsletter", "idcatart"),"single",$idrecipient);
$strMessage .= mi18n(" The welcome newsletter is already on the way to you!");
}
if ($arrSettings["FrontendLink"] == "enabled" && $arrSettings["FrontendConfirm"] == "ActivateUser") {
$frontendusers = new FrontendUserCollection;
$frontendusers->select("idclient = '$client' AND username='".urlencode($email)."'");
if ($frontenduser = $frontendusers->next()) {
$frontenduser->set("active",1);
$pwd = substr(md5(rand()),0,8); // Generating password
$frontenduser->set("password", $pwd);
$frontenduser->store();
$strMessage .= mi18n("<br><br>Additionally, your website account has been activated. You can now use the following username and password to log in to access special areas on our website:<br>");
$strMessage .= mi18n("Username: ").$email.mi18n("<br>Password: ").$pwd;
$body = mi18n("txtMailPassword")."\n\n".mi18n("Username: ").$email."\n".mi18n("Password: ").$pwd."\n\n".mi18n("Click here to login: ").$cfgClient[$client]["path"]["htmlpath"]."front_content.php?changelang=".$lang;
$mail = new phpmailer();
$mail->From = $arrSettings["SenderEMail"];
$mail->FromName = $arrSettings["SenderEMail"];
$mail->AddAddress($email);
$mail->Mailer = "mail";
$mail->Subject = mi18n("Website account");
$mail->Body = $body;
// $mail->AltBody = $body;
if($mail->Send()) {
// if (mail($recipient->get("email"), mi18n("Website account"), $body, 'From: '.$arrSettings["SenderEMail"]."\n"."X-Mailer: Contenido [PHP/" . phpversion()."]")) {
$strMessage .= mi18n("<br><br>The account details and the password has also been sent to your mail account.");
} else {
$strMessage .= mi18n("<br><br><b>Sorry, there was a problem sending you the account details by mail. Please remember the given password.</b><b>");
}
} else {
$strMessage .= mi18n("<br><br>Sorry, there was a problem activating your website account, also. Please ask the webmaster for help.");
}
}
} else {
$strMessage = mi18n("Sorry, there was a problem confirming your subscription. Please ask the webmaster for help.");
}
} elseif (strlen($stop) == 30 && is_alphanumeric($stop)) {
$objRecipients->select("idclient = '$client' AND idlang='$lang' AND hash = '$stop'");
if ($recipient = $objRecipients->next()) {
$recipient->set("deactivated",1);
$recipient->store();
$strMessage = mi18n("Your newsletter subscription has been paused.");
} else {
$strMessage = mi18n("Sorry, there was a problem pausing your newsletter subscription. Please ask the webmaster for help.");
}
} elseif (strlen($goon) == 30 && is_alphanumeric($goon)) {
$objRecipients->select("idclient = '$client' AND idlang='$lang' AND hash = '$goon'");
if ($recipient = $objRecipients->next()) {
$recipient->set("deactivated",0);
$recipient->store();
$strMessage = mi18n("Newsletter subscription has been resumed.");
} else {
$strMessage = mi18n("Sorry, there was a problem resuming your newsletter subscription. Please ask the webmaster for help.");
}
} elseif (strlen($unsubscribe) == 30 && is_alphanumeric($unsubscribe)) {
$objRecipients->select("idclient = '$client' AND idlang='$lang' AND hash = '$unsubscribe'");
if ($recipient = $objRecipients->next()) {
$strEMail = $recipient->get("email"); // Saving recipient e-mail address
$objRecipients->delete($recipient->get("idnewsrcp"));
$strMessage = mi18n("Your e-mail address has been removed from our list of newsletter recipients.");
if ($arrSettings["FrontendLink"] == "enabled") {
$frontendusers = new FrontendUserCollection;
$frontendusers->select("idclient = '$client' AND username='".urlencode($strEMail)."'");
if ($frontenduser = $frontendusers->next()) {
switch ($arrSettings["FrontendDel"]) {
case "DeleteUser": // Deleting frontend account
$frontendusers->delete($frontenduser->get("idfrontenduser"));
$strMessage .= mi18n(" Your website account has been deleted.");
break;
case "DisableUser": // Disabling frontend account
$frontenduser->set("active",0);
$frontenduser->store();
$strMessage .= mi18n(" Your website account has been disabled.");
break;
default:
}
}
}
} else {
$strMessage = mi18n("Sorry, there was a problem removing your e-mail address. Please ask the webmaster for help.");
}
}
echo $strMessage;
?>
Email nicht vorhanden
Das Email Plugin fehlt im derzeitigem Download!