Integrate with Shorten URLs module

IceCreamYou - May 11, 2009 - 00:29
Project:Twitter
Version:6.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (to be ported)
Description

I've just released the Shorten URLs module, which makes it very easy to create short URLs from any of at least 14 services. Shorten URLs takes care of any problems that could arise if getting a short URL is taking too long or if the service is unavailable.

I think Twitter would benefit from integrating with Shorten URLs instead of handling its own URL shortening at TinyURL. This would give users more flexibility in how to handle URL shortening, take some of the burden off the shoulders of Twitter's maintainers, and provide even shorter URLs in many cases than TinyURL can.

To produce a short URL, you just need to call shorten_shorten($url_to_be_shortened) and Shorten URLs will take care of the rest. This would replace calls to twitter_shorten_url($url) in the current API.

Thoughts?

#1

bsherwood - May 11, 2009 - 19:52

While I like this idea, personally I would not want to see a basic module like Twitter start adding dependencies. Maybe someone can code the integration of your module with Twitter and make it so your module extends the Twitter module without making it a dependency (i.e module_exists() hook)

#2

IceCreamYou - May 12, 2009 - 00:14

Yeah, it wouldn't be a dependency. There are three lines in twitter.module at the moment which allow a single, site-specific module to add a custom way to shorten URLs. Presumably, those would be replaced with this:

<?php
 
if (module_exists('shorten')) {
    return
shorten_shorten($url);
  }
?>

#3

IceCreamYou - May 14, 2009 - 01:39

FYI, shorten_shorten() is now shorten_url() in the 1.1 release and later.

#4

IceCreamYou - July 2, 2009 - 21:17
Status:active» fixed

According to the 6.x-2.6 release node, this has been fixed! Thanks.

#5

System Message - July 16, 2009 - 21:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#6

IceCreamYou - October 21, 2009 - 04:26
Version:6.x-2.x-dev» 6.x-3.x-dev
Status:closed» patch (to be ported)

Re-opening as this somehow didn't make it into the 3.x branch.

 
 

Drupal is a registered trademark of Dries Buytaert.