]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/BlankAd/BlankAdPlugin.php
Using GNUSOCIAL_VERSION instead of STATUSNET_VERSION
[quix0rs-gnu-social.git] / plugins / BlankAd / BlankAdPlugin.php
index 0e2719aed032e5e271357dad838b0198d64eda51..49f70e68a4e8fb4ea3aee7912b1e6e9ef29aafa0 100644 (file)
@@ -51,7 +51,6 @@ if (!defined('STATUSNET')) {
  *
  * @seeAlso  Location
  */
-
 class BlankAdPlugin extends UAPPlugin
 {
     /**
@@ -61,13 +60,12 @@ class BlankAdPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showMediumRectangle($action)
     {
         $action->element('img',
                          array('width' => 300,
                                'height' => 250,
-                               'src' => common_path('plugins/BlankAd/redpixel.png')),
+                               'src' => $this->path('redpixel.png')),
                          '');
     }
 
@@ -78,13 +76,12 @@ class BlankAdPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showRectangle($action)
     {
         $action->element('img',
                          array('width' => 180,
                                'height' => 150,
-                               'src' => common_path('plugins/BlankAd/redpixel.png')),
+                               'src' => $this->path('redpixel.png')),
                          '');
     }
 
@@ -95,13 +92,12 @@ class BlankAdPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showWideSkyscraper($action)
     {
         $action->element('img',
                          array('width' => 160,
                                'height' => 600,
-                               'src' => common_path('plugins/BlankAd/redpixel.png')),
+                               'src' => $this->path('redpixel.png')),
                          '');
     }
 
@@ -112,13 +108,24 @@ class BlankAdPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showLeaderboard($action)
     {
         $action->element('img',
                          array('width' => 728,
                                'height' => 90,
-                               'src' => common_path('plugins/BlankAd/redpixel.png')),
+                               'src' => $this->path('redpixel.png')),
                          '');
     }
-}
\ No newline at end of file
+
+    function onPluginVersion(&$versions)
+    {
+        $versions[] = array('name' => 'BlankAd',
+                            'version' => GNUSOCIAL_VERSION,
+                            'author' => 'Evan Prodromou',
+                            'homepage' => 'http://status.net/wiki/Plugin:BlankAdPlugin',
+                            'rawdescription' =>
+                            // TRANS: Plugin description.
+                            _m('Plugin for testing ad layout.'));
+        return true;
+    }
+}