From 0bf64efa124644cea701baf084d248942fb62e5d Mon Sep 17 00:00:00 2001 From: Erik Falster Date: Sun, 12 Nov 2017 11:47:23 +0100 Subject: [PATCH 1/3] Add module and some styling --- composer.json | 3 +- composer.lock | 137 +++++++++++++++++- .../drupalnorge_theme/css/drupalnorge.css | 2 +- 3 files changed, 136 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 8a138c6d..3b5a98ff 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "drush/drush": "~8.1.13", "drupal/honeypot": "~1.26.0", "drupal/google_analytics": "^2.1", - "drupal/config_ignore": "^2.1" + "drupal/config_ignore": "^2.1", + "drupal/mailchimp": "^1.3" }, "require-dev": { "drupal/coder": "^8.2", diff --git a/composer.lock b/composer.lock index c336bde3..73f01b8e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "d7e107f11f6aa8f24311cdc3cecfd219", + "content-hash": "93b424e941f49476f84bbfafd1e377ef", "packages": [ { "name": "abraham/twitteroauth", @@ -306,12 +306,12 @@ "version": "4.0.3", "source": { "type": "git", - "url": "git@github.com:ivaynberg/select2.git", + "url": "https://github.com/select2/select2.git", "reference": "566c7846fbf8c3b7674346f26d0ee872c0a77629" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ivaynberg/select2/zipball/566c7846fbf8c3b7674346f26d0ee872c0a77629", + "url": "https://api.github.com/repos/select2/select2/zipball/566c7846fbf8c3b7674346f26d0ee872c0a77629", "reference": "566c7846fbf8c3b7674346f26d0ee872c0a77629", "shasum": null }, @@ -2023,7 +2023,8 @@ "patches_applied": { "Keep setting.php intact, add local config to settings.local.php": "https://github.com/zaporylie/drupal/commit/6f0b4e95f28ae945c6fa2bf0e5e81850d3e695f8.patch", "Clean up user input for exposed checkboxes": "https://www.drupal.org/files/issues/2687773-18-Cleanup-user-input-for-checkboxes-8.2.patch", - "Color module html preview optional": "https://www.drupal.org/files/issues/color-optional-html-preview-2844190-2.patch" + "Color module html preview optional": "https://www.drupal.org/files/issues/color-optional-html-preview-2844190-2.patch", + "Restrict images to this site blocks image style derivatives": "https://www.drupal.org/files/issues/image_restrict_image_styles-2528214-19.patch" } }, "autoload": { @@ -3040,6 +3041,98 @@ }, "time": "2016-11-08T03:19:30+00:00" }, + { + "name": "drupal/mailchimp", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://git.drupal.org/project/mailchimp", + "reference": "8.x-1.3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/mailchimp-8.x-1.3.zip", + "reference": "8.x-1.3", + "shasum": "517b958b8c30254222a7f282308c7c69a2f6cf70" + }, + "require": { + "drupal/core": "~8.0", + "thinkshout/mailchimp-api-php": "1.0.6" + }, + "require-dev": { + "drupal/mailchimp_lists": "*" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, + "drupal": { + "version": "8.x-1.3", + "datestamp": "1500676742", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "autoload": { + "psr-0": { + "Mailchimp": "src/" + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Greg Boggs", + "homepage": "https://www.drupal.org/user/153069" + }, + { + "name": "amyvs", + "homepage": "https://www.drupal.org/user/3181721" + }, + { + "name": "caxy4", + "homepage": "https://www.drupal.org/user/2735491" + }, + { + "name": "gcb", + "homepage": "https://www.drupal.org/user/1682976" + }, + { + "name": "levelos", + "homepage": "https://www.drupal.org/user/54135" + }, + { + "name": "mshaver", + "homepage": "https://www.drupal.org/user/39079" + }, + { + "name": "nrackleff", + "homepage": "https://www.drupal.org/user/463332" + }, + { + "name": "ruscoe", + "homepage": "https://www.drupal.org/user/2722087" + }, + { + "name": "seanberto", + "homepage": "https://www.drupal.org/user/54109" + }, + { + "name": "tauno", + "homepage": "https://www.drupal.org/user/105595" + } + ], + "description": "Mailchimp is an integration with the Mailchimp Mass email tool.", + "homepage": "http://drupal.org/project/mailchimp", + "support": { + "source": "http://cgit.drupalcode.org/mailchimp" + } + }, { "name": "drupal/mailsystem", "version": "4.1.0", @@ -7712,6 +7805,42 @@ "homepage": "https://symfony.com", "time": "2017-10-05T14:38:30+00:00" }, + { + "name": "thinkshout/mailchimp-api-php", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/thinkshout/mailchimp-api-php.git", + "reference": "ab0910a3e4497fbed0c0cf4e2bb7118d398ef795" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thinkshout/mailchimp-api-php/zipball/ab0910a3e4497fbed0c0cf4e2bb7118d398ef795", + "reference": "ab0910a3e4497fbed0c0cf4e2bb7118d398ef795", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.2.1", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "4.8.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mailchimp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "description": "PHP library for v3 of the MailChimp API", + "homepage": "https://github.com/thinkshout/mailchimp-api-php", + "keywords": [ + "mail", + "mailchimp" + ], + "time": "2017-02-18T03:23:31+00:00" + }, { "name": "twig/twig", "version": "v1.35.0", diff --git a/html/themes/custom/drupalnorge_theme/css/drupalnorge.css b/html/themes/custom/drupalnorge_theme/css/drupalnorge.css index 31ea30dc..0d95d767 100644 --- a/html/themes/custom/drupalnorge_theme/css/drupalnorge.css +++ b/html/themes/custom/drupalnorge_theme/css/drupalnorge.css @@ -1,6 +1,6 @@ .navbar-default .navbar-brand { background: none !important; } -.slack-invite-form { +.slack-invite-form, .mailchimp-signup-subscribe-form { padding: 1.25rem; } From f56f4dbb0713aa6e2d70edd49b38b7b68a88a76f Mon Sep 17 00:00:00 2001 From: Erik Falster Date: Sun, 12 Nov 2017 11:52:45 +0100 Subject: [PATCH 2/3] add config for mailchimp --- ...psubscriptionformmelddegpanyhetsbrevet.yml | 20 +++++++++++++ config/mailchimp.settings.yml | 8 +++++ ...lchimp_signup.meld_deg_pa_nyhetsbrevet.yml | 30 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 config/block.block.mailchimpsubscriptionformmelddegpanyhetsbrevet.yml create mode 100644 config/mailchimp.settings.yml create mode 100644 config/mailchimp_signup.mailchimp_signup.meld_deg_pa_nyhetsbrevet.yml diff --git a/config/block.block.mailchimpsubscriptionformmelddegpanyhetsbrevet.yml b/config/block.block.mailchimpsubscriptionformmelddegpanyhetsbrevet.yml new file mode 100644 index 00000000..957d1a4d --- /dev/null +++ b/config/block.block.mailchimpsubscriptionformmelddegpanyhetsbrevet.yml @@ -0,0 +1,20 @@ +uuid: 0e54246a-a703-44f9-a828-936240369f6f +langcode: en +status: true +dependencies: + module: + - mailchimp_signup + theme: + - drupalnorge_theme +id: mailchimpsubscriptionformmelddegpanyhetsbrevet +theme: drupalnorge_theme +region: complementary_top +weight: -24 +provider: null +plugin: 'mailchimp_signup_subscribe_block:meld_deg_pa_nyhetsbrevet' +settings: + id: 'mailchimp_signup_subscribe_block:meld_deg_pa_nyhetsbrevet' + label: 'Meld deg på nyhetsbrevet' + provider: mailchimp_signup + label_display: visible +visibility: { } diff --git a/config/mailchimp.settings.yml b/config/mailchimp.settings.yml new file mode 100644 index 00000000..42271b7b --- /dev/null +++ b/config/mailchimp.settings.yml @@ -0,0 +1,8 @@ +api_key: 20b420440365b8e20a71abcff0d3f009-us2 +cron: false +batch_limit: 100 +api_classname: Mailchimp\Mailchimp +test_mode: false +_core: + default_config_hash: x8k6uOqmSHPqpp71jYGxHF3_SAs3U-Pha3YCntQIhPU +langcode: nb diff --git a/config/mailchimp_signup.mailchimp_signup.meld_deg_pa_nyhetsbrevet.yml b/config/mailchimp_signup.mailchimp_signup.meld_deg_pa_nyhetsbrevet.yml new file mode 100644 index 00000000..2e8c0766 --- /dev/null +++ b/config/mailchimp_signup.mailchimp_signup.meld_deg_pa_nyhetsbrevet.yml @@ -0,0 +1,30 @@ +uuid: 0b30423a-c1f6-4ef1-a377-82c384e88cee +langcode: en +status: null +dependencies: { } +id: meld_deg_pa_nyhetsbrevet +title: 'Meld deg på nyhetsbrevet' +mc_lists: + cc5d363f07: cc5d363f07 +mode: 3 +mergefields: + EMAIL: true + FNAME: 0 + LNAME: 0 +description: '' +doublein: true +send_welcome: null +include_interest_groups: false +settings: + path: nyhetsbrev + submit_button: Send + confirmation_message: 'Du har blitt påmeldt nyhetsbrevet' + destination: '' + mergefields: + EMAIL: 'O:8:"stdClass":8:{s:3:"tag";s:5:"EMAIL";s:4:"name";s:13:"Email Address";s:4:"type";s:5:"email";s:8:"required";b:1;s:13:"default_value";s:0:"";s:6:"public";b:1;s:13:"display_order";i:1;s:7:"options";O:8:"stdClass":1:{s:4:"size";i:25;}}' + FNAME: 0 + LNAME: 0 + description: '' + doublein: 1 + include_interest_groups: 0 + safe_interest_groups: 0 From 0d613635f158e0cd863fe783a6c622edc6c1852b Mon Sep 17 00:00:00 2001 From: Erik Falster Date: Sun, 12 Nov 2017 12:32:22 +0100 Subject: [PATCH 3/3] enable mailchimp modules in extension config --- config/core.extension.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/core.extension.yml b/config/core.extension.yml index 54b0a922..4ba054fc 100644 --- a/config/core.extension.yml +++ b/config/core.extension.yml @@ -50,6 +50,8 @@ module: like_and_dislike: 0 link: 0 locale: 0 + mailchimp: 0 + mailchimp_signup: 0 mailsystem: 0 mentions: 0 menu_link_content: 0