]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OpenX/OpenXPlugin.php
Merge remote-tracking branch 'statusnet/180' into statusnet_1.1.x
[quix0rs-gnu-social.git] / plugins / OpenX / OpenXPlugin.php
index 3206e4c71148b9f6b19a898ec12c804afae4d340..d288363b21c323e2f06ece4b7effd14b4af33bf7 100644 (file)
@@ -75,7 +75,6 @@ if (!defined('STATUSNET')) {
  *
  * @seeAlso  UAPPlugin
  */
-
 class OpenXPlugin extends UAPPlugin
 {
     public $adScript = null;
@@ -103,7 +102,6 @@ class OpenXPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showMediumRectangle($action)
     {
         $this->showAd($action, $this->mediumRectangle);
@@ -116,7 +114,6 @@ class OpenXPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showRectangle($action)
     {
         $this->showAd($action, $this->rectangle);
@@ -129,7 +126,6 @@ class OpenXPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showWideSkyscraper($action)
     {
         $this->showAd($action, $this->wideSkyscraper);
@@ -142,7 +138,6 @@ class OpenXPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showLeaderboard($action)
     {
         $this->showAd($action, $this->leaderboard);
@@ -156,7 +151,6 @@ class OpenXPlugin extends UAPPlugin
      *
      * @return void
      */
-
     protected function showAd($action, $zone)
     {
 $scr = <<<ENDOFSCRIPT
@@ -181,7 +175,7 @@ ENDOFSCRIPT;
 
     function onRouterInitialized($m)
     {
-        $m->connect('admin/openx',
+        $m->connect('panel/openx',
                     array('action' => 'openxadminpanel'));
 
         return true;
@@ -203,12 +197,31 @@ ENDOFSCRIPT;
 
     function onEndAdminPanelNav($menu) {
         if (AdminPanelAction::canAdmin('openx')) {
-            // TRANS: Menu item title/tooltip
-            $menu_title = _m('OpenX configuration');
+            // TRANS: Menu item title.
+            $menu_title = _m('OpenX configuration.');
             // TRANS: Menu item for site administration
             $menu->out->menuItem(common_local_url('openxadminpanel'), _m('OpenX'),
                                  $menu_title, $action_name == 'openxadminpanel', 'nav_openx_admin_panel');
         }
         return true;
     }
+
+    /**
+     * Add our version information to output
+     *
+     * @param array &$versions Array of version-data arrays
+     *
+     * @return boolean hook value
+     */
+    function onPluginVersion(&$versions)
+    {
+        $versions[] = array('name' => 'OpenX',
+                            'version' => STATUSNET_VERSION,
+                            'author' => 'Evan Prodromou',
+                            'homepage' => 'http://status.net/wiki/Plugin:OpenX',
+                            'rawdescription' =>
+                            // TRANS: Plugin description.
+                            _m('Plugin for <a href="http://www.openx.org/">OpenX Ad Server</a>.'));
+        return true;
+    }
 }