On: 2009/06/25 Viewed: 11259 times
Shorter URL for this page: http://ozh.in/m7

yourls-logoYOURLS (Your Own URL Shortener) is a URL shortener, like TinyURL, except it’s all GPL and you can run it on your own server, publicly or for your own use only. It was made by Lester Chan and myself. Learn more about YOURLS.

This plugin, YOURLS: WordPress to Twitter, is the bridge between YOURLS, Twitter and your blog: when you publish a post or a page, it will use your own YOURLS install, either hosted on the same webserver, or another server, to create a short URL for your post and send it to your Twitter account. The plugin also works with public popular services such as TinyURL, tr.im, is.gd or bit.ly.

Download

Download the plugin : yourls-wordpress-to-twitter.zip
Extract and upload to your blog, preserving directory structure.
Enjoy.

Features and configuration

I’m going to be lazy, aren’t screenshots worth a thousand words? Here are 3000 words.

Plugin configuration:
screenshot-1

Title little helper: count characters to help you keep under the tweetable 140 char limit:
screenshot-2

From the Write screen, you can (re)generate short URLs and (re)promote your (old, for example) posts:
screenshot-3

Template Tags for you theme

The plugin comes with two template tags:

wp_ozh_yourls_url()
Will echo a HTML link with short URL (will generate it on the fly if needed) for the current post.
Example output: <a href="http://ozh.in/j5" rel="nofollow alternate shorter" title="short URL">http://ozh.in/j5</a>
Suggested use: in the loop, in single.php, in page.php

wp_ozh_yourls_head_linkrel()
Will output a <link/> in <head> for the current post (see revcanonical.appspot.com and shorturl.appjet.net for more info)
Example output: <link rel="alternate short shorter shorturl" href="http://ozh.in/j5" />\n
Suggested use: in header.php, if is_single() or is_page()

wp_ozh_yourls_raw_url()
Will return (or echo if you pass true to it) the short URL, with no HTML tag or anything else. Just the raw URL.

Feedback

Yeah. Go ahead.

Related posts

Shorter URL

Want to share or tweet this page? Please use this short URL: http://ozh.in/m7

Metastuff

This page "YOURLS: WordPress To Twitter (a Short URL Plugin)" was posted on 25/06/2009 at 10:15 pm
Watch this discussion : Comments RSS 2.0.

134 Blablas

    Pages: [14] 13 12 11 10 9 8 7 6 5 41 » Show All

  1. 134
    Martyn Great Britain (UK) »
    wrote, on 06/Feb/10 at 2:32 pm # :

    I know 100% that this is a user (me) issue! But driving this newbie crazy so just after some help!
    I’ve installed YOURLS in my public_html dir in sub dir /s
    I’ve changed config.php (& included the /s) & tried a variety of paths in the plugin settings.
    The YOULRS function works if I navigate straight to the page & type in a url manually, but within wordpress once I post a new entry, this doesn’t create a url in the YOURLS page.
    I don’t even see the screenshot as above in the write page (to re-create short urls)

    Gotta be missing something :)
    Thanks in advance
    Martyn

  2. 133
    Ozh France »
    thought, on 04/Feb/10 at 6:38 am # :

    Garret » multi user is planned as a future feature of YOURLS, so I’d feel a bit dishonest to charge anyone to code it. Although there’s no ETA for it.

  3. 132
    Garret United States »
    wrote, on 04/Feb/10 at 12:52 am # :

    Ozh,

    Was wondering if you were open to getting paid for pushing forward some additions to Yourls.

    Looking for true multi user with email verification on sign-up.

    Extending stats as an aggregate per user would be nice too, enabling true reporting on stats.

    Thanks
    Garret

  4. 131
    Ozh France »
    replied, on 25/Jan/10 at 6:38 am # :

    Garret » A future version of YOURLS will be multi user, probably

Pages: [14] 13 12 11 10 9 8 7 6 5 41 » Show All

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Close
E-mail It