Add the moved BlankAdPlugin

This commit is contained in:
Evan Prodromou 2010-01-27 07:51:25 -05:00
parent b2b95bd21f
commit e4393ee6db

View File

@ -35,14 +35,13 @@ if (!defined('STATUSNET')) {
* Plugin for testing ad layout * Plugin for testing ad layout
* *
* This plugin uses the UAPPlugin framework to output ad content. However, * This plugin uses the UAPPlugin framework to output ad content. However,
* its ad content is just paragraphs with defined background colors. It's * its ad content is just images with one red pixel stretched to the
* mostly useful for debugging theme layout. * right size. It's mostly useful for debugging theme layout.
* *
* To use this plugin, set the parameter for the ad size you want to use * To use this plugin, set the parameter for the ad size you want to use
* to the background you want to use. For example, to make a leaderboard * to true (or anything non-null). For example, to make a leaderboard:
* that's red:
* *
* addPlugin('BlankAd', array('leaderboard' => 'red')); * addPlugin('BlankAd', array('leaderboard' => true));
* *
* @category Plugin * @category Plugin
* @package StatusNet * @package StatusNet
@ -65,10 +64,11 @@ class BlankAdPlugin extends UAPPlugin
protected function showMediumRectangle($action) protected function showMediumRectangle($action)
{ {
$style = 'width: 300px; height: 250px; background-color: ' . $action->element('img',
$this->mediumRectangle; array('width' => 300,
'height' => 250,
$action->element('p', array('style' => $style), ''); 'src' => common_path('plugins/BlankAd/redpixel.png')),
'');
} }
/** /**
@ -81,10 +81,11 @@ class BlankAdPlugin extends UAPPlugin
protected function showRectangle($action) protected function showRectangle($action)
{ {
$style = 'width: 180px; height: 150px; background-color: ' . $action->element('img',
$this->rectangle; array('width' => 180,
'height' => 50,
$action->element('p', array('style' => $style), ''); 'src' => common_path('plugins/BlankAd/redpixel.png')),
'');
} }
/** /**
@ -97,10 +98,11 @@ class BlankAdPlugin extends UAPPlugin
protected function showWideSkyscraper($action) protected function showWideSkyscraper($action)
{ {
$style = 'width: 160px; height: 600px; background-color: ' . $action->element('img',
$this->wideSkyscraper; array('width' => 160,
'height' => 600,
$action->element('p', array('style' => $style), ''); 'src' => common_path('plugins/BlankAd/redpixel.png')),
'');
} }
/** /**
@ -113,9 +115,10 @@ class BlankAdPlugin extends UAPPlugin
protected function showLeaderboard($action) protected function showLeaderboard($action)
{ {
$style = 'width: 728px; height: 90px; background-color: ' . $action->element('img',
$this->leaderboard; array('width' => 728,
'height' => 90,
$action->element('p', array('style' => $style), ''); 'src' => common_path('plugins/BlankAd/redpixel.png')),
'');
} }
} }