Commit 68c5940e authored by Dan Ruscoe's avatar Dan Ruscoe
Browse files

Update branding; change MailChimp to Mailchimp.

parent 98e6bf6c
Loading
Loading
Loading
Loading
+18 −18
Original line number Diff line number Diff line
This module provides integration with the MailChimp email delivery service.
This module provides integration with the Mailchimp email delivery service.
While tools for sending email from your own server, like SimpleNews, are great,
they lack the sophistication and ease of use of dedicated email providers like
MailChimp. Other players in the field are Constant Contact and Campaign Monitor.
Mailchimp. Other players in the field are Constant Contact and Campaign Monitor.

The core module provides basic configuration and API integration. Features and
site functionality are provided by a set of submodules that depend upon the core
@@ -21,7 +21,7 @@ Features
  * Compatibility with Views Bulk Operations
  * Special VBO function for creating & updating static list segments
  * Allow users to subscribe during registration by adding a field to Users
  * Map Entity field values to your MailChimp merge fields
  * Map Entity field values to your Mailchimp merge fields
  * Standalone subscribe and unsubscribe forms
  * Subscriptions can be maintained via cron or in real time
  * Subscription forms can be created as pages or as blocks, with one or more
@@ -36,14 +36,14 @@ Features
Upgrading from an Earlier Version
--------------------------------------------------------------------------------

The 7.x-2.x and 7.x-3.x branches will become unsupported as MailChimp phases out
The 7.x-2.x and 7.x-3.x branches will become unsupported as Mailchimp phases out
their API version 2.0 by the end of 2016. We recommend upgrading to 7.x-4.x, the
branch that is using MailChimp's latest API: version 3.0.
branch that is using Mailchimp's latest API: version 3.0.

Upgrading from 7.x-3.x
--------------------------------------------------------------------------------

  * Replace the MailChimp module on your web server with the most recent
  * Replace the Mailchimp module on your web server with the most recent
    7.x-4.x release

  * Follow Installation Notes below
@@ -57,9 +57,9 @@ Upgrading from 7.x-3.x
Upgrading from 7.x-2.x
--------------------------------------------------------------------------------

  * Uninstall the MailChimp module
  * Uninstall the Mailchimp module

  * Replace the MailChimp module on your web server with the most recent
  * Replace the Mailchimp module on your web server with the most recent
      7.x-4.x release

  * Follow Installation Notes below
@@ -70,7 +70,7 @@ Upgrading from 7.x-2.x
Please note: The major structural change between 7.x-2.x and 7.x-4.x is the
"Lists and Users" tab has been separated into three tabs "Fields", "Lists" and
"SignUp Forms". You will find most of the user related configuration by creating
a MailChimp field on the user account, here: admin/config/people/accounts/fields
a Mailchimp field on the user account, here: admin/config/people/accounts/fields

For more information, please visit the FAQ (https://www.drupal.org/node/2793241)

@@ -78,24 +78,24 @@ For more information, please visit the FAQ (https://www.drupal.org/node/2793241)
Installation Notes
--------------------------------------------------------------------------------

  * You need to have a MailChimp API Key.
  * You need to have at least one list created in MailChimp to use the
  * You need to have a Mailchimp API Key.
  * You need to have at least one list created in Mailchimp to use the
    mailchimp_lists module.
  * If you use a drush make workflow, see the example drush makefile:
    mailchimp.make.example.
  * The MailChimp PHP library must exist in your Drupal installation.
  * The Mailchimp PHP library must exist in your Drupal installation.

MailChimp Library Installation
Mailchimp Library Installation
--------------------------------------------------------------------------------

    # For MailChimp version 7.x-4.x
    # For Mailchimp version 7.x-4.x

    To use the Libraries module:

      - Install the Libraries module:
        https://www.drupal.org/project/libraries

      - Download the current release of the MailChimp library:
      - Download the current release of the Mailchimp library:
        https://github.com/thinkshout/mailchimp-api-php/files/1361112/v1.0.8-package.zip

      - Locate your libraries directory. Usually:
@@ -138,7 +138,7 @@ MailChimp Library Installation
        drush composer-manager update --no-dev


    # For MailChimp version 7.x-2.x and 7.x-3.x:
    # For Mailchimp version 7.x-2.x and 7.x-3.x:

      - Download version 2.0.6 of the v2 API library:
        https://bitbucket.org/mailchimp/mailchimp-api-php/downloads
@@ -185,7 +185,7 @@ Submodules
    subscription from a single form, include merge variables as desired, and
    optionally include Interest Group selection.

  * mailchimp_lists: Subscribe any entity with an email address to MailChimp
  * mailchimp_lists: Subscribe any entity with an email address to Mailchimp
    lists by creating a mailchimp_list field, and allow anyone who can edit such
    an entity to subscribe, unsubscribe, and update member information. Also
    allows other entity fields to be synced to Mailchimp list Merge Fields. Add
@@ -207,7 +207,7 @@ Related Modules

Mandrill

  * Mandrill is MailChimp's transactional email service. The module provides the
  * Mandrill is Mailchimp's transactional email service. The module provides the
    ability to send all site emails through Mandrill with reporting available
    from within Drupal. Please refer to the project page for more details.
  * http://drupal.org/project/mandrill
+18 −18
Original line number Diff line number Diff line
@@ -2,19 +2,19 @@

/**
 * @file
 * MailChimp module admin settings.
 * Mailchimp module admin settings.
 */

/**
 * Return the MailChimp global settings form.
 * Return the Mailchimp global settings form.
 */
function mailchimp_admin_settings() {
  $form['mailchimp_api_key'] = array(
    '#type' => 'textfield',
    '#title' => t('MailChimp API Key'),
    '#title' => t('Mailchimp API Key'),
    '#required' => TRUE,
    '#default_value' => variable_get('mailchimp_api_key', ''),
    '#description' => t('The API key for your MailChimp account. Get or generate a valid API key at your !apilink.', array('!apilink' => l(t('MailChimp API Dashboard'), 'http://admin.mailchimp.com/account/api'))),
    '#description' => t('The API key for your Mailchimp account. Get or generate a valid API key at your !apilink.', array('!apilink' => l(t('Mailchimp API Dashboard'), 'http://admin.mailchimp.com/account/api'))),
  );

  $form['connected_sites'] = array(
@@ -25,7 +25,7 @@ function mailchimp_admin_settings() {
  $form['connected_sites']['mailchimp_enable_connected'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable connected site'),
    '#description' => t("Connects this website to MailChimp by automatically embedding MailChimp's !link JavaScript code.", array(
    '#description' => t("Connects this website to Mailchimp by automatically embedding Mailchimp's !link JavaScript code.", array(
      '!link' => l(t('Connected Sites'), 'https://kb.mailchimp.com/integrations/connected-sites/about-connected-sites'),
    )),
    '#default_value' => variable_get('mailchimp_enable_connected', FALSE),
@@ -53,7 +53,7 @@ function mailchimp_admin_settings() {
    );

    drupal_set_message(
      t('Failed connecting to the MailChimp backend with the provided API key.'),
      t('Failed connecting to the Mailchimp backend with the provided API key.'),
      'error'
    );
  }
@@ -68,29 +68,29 @@ function mailchimp_admin_settings() {
  );

  if (!empty($connected_sites_options)) {
    // If the MailChimp account contains connected sites, allow the user to
    // If the Mailchimp account contains connected sites, allow the user to
    // choose one here.
    $form['connected_sites']['config']['mailchimp_connected_id'] = array(
      '#type' => 'radios',
      '#options' => $connected_sites_options,
      '#default_value' => variable_get('mailchimp_connected_id', FALSE),
      '#prefix' => t('<p><b>Choose a connected site from your MailChimp account.</b></p>'),
      '#prefix' => t('<p><b>Choose a connected site from your Mailchimp account.</b></p>'),
    );

    // Allow the user to configure which paths to embed JavaScript on.
    $form['connected_sites']['config']['mailchimp_connected_paths'] = array(
      '#type' => 'textarea',
      '#default_value' => variable_get('mailchimp_connected_paths', FALSE),
      '#prefix' => t("<p><b>Configure paths to embed MailChimp's JavaScript code on.</b></p>"),
      '#description' => t('Specify pages using their paths. Enter one path per line. <front> is the front page. If you have created a pop-up subscription form in MailChimp, it will appear on paths defined here.'),
      '#prefix' => t("<p><b>Configure paths to embed Mailchimp's JavaScript code on.</b></p>"),
      '#description' => t('Specify pages using their paths. Enter one path per line. <front> is the front page. If you have created a pop-up subscription form in Mailchimp, it will appear on paths defined here.'),
    );
  }
  else {
    // If the MailChimp account does not contain any connected sites, gently
    // If the Mailchimp account does not contain any connected sites, gently
    // encourage the user to create one.
    $form['connected_sites']['sites']['info'] = array(
      '#type' => 'markup',
      '#markup' => t("You'll need to connect this site to MailChimp first! !link.", array(
      '#markup' => t("You'll need to connect this site to Mailchimp first! !link.", array(
        '!link' => l(t('Check out the documentation here'), 'https://kb.mailchimp.com/integrations/connected-sites/about-connected-sites'),
      )),
    );
@@ -104,7 +104,7 @@ function mailchimp_admin_settings() {
  $form['batch']['mailchimp_cron'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use batch processing'),
    '#description' => t('Puts all MailChimp subscription operations into the cron queue. (Includes subscribe, update, and unsubscribe operations.) <i>Note: May cause confusion if caches are cleared, as requested changes will appear to have failed until cron is run.</i>'),
    '#description' => t('Puts all Mailchimp subscription operations into the cron queue. (Includes subscribe, update, and unsubscribe operations.) <i>Note: May cause confusion if caches are cleared, as requested changes will appear to have failed until cron is run.</i>'),
    '#default_value' => variable_get('mailchimp_cron', FALSE),
  );

@@ -127,7 +127,7 @@ function mailchimp_admin_settings() {
      '10000' => '10000',
    ),
    '#title' => t('Batch limit'),
    '#description' => t('Maximum number of entities to process in a single cron run. MailChimp suggest keeping this at 5000 or below. <i>This value is also used for batch Merge Variable updates on the Fields tab (part of mailchimp_lists).</i>'),
    '#description' => t('Maximum number of entities to process in a single cron run. Mailchimp suggest keeping this at 5000 or below. <i>This value is also used for batch Merge Variable updates on the Fields tab (part of mailchimp_lists).</i>'),
    '#default_value' => variable_get('mailchimp_batch_limit', 100),
  );

@@ -135,14 +135,14 @@ function mailchimp_admin_settings() {
}

/**
 * MailChimp List cache clear form.
 * Mailchimp List cache clear form.
 */
function mailchimp_clear_list_cache_form($form, &$form_state) {
  $cancel_destination = 'admin/config/services/mailchimp';
  return confirm_form($form,
    t('Reset MailChimp List Cache'),
    t('Reset Mailchimp List Cache'),
    $cancel_destination,
    t('Confirm clearing of MailChimp list cache.'),
    t('Confirm clearing of Mailchimp list cache.'),
    'Confirm'
  );
}
@@ -152,5 +152,5 @@ function mailchimp_clear_list_cache_form($form, &$form_state) {
 */
function mailchimp_clear_list_cache_form_submit($form, &$form_state) {
  mailchimp_get_lists(array(), TRUE, TRUE);
  drupal_set_message(t('MailChimp List cache cleared.'));
  drupal_set_message(t('Mailchimp List cache cleared.'));
}
+10 −10
Original line number Diff line number Diff line
@@ -6,22 +6,22 @@
 */

/**
 * Alter mergevars before they are sent to MailChimp.
 * Alter mergevars before they are sent to Mailchimp.
 *
 * @param array $mergevars
 *   Array of MailChimp mergevars.
 *   Array of Mailchimp mergevars.
 * @param object $entity
 *   The entity used as a source for mergevar values.
 * @param string $entity_type
 *   The type of entity used as a source for mergevar values.
 * @param string $list_id
 *   The ID of the MailChimp list containing the mergevars.
 *   The ID of the Mailchimp list containing the mergevars.
 */
function hook_mailchimp_lists_mergevars_alter(&$mergevars, $entity, $entity_type, $list_id) {
}

/**
 * Perform an action during the firing of a MailChimp webhook.
 * Perform an action during the firing of a Mailchimp webhook.
 *
 * Refer to http://apidocs.mailchimp.com/webhooks for more details.
 *
@@ -38,7 +38,7 @@ function hook_mailchimp_process_webhook($type, $data) {
 * Perform an action after a subscriber has been subscribed.
 *
 * @string $list_id
 *   MailChimp list id.
 *   Mailchimp list id.
 * @string $email
 *   Subscriber email address.
 * @array $merge_vars
@@ -52,7 +52,7 @@ function hook_mailchimp_subscribe_user($list_id, $email, $merge_vars) {
 * Perform an action after a subscriber has been unsubscribed.
 *
 * @string $list_id
 *   MailChimp list id.
 *   Mailchimp list id.
 * @string $email
 *   Subscriber email address.
 */
@@ -64,9 +64,9 @@ function hook_mailchimp_unsubscribe_user($list_id, $email) {
 * Alter the key for a given api request.
 *
 * @string &$api_key
 *   The MailChimp API key.
 *   The Mailchimp API key.
 * @array $context
 *   The MailChimp API classname of the API object.
 *   The Mailchimp API classname of the API object.
 */
function hook_mailchimp_api_key_alter(&$api_key, $context) {

@@ -88,7 +88,7 @@ function hook_mailchimp_automations_entity_options(&$entity_type_options, $autom
 * Alter mergevars before a workflow automation is triggered.
 *
 * @param array $merge_vars
 *   The merge vars that will be passed to MailChimp.
 *   The merge vars that will be passed to Mailchimp.
 * @param object $automation_entity
 *   The MailchimpAutomationEntity object.
 * @param object $wrapped_entity
@@ -99,7 +99,7 @@ function hook_mailchimp_automations_mergevars_alter(&$merge_vars, $automation_en
}

/**
 * Perform an action after a successful MailChimp workflow automation.
 * Perform an action after a successful Mailchimp workflow automation.
 *
 * @param object $automation_entity
 *   The MailchimpAutomationEntity object.
+3 −3
Original line number Diff line number Diff line
name = MailChimp
description = MailChimp email service integration.
package = MailChimp
name = Mailchimp
description = Mailchimp email service integration.
package = Mailchimp
core = 7.x
php = 5.4

+4 −4
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
 */
function mailchimp_schema() {
  $schema['cache_mailchimp'] = drupal_get_schema_unprocessed('system', 'cache');
  $schema['cache_mailchimp']['description'] = 'Cache table for the MailChimp module to store a list of subscribers member info.';
  $schema['cache_mailchimp']['description'] = 'Cache table for the Mailchimp module to store a list of subscribers member info.';

  return $schema;
}
@@ -34,13 +34,13 @@ function mailchimp_requirements($phase) {
      $library = FALSE;
    }
    $requirements['mailchimp'] = array(
      'title' => $t('MailChimp'),
      'title' => $t('Mailchimp'),
    );

    if ($library['installed']) {
      $requirements['mailchimp'] += array(
        'value' => $library['version'],
        'description' => $t('The MailChimp MCAPI wrapper library is installed correctly.'),
        'description' => $t('The Mailchimp MCAPI wrapper library is installed correctly.'),
        'severity' => REQUIREMENT_OK,
      );
    }
@@ -48,7 +48,7 @@ function mailchimp_requirements($phase) {
    elseif (class_exists('Mailchimp\Mailchimp')) {
      $requirements['mailchimp'] += array(
        'value' => Mailchimp\Mailchimp::VERSION,
        'description' => $t('The MailChimp MCAPI wrapper library is installed correctly.'),
        'description' => $t('The Mailchimp MCAPI wrapper library is installed correctly.'),
        'severity' => REQUIREMENT_OK,
      );
    }
Loading