From c8dab140f41a397c245a8858cb6030e2c985012c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 29 Oct 2010 11:13:33 -0400 Subject: add a hack to show ads on single-notice pages --- lib/uapplugin.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib') diff --git a/lib/uapplugin.php b/lib/uapplugin.php index ef35bafbf..277781768 100644 --- a/lib/uapplugin.php +++ b/lib/uapplugin.php @@ -95,6 +95,24 @@ abstract class UAPPlugin extends Plugin $action->elementEnd('div'); } + // XXX: Hack to force ads to show on single-notice pages + + if (!is_null($this->rectangle) && + $action->trimmed('action') == 'shownotice') { + + $action->elementStart('div', array('id' => 'aside_primary', + 'class' => 'aside')); + + if (Event::handle('StartShowSections', array($action))) { + $action->showSections(); + Event::handle('EndShowSections', array($action)); + } + + $action->elementEnd('div'); + + return false; + } + return true; } -- cgit v1.2.3-54-g00ecf