Title: colaja's Replies | WordPress.org

---

# colaja

  [  ](https://wordpress.org/support/users/colaja/)

 *   [Profile](https://wordpress.org/support/users/colaja/)
 *   [Topics Started](https://wordpress.org/support/users/colaja/topics/)
 *   [Replies Created](https://wordpress.org/support/users/colaja/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/colaja/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/colaja/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/colaja/engagements/)
 *   [Favorites](https://wordpress.org/support/users/colaja/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Sociable] Using shorter URLs for TwitThis](https://wordpress.org/support/topic/plugin-sociable-using-shorter-urls-for-twitthis/)
 *  [colaja](https://wordpress.org/support/users/colaja/)
 * (@colaja)
 * [17 years ago](https://wordpress.org/support/topic/plugin-sociable-using-shorter-urls-for-twitthis/#post-1053424)
 * here is my workaround to get shorten url and implement in sociable plugin:
 * step 1: add following lines in functions.php
    // Ondemand function to generate
   tinyurl function getTinyUrl($url) { $tinyurl = file_get_contents(“[http://tinyurl.com/api-create.php?url=&#8221](http://tinyurl.com/api-create.php?url=&#8221);.
   $url); return $tinyurl; }
 * step 2: open sociable.php
 * – in block “// Load the post’s data” I added line
    $turl = getTinyUrl(get_permalink(
   $post->ID));
 * – then few lines below, just below “$url = str_replace(‘EXCERPT’, $excerpt, $
   url);” I added following line
    $url = str_replace(‘TINY’, $turl, $url);
 * – and at the end in block “$sociable_known_sites = Array(” I found and change‘
   TwittThis’ to following
    ‘TwitThis’ => Array( ‘favicon’ => ‘twitter.png’, ‘url’
   => ‘[http://twitter.com/home?status=TINY&#8217](http://twitter.com/home?status=TINY&#8217);,),
 * Works for me 🙂

Viewing 1 replies (of 1 total)