Browse code

Inject Init Code

Benjamin Roth authored on11/12/2019 14:32:02
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-<?php
2
-
3
-/*
4
-* This file is part of eSales Media cookieconsent module
5
-*
6
-* (c) Benjamin Roth
7
-*
8
-* @license https://www.gnu.org/licenses/gpl-3.0.html GPL
9
-*/
10
-
11
-namespace EsalesMedia\Cookieconsent\EventListener;
12
-
13
-class TemplateListener
14
-{
15
-  public function onOutputFrontendTemplate($strBuffer)
16
-  {
17
-    $Template = new \FrontendTemplate('cookieconsent');
18
-
19
-    $strInject = $Template->parse();
20
-    return str_replace('</body>',$strInject . '</body>',$strBuffer);
21
-  }
22
-}
23 0
\ No newline at end of file
Browse code

Inject Init Code

Benjamin Roth authored on11/12/2019 14:16:27
Showing1 changed files
... ...
@@ -16,7 +16,7 @@ class TemplateListener
16 16
   {
17 17
     $Template = new \FrontendTemplate('cookieconsent');
18 18
 
19
-    $Template->parse();
20
-    return $strBuffer;
19
+    $strInject = $Template->parse();
20
+    return str_replace('</body>',$strInject . '</body>',$strBuffer);
21 21
   }
22 22
 }
23 23
\ No newline at end of file
Browse code

Test script injection

Benjamin Roth authored on11/12/2019 13:43:09
Showing1 changed files
... ...
@@ -14,6 +14,9 @@ class TemplateListener
14 14
 {
15 15
   public function onOutputFrontendTemplate($strBuffer)
16 16
   {
17
+    $Template = new \FrontendTemplate('cookieconsent');
18
+
19
+    $Template->parse();
17 20
     return $strBuffer;
18 21
   }
19 22
 }
20 23
\ No newline at end of file
Browse code

Initial commit

Benjamin Roth authored on11/12/2019 13:27:07
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+<?php
2
+
3
+/*
4
+* This file is part of eSales Media cookieconsent module
5
+*
6
+* (c) Benjamin Roth
7
+*
8
+* @license https://www.gnu.org/licenses/gpl-3.0.html GPL
9
+*/
10
+
11
+namespace EsalesMedia\Cookieconsent\EventListener;
12
+
13
+class TemplateListener
14
+{
15
+  public function onOutputFrontendTemplate($strBuffer)
16
+  {
17
+    return $strBuffer;
18
+  }
19
+}
0 20
\ No newline at end of file