| 1 |
<?php |
<?php |
| 2 |
// $Id: twitter.module,v 1.3.2.11 2009/04/08 18:09:01 eaton Exp $ |
// $Id: twitter.module,v 1.3.2.12 2009/04/09 14:34:26 eaton Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_meu() |
* Implementation of hook_meu() |
| 143 |
* Very lightweight helper function to generate a TinyURL for a given post. |
* Very lightweight helper function to generate a TinyURL for a given post. |
| 144 |
*/ |
*/ |
| 145 |
function twitter_shorten_url($url) { |
function twitter_shorten_url($url) { |
| 146 |
if (function_exists('custom_twitter_shorten_url')) { |
if (module_exists('shorten')) { |
| 147 |
return custom_twitter_shorten_url($url); |
return shorten_url($url); |
| 148 |
} |
} |
| 149 |
else { |
else { |
| 150 |
$response = drupal_http_request("http://tinyurl.com/api-create.php?url=" . $url); |
$response = drupal_http_request("http://tinyurl.com/api-create.php?url=" . $url); |