]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/LilUrl/LilUrlPlugin.php
add versions for url-shortener plugins
[quix0rs-gnu-social.git] / plugins / LilUrl / LilUrlPlugin.php
index 4a6f1cdc79cdeca5746dbff4344f79c82e6b9a27..c3e37c0c0f358a76bde8bf9633992f947fe7c034 100644 (file)
@@ -46,9 +46,9 @@ class LilUrlPlugin extends UrlShortenerPlugin
 
     protected function shorten($url) {
         $data = array('longurl' => $url);
-        
+
         $responseBody = $this->http_post($this->serviceUrl,$data);
-        
+
         if (!$responseBody) return;
         $y = @simplexml_load_string($responseBody);
         if (!isset($y->body)) return;
@@ -57,5 +57,18 @@ class LilUrlPlugin extends UrlShortenerPlugin
             return strval($x['href']);
         }
     }
+
+    function onPluginVersion(&$versions)
+    {
+        $versions[] = array('name' => sprintf('LilUrl (%s)', $this->shortenerName),
+                            'version' => STATUSNET_VERSION,
+                            'author' => 'Craig Andrews',
+                            'homepage' => 'http://status.net/wiki/Plugin:LilUrl',
+                            'rawdescription' =>
+                            sprintf(_m('Uses <a href="http://%1$s/">%1$s</a> URL-shortener service.'),
+                                    $this->shortenerName));
+
+        return true;
+    }
 }