]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add a hack to show ads on single-notice pages
authorEvan Prodromou <evan@status.net>
Fri, 29 Oct 2010 15:13:33 +0000 (11:13 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 29 Oct 2010 15:13:33 +0000 (11:13 -0400)
lib/uapplugin.php

index ef35bafbfb0fabce891c3439320d8d78438f2f68..2777817684abb48f7d13b378e6a2ea9e7849a6ab 100644 (file)
@@ -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;
     }