Browse code

Add explanation for service config and references for preset services

Benjamin Roth authored on12/12/2019 11:09:38
Showing5 changed files
... ...
@@ -48,6 +48,7 @@ $GLOBALS['TL_DCA']['tl_page']['fields']['cookieconsent_services'] = array
48 48
   'exclude' => true,
49 49
   'inputType' => 'checkbox',
50 50
   'options' => array('analytics','matomo'),
51
+  'reference' => &$GLOBALS['TL_LANG']['REF']['tl_page']['cookieconsent_services'],
51 52
   'eval' => array('multiple'=>true, 'tl_class' => 'clr'),
52 53
   'sql' => "blob NULL",
53 54
 );
... ...
@@ -58,7 +59,7 @@ $GLOBALS['TL_DCA']['tl_page']['fields']['cookieconsent_categories_custom'] = arr
58 59
   'exclude' => true,
59 60
   'inputType' => 'textarea',
60 61
   'explanation' => 'cookieconsent_categories',
61
-  'eval' => array('allowHtml'=>true, 'class'=>'monospace', 'rte'=>'ace|javascript', 'tl_class'=>'clr'),
62
+  'eval' => array('allowHtml'=>true, 'class'=>'monospace', 'rte'=>'ace|javascript', 'tl_class'=>'clr', 'helpwizard'=>true),
62 63
   'sql'=> "mediumtext NULL"
63 64
 );
64 65
 
... ...
@@ -67,7 +68,8 @@ $GLOBALS['TL_DCA']['tl_page']['fields']['cookieconsent_services_custom'] = array
67 68
   'label' => &$GLOBALS['TL_LANG']['tl_page']['cookieconsent_services_custom'],
68 69
   'exclude' => true,
69 70
   'inputType' => 'textarea',
70
-  'eval' => array('allowHtml'=>true, 'class'=>'monospace', 'rte'=>'ace|javascript', 'tl_class'=>'clr'),
71
+  'explanation' => 'cookieconsent_services',
72
+  'eval' => array('allowHtml'=>true, 'class'=>'monospace', 'rte'=>'ace|javascript', 'tl_class'=>'clr', 'helpwizard'=>true),
71 73
   'sql'=> "mediumtext NULL"
72 74
 );
73 75
 
... ...
@@ -15,20 +15,40 @@ $GLOBALS['TL_LANG']['XPL']['cookieconsent_categories'][] = array
15 15
 (
16 16
   "Beispielkonfiguration für eine Kategorie",
17 17
   "ads: {
18
-  needed: false,
18
+    needed: false,
19 19
     wanted: false,
20 20
     checked: false,
21 21
     language: {
22
-    locale: {
23
-      de: {
24
-        name: 'Werbung und Marketing',
25
-				description: 'Diese Cookies erlauben uns Werbung zielgerichtet für Sie azsuliefern. Dadurch sehen Sie ggf. für Sie relevantere Werbeanzeigen.',
26
-      },
27
-      en: {
28
-        name: 'Ads and Marketing',
29
-				description: 'These cookies allow us to deliver targeted advertising to you. This allows you to see advertisements that may be more relevant to you.',
22
+      locale: {
23
+        de: {
24
+          name: 'Werbung und Marketing',
25
+          description: 'Diese Cookies erlauben uns Werbung zielgerichtet für Sie azsuliefern. Dadurch sehen Sie ggf. für Sie relevantere Werbeanzeigen.',
26
+        },
27
+        en: {
28
+          name: 'Ads and Marketing',
29
+          description: 'These cookies allow us to deliver targeted advertising to you. This allows you to see advertisements that may be more relevant to you.',
30
+        }
30 31
       }
31 32
     }
32
-  }
33
-}"
33
+  }"
34
+);
35
+
36
+$GLOBALS['TL_LANG']['XPL']['cookieconsent_services'][] = array
37
+(
38
+  "Beispielkonfiguration für einen Service",
39
+  "analytics: {
40
+    category: 'necessary',
41
+    type: 'dynamic-script',
42
+    search: 'analytics',
43
+    language: {
44
+      locale: {
45
+        de: {
46
+          name: 'Google Analytics'
47
+        },
48
+        en: {
49
+          name: 'Google Analytics'
50
+        }
51
+      }
52
+    }
53
+  }"
34 54
 );
... ...
@@ -22,3 +22,11 @@ $GLOBALS['TL_LANG']['tl_page']['cookieconsent_categories_custom'] = array('Weite
22 22
  */
23 23
 $GLOBALS['TL_LANG']['tl_page']['cookieconsent_legend'] = 'Cookie-Einwilligung';
24 24
 
25
+/**
26
+ * References
27
+ */
28
+$GLOBALS['TL_LANG']['REF']['tl_page']['cookieconsent_services'] = array
29
+(
30
+  'analytics' => 'Google Analytics',
31
+  'matomo'    => 'Matomo/Piwik'
32
+);
... ...
@@ -15,20 +15,40 @@ $GLOBALS['TL_LANG']['XPL']['cookieconsent_categories'][] = array
15 15
 (
16 16
   "Example configuration for a category",
17 17
   "ads: {
18
-  needed: false,
18
+    needed: false,
19 19
     wanted: false,
20 20
     checked: false,
21 21
     language: {
22
-    locale: {
23
-      de: {
24
-        name: 'Werbung und Marketing',
25
-				description: 'Diese Cookies erlauben uns Werbung zielgerichtet für Sie azsuliefern. Dadurch sehen Sie ggf. für Sie relevantere Werbeanzeigen.',
26
-      },
27
-      en: {
28
-        name: 'Ads and Marketing',
29
-				description: 'These cookies allow us to deliver targeted advertising to you. This allows you to see advertisements that may be more relevant to you.',
22
+      locale: {
23
+        de: {
24
+          name: 'Werbung und Marketing',
25
+          description: 'Diese Cookies erlauben uns Werbung zielgerichtet für Sie azsuliefern. Dadurch sehen Sie ggf. für Sie relevantere Werbeanzeigen.',
26
+        },
27
+        en: {
28
+          name: 'Ads and Marketing',
29
+          description: 'These cookies allow us to deliver targeted advertising to you. This allows you to see advertisements that may be more relevant to you.',
30
+        }
30 31
       }
31 32
     }
32
-  }
33
-}"
33
+  }"
34
+);
35
+
36
+$GLOBALS['TL_LANG']['XPL']['cookieconsent_services'][] = array
37
+(
38
+  "Example configuration for a service",
39
+  "analytics: {
40
+    category: 'necessary',
41
+    type: 'dynamic-script',
42
+    search: 'analytics',
43
+    language: {
44
+      locale: {
45
+        de: {
46
+          name: 'Google Analytics'
47
+        },
48
+        en: {
49
+          name: 'Google Analytics'
50
+        }
51
+      }
52
+    }
53
+  }"
34 54
 );
... ...
@@ -22,3 +22,11 @@ $GLOBALS['TL_LANG']['tl_page']['cookieconsent_categories_custom'] = array('Custo
22 22
  */
23 23
 $GLOBALS['TL_LANG']['tl_page']['cookieconsent_legend'] = 'Cookie-Consent';
24 24
 
25
+/**
26
+ * References
27
+ */
28
+$GLOBALS['TL_LANG']['REF']['tl_page']['cookieconsent_services'] = array
29
+(
30
+  'analytics' => 'Google Analytics',
31
+  'matomo'    => 'Matomo/Piwik'
32
+);