summaryrefslogtreecommitdiff
path: root/plugins/LilUrl
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-08 00:20:38 -0800
committerEvan Prodromou <evan@status.net>2010-01-08 00:20:38 -0800
commit054aaa40bf89fd6726f16fb6dcfe6dfab03ef45c (patch)
tree065f6ca6c628912233ca327cf92652525155cc9c /plugins/LilUrl
parent505cd382f3d0d37f3d9581a907877e644b5118fd (diff)
add versions for url-shortener plugins
Diffstat (limited to 'plugins/LilUrl')
-rw-r--r--plugins/LilUrl/LilUrlPlugin.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/LilUrl/LilUrlPlugin.php b/plugins/LilUrl/LilUrlPlugin.php
index 4a6f1cdc7..c3e37c0c0 100644
--- a/plugins/LilUrl/LilUrlPlugin.php
+++ b/plugins/LilUrl/LilUrlPlugin.php
@@ -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;
+ }
}