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:
|
||||
|
||||
** 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
|
||||
into one article and publish it dayly/weekly/whatever
|
||||
* "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.
|
||||
* 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".
|
||||
* Added new URL shortener: pirat.ly.
|
||||
|
||||
1.43 (brockhaus)
|
||||
--------------------------
|
||||
|
|
|
@ -71,6 +71,9 @@ class UrlShortener {
|
|||
case 'twurl':
|
||||
UrlShortener::shorten_via_twurl( $url, $shorturls );
|
||||
break;
|
||||
case 'piratly':
|
||||
UrlShortener::shorten_via_piratly( $url, $shorturls );
|
||||
break;
|
||||
// old removed service
|
||||
case 'snipr':
|
||||
case 'tr.im':
|
||||
|
@ -116,6 +119,11 @@ class UrlShortener {
|
|||
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?!
|
||||
// works *sometimes*
|
||||
function shorten_via_isgd( $url, &$shorturls ) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
|
||||
// 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",
|
||||
'7ax.de' => "7ax.de",
|
||||
'bitly' => "bit.ly",
|
||||
'piratly' => "pirat.ly",
|
||||
'jmp' => "j.mp",
|
||||
'tinyurl' => "tinyurl.com",
|
||||
'isgd' => "is.gd",
|
||||
|
|
Loading…
Reference in a new issue