Skip to content

Instantly share code, notes, and snippets.

@gielfeldt
Last active September 29, 2015 11:47
Show Gist options
  • Save gielfeldt/3c2e67ca654912677bfc to your computer and use it in GitHub Desktop.
Save gielfeldt/3c2e67ca654912677bfc to your computer and use it in GitHub Desktop.
Enhancement #1316 - Add settings from comment notify module #17
From b654bc13e0044710968297281ba8e826ed0ed6df Mon Sep 17 00:00:00 2001
From: Lisa Felder <lisa@reload.dk>
Date: Mon, 6 Jul 2015 13:25:37 +0200
Subject: [PATCH 1/5] Updated tags taxonomy features export
The hierarchy value depends on the state of the content and not on the configuration for the taxonomy itself. The content has changed and thus the value should be updated as well.
This has little to do with the purpose of this branch but we need to update the feature so we fix this as well.
---
ding_content.features.taxonomy.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ding_content.features.taxonomy.inc b/ding_content.features.taxonomy.inc
index 7eb386b..7b9a006 100644
--- a/ding_content.features.taxonomy.inc
+++ b/ding_content.features.taxonomy.inc
@@ -21,7 +21,7 @@ function ding_content_taxonomy_default_vocabularies() {
'name' => 'Tags',
'machine_name' => 'ding_content_tags',
'description' => NULL,
- 'hierarchy' => 0,
+ 'hierarchy' => 2,
'module' => 'ding_content',
'weight' => 0,
),
From feefcd89357dfdea53079f22291aa2ec3e6f3d4a Mon Sep 17 00:00:00 2001
From: Lisa Felder <lisa@reload.dk>
Date: Mon, 6 Jul 2015 13:34:41 +0200
Subject: [PATCH 2/5] KKB-153 added comment-notify-module-settings to feature.
Added to ding-content since it goes across different content-types.
---
ding_content.info | 8 ++++
ding_content.strongarm.inc | 98 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 106 insertions(+)
diff --git a/ding_content.info b/ding_content.info
index ea746d0..7b4b860 100644
--- a/ding_content.info
+++ b/ding_content.info
@@ -5,6 +5,7 @@ package = Ding!
project = ding_content
dependencies[] = clone
dependencies[] = comment
+dependencies[] = comment_notify
dependencies[] = ctools
dependencies[] = ctools_custom_content
dependencies[] = ding_page
@@ -51,6 +52,13 @@ features[page_manager_handlers][] = pm_existing_pages_ding_content_workbench_rec
features[page_manager_handlers][] = term_view_panel_context_3
features[taxonomy][] = category
features[taxonomy][] = ding_content_tags
+features[variable][] = comment_notify_available_alerts
+features[variable][] = comment_notify_comment_notify_default_mailtext
+features[variable][] = comment_notify_default_anon_mailalert
+features[variable][] = comment_notify_default_registered_mailalert
+features[variable][] = comment_notify_node_notify_default_mailalert
+features[variable][] = comment_notify_node_notify_default_mailtext
+features[variable][] = comment_notify_node_types
features[variable][] = media_wysiwyg_wysiwyg_browser_plugins
features[variable][] = page_manager_node_view_disabled
features[variable][] = page_manager_term_view_disabled
diff --git a/ding_content.strongarm.inc b/ding_content.strongarm.inc
index f0b92a9..efa5813 100644
--- a/ding_content.strongarm.inc
+++ b/ding_content.strongarm.inc
@@ -13,6 +13,104 @@ function ding_content_strongarm() {
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_available_alerts';
+ $strongarm->value = array(
+ 1 => '1',
+ 2 => '2',
+ );
+ $export['comment_notify_available_alerts'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_comment_notify_default_mailtext';
+ $strongarm->value = 'Hej [comment-subscribed:author],
+
+[comment:author] har kommenteret på: "[comment:node:title]"
+
+----
+[comment:body]
+----
+
+Du kan se kommentaren på følgende url
+[comment:url]
+
+Du kan stoppe at modtage emails når nogen kommenterer dit indlæg
+ved at gå til [comment-subscribed:unsubscribe-url]
+
+
+Med venlig hilsen [site:name] team
+[site:url]';
+ $export['comment_notify_comment_notify_default_mailtext'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_default_anon_mailalert';
+ $strongarm->value = '0';
+ $export['comment_notify_default_anon_mailalert'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_default_registered_mailalert';
+ $strongarm->value = '1';
+ $export['comment_notify_default_registered_mailalert'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_node_notify_default_mailalert';
+ $strongarm->value = 0;
+ $export['comment_notify_node_notify_default_mailalert'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_node_notify_default_mailtext';
+ $strongarm->value = 'Hej [comment:node:author],
+
+Du har modtaget en kommentar på: "[comment:node:title]"
+
+----
+[comment:body]
+----
+
+Du kan se kommentaren på følgende url
+[comment:url]
+
+Du vil modtage email som denne for hver kommentar på dit indlæg.
+Du kan slå denne funktion fra ved at logge ind og ændre indstillingerne på din brugerprofil på
+[comment:node:author:edit-url].
+
+Med venlig hilsen [site:name] team
+[site:url]';
+ $export['comment_notify_node_notify_default_mailtext'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
+ $strongarm->name = 'comment_notify_node_types';
+ $strongarm->value = array(
+ 'ding_event' => 'ding_event',
+ 'ding_news' => 'ding_news',
+ 'ding_library' => 0,
+ 'ding_eresource' => 0,
+ 'ding_faq_question' => 0,
+ 'ding_group' => 0,
+ 'ding_campaign' => 0,
+ 'new_materials' => 0,
+ 'panel' => 0,
+ 'promotion' => 0,
+ 'ding_rolltab' => 0,
+ 'ding_page' => 0,
+ 'webform' => 0,
+ );
+ $export['comment_notify_node_types'] = $strongarm;
+
+ $strongarm = new stdClass();
+ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
+ $strongarm->api_version = 1;
$strongarm->name = 'media_wysiwyg_wysiwyg_browser_plugins';
$strongarm->value = array(
0 => 'ding_content',
From 6e3eddab880c4159bce2b6b0471a13cb8b0aa59c Mon Sep 17 00:00:00 2001
From: Lisa Felder <lisa@reload.dk>
Date: Mon, 6 Jul 2015 16:00:05 +0200
Subject: [PATCH 3/5] Add comment notify module to make file
---
ding_content.make | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ding_content.make b/ding_content.make
index a9ec95f..f393037 100644
--- a/ding_content.make
+++ b/ding_content.make
@@ -6,6 +6,9 @@ api = 2
projects[cache_actions][subdir] = "contrib"
projects[cache_actions][version] = "2.0-alpha5"
+projects[comment_notify][subdir] = "contrib"
+projects[comment_notify][version] = "1.2"
+
projects[ctools][subdir] = "contrib"
projects[ctools][version] = "1.9"
From 47025b87be4c9047e8d8fc24741a6c25687417c5 Mon Sep 17 00:00:00 2001
From: Thomas Gielfeldt <thomas@gielfeldt.dk>
Date: Tue, 7 Jul 2015 10:42:05 +0200
Subject: [PATCH 4/5] Revert "Updated tags taxonomy features export"
This reverts commit b654bc13e0044710968297281ba8e826ed0ed6df.
---
ding_content.features.taxonomy.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ding_content.features.taxonomy.inc b/ding_content.features.taxonomy.inc
index 7b9a006..7eb386b 100644
--- a/ding_content.features.taxonomy.inc
+++ b/ding_content.features.taxonomy.inc
@@ -21,7 +21,7 @@ function ding_content_taxonomy_default_vocabularies() {
'name' => 'Tags',
'machine_name' => 'ding_content_tags',
'description' => NULL,
- 'hierarchy' => 2,
+ 'hierarchy' => 0,
'module' => 'ding_content',
'weight' => 0,
),
From 813bb6986428f6bd3e932a91a132f32495aa7e11 Mon Sep 17 00:00:00 2001
From: Thomas Gielfeldt <thomas@gielfeldt.dk>
Date: Tue, 7 Jul 2015 10:43:47 +0200
Subject: [PATCH 5/5] Enable comment notify module.
---
ding_content.install | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ding_content.install b/ding_content.install
index 23cc2cd..710e21f 100644
--- a/ding_content.install
+++ b/ding_content.install
@@ -187,3 +187,10 @@ function ding_content_update_7000() {
function ding_content_update_7001() {
ding_content_insert_html5_video_presets();
}
+
+/**
+ * Enable Comment Notify module.
+ */
+function ding_content_update_7002() {
+ module_enable(array('comment_notify'));
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment