Signup
The signup library provides a way to simply subscribe to an email list. It allows you to easily use some common services via their API, like Mailchimp.
mailchimp()
string $email
The subscribers email address
To use this method, you have to create a local copy of /system/plugins/_global/conf/signup.conf.ini and change Mailchimp API key and Mailchimp list ID.
webgalamb()
string $email
The subscribers email address
string $name
The subscribers name, default empty string
string $group
The group id, default 1
To use this method, you have to create a local copy of /system/plugins/_global/conf/signup.conf.ini and change Webgalamb URL. To save the request, you have to upload the following script to the server, where webgalamb is installed. Don’t forget to set the wg5conf.php and wg5api.php paths.
header('Access-Control-Allow-Origin: *'); // call config file require_once('./files/wg5conf.php'); // call webgalamb api require_once('wg5api.php'); $wg_api = new WG5_API($db_pre); // set subscriber data $subscriber_data = array ( 'mail' => $_POST['email'], 'datum' => date('Y-m-d'), 'active' => 1, 'Név' => $_POST['name'] ); $group_id = $_POST['group']; $result = $wg_api->InsertSubscriber($subscriber_data, $group_id); return $result;