X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fuapplugin.php;h=ef35bafbfb0fabce891c3439320d8d78438f2f68;hb=d6869cde7ba7e577d54f0c6ecab3599dc85f0f67;hp=5160d9662984245994aa84f3e7b71d17fddf5950;hpb=7c54591472b4ff997ea099792c95d40b98798381;p=quix0rs-gnu-social.git diff --git a/lib/uapplugin.php b/lib/uapplugin.php index 5160d96629..ef35bafbfb 100644 --- a/lib/uapplugin.php +++ b/lib/uapplugin.php @@ -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);