]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Hooks for: header, contentblock, footer
authorSarven Capadisli <csarven@controlyourself.ca>
Thu, 12 Feb 2009 22:16:48 +0000 (22:16 +0000)
committerSarven Capadisli <csarven@controlyourself.ca>
Thu, 12 Feb 2009 22:16:48 +0000 (22:16 +0000)
EVENTS.txt
lib/action.php

index d9634325dbb73701b6542fae5a163f262364be72..aed3dd9c5a451ee55185e8f6deb4ad204e8c7471 100644 (file)
@@ -39,3 +39,22 @@ StartShowSections: Start the list of sections in the sidebar
 
 EndShowSections: End the list of sections in the sidebar
 - $action: the current action
+
+StartShowHeader: Showing before the header container
+- $action: the current action
+
+EndShowHeader: Showing after the header container
+- $action: the current action
+
+StartShowFooter: Showing before the footer container
+- $action: the current action
+
+EndShowFooter: Showing after the footer container
+- $action: the current action
+
+StartShowContentBlock: Showing before the content container
+- $action: the current action
+
+EndShowContentBlock: Showing after the content container
+- $action: the current action
+
index bd38bf79ccbf8dd6a55a08a9a753f49d0ec1dd1f..602118cdf0af1dd6c4b15bff792edf441cc7a705 100644 (file)
@@ -275,9 +275,15 @@ class Action extends HTMLOutputter // lawsuit
     {
         $this->elementStart('body', array('id' => $this->trimmed('action')));
         $this->elementStart('div', array('id' => 'wrap'));
-        $this->showHeader();
+        if (Event::handle('StartShowHeader', array($this))) {
+            $this->showHeader();
+            Event::handle('EndShowHeader', array($this));
+        }
         $this->showCore();
-        $this->showFooter();
+        if (Event::handle('StartShowFooter', array($this))) {
+            $this->showFooter();
+            Event::handle('EndShowFooter', array($this));
+        }
         $this->elementEnd('div');
         $this->elementEnd('body');
     }
@@ -432,7 +438,10 @@ class Action extends HTMLOutputter // lawsuit
     {
         $this->elementStart('div', array('id' => 'core'));
         $this->showLocalNavBlock();
-        $this->showContentBlock();
+        if (Event::handle('StartShowContentBlock', array($this))) {
+            $this->showContentBlock();
+            Event::handle('EndShowContentBlock', array($this));
+        }
         $this->showAside();
         $this->elementEnd('div');
     }