From: Sarven Capadisli Date: Thu, 12 Feb 2009 22:16:48 +0000 (+0000) Subject: Hooks for: header, contentblock, footer X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dac8d103e69deb63c7eafe16286f23a66034d967;p=quix0rs-gnu-social.git Hooks for: header, contentblock, footer --- diff --git a/EVENTS.txt b/EVENTS.txt index d9634325db..aed3dd9c5a 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -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 + diff --git a/lib/action.php b/lib/action.php index bd38bf79cc..602118cdf0 100644 --- a/lib/action.php +++ b/lib/action.php @@ -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'); }