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 Service Links 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 Service link's maintainers, and provide even shorter URLs in many cases for services like Tweet.

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.

Thoughts?

CommentFileSizeAuthor
#4 service_links-458968.patch2.53 KBkmonty
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

IceCreamYou’s picture

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

IceCreamYou’s picture

Marked #529078 as duplicate

kmonty’s picture

I would love to see this in action.

kmonty’s picture

Status: Active » Needs review
FileSize
2.53 KB

Turns out this was an easy feature request. That said, I am still having trouble getting the shortened url to show up in the twitter share links #598282: Twitter TinyURL does not appear to work

Ingumsky’s picture

kmonty
Thank you! There's a feature (shorten/service links integration) I really need.

CarbonPig’s picture

subscribe

TheCrow’s picture

Status: Needs review » Fixed

Added it, thank you @kmonty

Status: Fixed » Closed (fixed)

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

arrays’s picture

Status: Closed (fixed) » Active

Hi,

I am re-opening this issue. I am using shorten urls in integration with bit.ly and with service links module. My ask is to short those urls which are being shared via service links.

But what i noticed is service_links_render() function calls the shorten_url() function and creates short url when service links are being rendered, this way every page load creating a short url.

Whereas, integrating service links with shorten_url IMO should work in a manner that when user clicks on a service to share the url, it should get shorten via the short url service so that we can track only those urls which are being actually shared rather than just page visits.

Please help in this regard or please tell me if I am missing anything in settings or somewhere.

Thanks.
Arrays.

TheCrow’s picture

Status: Active » Closed (fixed)

with widgets the dynamic shortener will never work, with static links we should provide a javascript which shorten the URL when the link is clicked, but this will not work when the javascript is disabled, the second way would be alter the URL and redirect to a page which shorten the URL and send the link to the service.... too much work for a bad way to implement a statistical feature.