plugin_twitter: Added pirat.ly as possible URL shortener.
This commit is contained in:
parent
fe9308fc2a
commit
c1291a5857
4 changed files with 12 additions and 8 deletions
|
@ -1,11 +1,5 @@
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
** IMPORTANT **
|
|
||||||
|
|
||||||
Migrate Twitter API 1 calls to 1.1. Now requires OAuth even for simple timeline requests. Blimey.
|
|
||||||
|
|
||||||
****************
|
|
||||||
|
|
||||||
* Collect all tweets of a day/week/whatever of the blog owner
|
* Collect all tweets of a day/week/whatever of the blog owner
|
||||||
into one article and publish it dayly/weekly/whatever
|
into one article and publish it dayly/weekly/whatever
|
||||||
* "check tweetback" link should add new tweetbacks immediately
|
* "check tweetback" link should add new tweetbacks immediately
|
||||||
|
@ -20,6 +14,7 @@ Migrate Twitter API 1 calls to 1.1. Now requires OAuth even for simple timeline
|
||||||
* Already implemented OAuth function will call API 1.1 instead of API 1.0 now.
|
* Already implemented OAuth function will call API 1.1 instead of API 1.0 now.
|
||||||
* Sitebar plugin, PHP version, optional uses Twitter API 1.1 with OAuth now.
|
* Sitebar plugin, PHP version, optional uses Twitter API 1.1 with OAuth now.
|
||||||
* Tweeter hides URL shortener functionality now if URL shortener is set to "uncompressed".
|
* Tweeter hides URL shortener functionality now if URL shortener is set to "uncompressed".
|
||||||
|
* Added new URL shortener: pirat.ly.
|
||||||
|
|
||||||
1.43 (brockhaus)
|
1.43 (brockhaus)
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
|
@ -71,6 +71,9 @@ class UrlShortener {
|
||||||
case 'twurl':
|
case 'twurl':
|
||||||
UrlShortener::shorten_via_twurl( $url, $shorturls );
|
UrlShortener::shorten_via_twurl( $url, $shorturls );
|
||||||
break;
|
break;
|
||||||
|
case 'piratly':
|
||||||
|
UrlShortener::shorten_via_piratly( $url, $shorturls );
|
||||||
|
break;
|
||||||
// old removed service
|
// old removed service
|
||||||
case 'snipr':
|
case 'snipr':
|
||||||
case 'tr.im':
|
case 'tr.im':
|
||||||
|
@ -116,6 +119,11 @@ class UrlShortener {
|
||||||
UrlShortener::shorten_via_simple($shorturls, '7ax.de', "http://7ax.de/api.php?url=$url");
|
UrlShortener::shorten_via_simple($shorturls, '7ax.de', "http://7ax.de/api.php?url=$url");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function shorten_via_piratly( $url, &$shorturls ) {
|
||||||
|
$url = urlencode($url);
|
||||||
|
UrlShortener::shorten_via_simple($shorturls, 'piratly', "http://pirat.ly/shortener/createplain/0/?$url");
|
||||||
|
}
|
||||||
|
|
||||||
// is.gd returns different short urls for same URL! How to handle this?!
|
// is.gd returns different short urls for same URL! How to handle this?!
|
||||||
// works *sometimes*
|
// works *sometimes*
|
||||||
function shorten_via_isgd( $url, &$shorturls ) {
|
function shorten_via_isgd( $url, &$shorturls ) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Actual version of both plugins
|
// Actual version of both plugins
|
||||||
@define('PLUGIN_TWITTER_VERSION', '1.46.beta');
|
@define('PLUGIN_TWITTER_VERSION', '1.46');
|
||||||
|
|
|
@ -37,6 +37,7 @@ class serendipity_event_twitter extends serendipity_plugin {
|
||||||
'raw' => "uncompressed",
|
'raw' => "uncompressed",
|
||||||
'7ax.de' => "7ax.de",
|
'7ax.de' => "7ax.de",
|
||||||
'bitly' => "bit.ly",
|
'bitly' => "bit.ly",
|
||||||
|
'piratly' => "pirat.ly",
|
||||||
'jmp' => "j.mp",
|
'jmp' => "j.mp",
|
||||||
'tinyurl' => "tinyurl.com",
|
'tinyurl' => "tinyurl.com",
|
||||||
'isgd' => "is.gd",
|
'isgd' => "is.gd",
|
||||||
|
|
Loading…
Reference in a new issue