]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/uapplugin.php
let avatars be served over SSL
[quix0rs-gnu-social.git] / lib / uapplugin.php
index 5160d9662984245994aa84f3e7b71d17fddf5950..ef35bafbfb0fabce891c3439320d8d78438f2f68 100644 (file)
@@ -54,10 +54,10 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
 
 abstract class UAPPlugin extends Plugin
 {
-    public $MediumRectangle = null;
-    public $Rectangle       = null;
-    public $Leaderboard     = null;
-    public $WideSkyscraper  = null;
+    public $mediumRectangle = null;
+    public $rectangle       = null;
+    public $leaderboard     = null;
+    public $wideSkyscraper  = null;
 
     /**
      * Output our dedicated stylesheet
@@ -87,7 +87,8 @@ abstract class UAPPlugin extends Plugin
         if (!is_null($this->mediumRectangle)) {
 
             $action->elementStart('div',
-                                  array('class' => 'ad_medium-rectangle ad'));
+                                  array('id' => 'ad_medium-rectangle',
+                                        'class' => 'ad'));
 
             $this->showMediumRectangle($action);
 
@@ -98,25 +99,40 @@ abstract class UAPPlugin extends Plugin
     }
 
     /**
-     * Add a leaderboard and/or rectangle in the header
+     * Add a leaderboard in the header
      *
      * @param Action $action Action being shown
      *
      * @return boolean hook flag
      */
 
-    function onStartShowHeader($action)
+    function onEndShowHeader($action)
     {
         if (!is_null($this->leaderboard)) {
             $action->elementStart('div',
-                                  array('class' => 'ad_leaderboard ad'));
+                                  array('id' => 'ad_leaderboard',
+                                        'class' => 'ad'));
             $this->showLeaderboard($action);
             $action->elementEnd('div');
         }
 
+        return true;
+    }
+
+    /**
+     * Add a rectangle before aside sections
+     *
+     * @param Action $action Action being shown
+     *
+     * @return boolean hook flag
+     */
+
+    function onStartShowSections($action)
+    {
         if (!is_null($this->rectangle)) {
             $action->elementStart('div',
-                                  array('class' => 'ad_rectangle ad'));
+                                  array('id' => 'ad_rectangle',
+                                        'class' => 'ad'));
             $this->showRectangle($action);
             $action->elementEnd('div');
         }
@@ -136,7 +152,8 @@ abstract class UAPPlugin extends Plugin
     {
         if (!is_null($this->wideSkyscraper)) {
             $action->elementStart('div',
-                                  array('class' => 'ad_wide-skyscraper ad'));
+                                  array('id' => 'ad_wide-skyscraper',
+                                        'class' => 'ad'));
 
             $this->showWideSkyscraper($action);