Přihlásit se

Joomla 5.0.1 a 4.4.1 bezpečnostní vydání (29 lis 2023)

Joomla 5.0.1 a 4.4.1 je nyní k dispozici. Jedná se o bezpečnostní vydání pro Joomla 4.x. a 5.x.

Propojení RS Form s Acymailing

08. úno 2018 09:53 - 08. úno 2018 09:55 #134122
Zdravím, chtěl bych poprosit znalé o pomoc s úpravou kódu scriptu, ve fromuláři RS Form bych chtěl mít group of checkbox, z nichž by si mohl uživatel zatrhnout, z jakého seznamu by chtěl odebírat e-maily. Našel jsem stránku s popisem integrace na acyba. Tam je ale pouze popis, kdy je pouze 1 chceckbox, jehož zatrhnutím mohu definovat ID seznámů. Potřeboval bych dosáhnout toho, abych mohl pro každý checkbox v groupu definovat 1 seznam. Dokázal by mi někdo pomoci s tímto kódem? Má s tím někdo zkušenost?
Code:
$postData = $_REQUEST['form']; if(empty($postData['subscribeme'])) return; include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_acymailing'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php'); $myUser = new stdClass(); $myUser->email = strip_tags($postData['email_field']); //Please replace email_field by your own field name (the name of the field "email"). $myUser->name = strip_tags($postData['name_field']); //Please replace name_field by your own field name (the name of the field "name"). $subscriberClass = acymailing_get('class.subscriber'); $subscribe = array(3,4,5); //Specify here the ID of your lists separated by a comma, in this example the user will be subscribed to lists IDs 3,4 and 5. $_REQUEST['subscription'] = $subscribe; //Only useful when using a subscription condition in the "Create Joomla user" plugin, you can delete this line if you don't use this plugin $subid = $subscriberClass->save($myUser); $subscriberClass->sendConf($subid); //we send the confirmation email... only if needed based on the current user status and the option from the Acy configuration page. $newSubscription = array(); if(!empty($subscribe)){ foreach($subscribe as $listId){ $newList = array(); $newList['status'] = 1; $newSubscription[$listId] = $newList; } } $subscriberClass->saveSubscription($subid,$newSubscription);

Joomla úřední deska | IVT služby - IT služby, webové stránky v Joomla!, online marketing | Joomla je best! Zveřejni svůj problém, pokud ho vyřešíš sám, jsi best!

08. úno 2018 12:46 #134126
Odpověď od Cufe
Admin
Vypadl mi odkaz na acyba stránku, tak doplňuji: www.acyba.com/acymailing/127-acymailing-rsformpro.html

Joomla úřední deska | IVT služby - IT služby, webové stránky v Joomla!, online marketing | Joomla je best! Zveřejni svůj problém, pokud ho vyřešíš sám, jsi best!

Powered by Fórum