Autochrome Photography Wordpress theme for just $25. Get Yours

Tiny Link – a WordPress plugin to create a TinyURL for your articles

— By

I was in search of a way to automagically get an alternate short link for the lengthy URL of my articles. I tried a plugin but somehow went kaput and never worked for me. I decided to write one for myself and came up with a very simple solution. – Tiny Link.

Well, Tiny Link is a WordPress plugin that creates an alternate TinyURL link to your article or post permalink.

I hope this will be useful while sending hyperlinks in emails to avoid the word-wrap for lengthy article URLs. This should also be useful (as far as I can guess) to mobile device users so they will can type a shorter url to read an article.

TINY LINK

USAGE

The most straight forward usage would be to add this simple script

<?php TinyLink() ?>

to one of your template – “single.php”.

However, a slightly advanced usage will be, to first check if the plugin is installed, if yes, then execute this module. We can even give a direct link to it, so users can copy the link by right-clicking (Mac: Ctrl + Click) the hyperlink.

<?php if (function_exists('TinyLink')) { ?>
Tiny alternate link for this article: 
<a href="<?php TinyLink() ?>" title="TinyURL link to - <?php the_title(); ?>"><?php TinyLink() ?></a>
<?php } ?>

Feel free to give me your feedbacks, errors encountered, bugs founds, et al. If you wish to take it further, you’re most welcome to join the project.

Brajeshwar

Brajeshwar believes in simplicity; pushes the envelop and envisions the betterment of usable and practical solutions.

More by Brajeshwar

  • http://www.brajeshwar.com/ Brajeshwar

    @K1DF0X
    I don't remember anything complicated or un-usual that it should not work with WordPress 2.5. Have you tried it? My feeling is that it should work.

  • http://www.brajeshwar.com/ Brajeshwar

    @K1DF0X
    I don't remember anything complicated or un-usual that it should not work with WordPress 2.5. Have you tried it? My feeling is that it should work.

  • K1DF0X

    Hmm, the problem I have is once I have inserted the code into my template, the default text "TinyURL alternative..." appears but the actual TinyURL link isn't there.

  • K1DF0X

    Hmm, the problem I have is once I have inserted the code into my template, the default text "TinyURL alternative..." appears but the actual TinyURL link isn't there.

  • http://www.brajeshwar.com/ Brajeshwar

    @K1DF0X
    It works for me on both WordPress 2.5 and 2.5.1. If you can show us your site, it will be easier to see the actual issue. Would you like to try the forum and post the necessary issue in the "Tiny Link" WordPress Plugin Section.

  • http://www.brajeshwar.com/ Brajeshwar

    @K1DF0X
    It works for me on both WordPress 2.5 and 2.5.1. If you can show us your site, it will be easier to see the actual issue. Would you like to try the forum and post the necessary issue in the "Tiny Link" WordPress Plugin Section.

  • http://richardxthripp.thripp.com/ Richard X. Thripp

    This is a great idea! I took the idea further with Tweet This, which caches the shortened URLs so they aren't fetched on every page load, and taps right into Twitter's API so your readers don't have to copy and paste.

    Twitter has an API where anything that appears after the equal sign in the URL http://twitter.com/home/?status= appears in the post box. You may want to mention it in your description; you could easily use something like

    <?php echo '<a href="http://twitter.com/home/?status=' . TinyLink() . '" title="Post to Twitter">' . TinyLink() . '</a>'; ?>

    to do that.

  • http://richardxthripp.thripp.com/ Richard X. Thripp

    This is a great idea! I took the idea further with Tweet This, which caches the shortened URLs so they aren't fetched on every page load, and taps right into Twitter's API so your readers don't have to copy and paste.

    Twitter has an API where anything that appears after the equal sign in the URL http://twitter.com/home/?status= appears in the post box. You may want to mention it in your description; you could easily use something like

    <?php echo '<a href="http://twitter.com/home/?status=' . TinyLink() . '" title="Post to Twitter">' . TinyLink() . '</a>'; ?>

    to do that.

  • Mike

    Any future development planned for this plugin?

  • Mike

    Any future development planned for this plugin?

  • http://deuts.net deuts

    Then why not use the ugly permalink in wordpress then?

  • http://deuts.net deuts

    Then why not use the ugly permalink in wordpress then?

  • http://www.emetaheret.org.il Niv

    This is exactly what I was looking for!!!
    My links are in hebrew and I needed a way to make them short for e-mail purposes.

    I hope it will work on wordpress 2.8.5

    Thank you very much

  • http://www.emetaheret.org.il Niv

    This is exactly what I was looking for!!!
    My links are in hebrew and I needed a way to make them short for e-mail purposes.

    I hope it will work on wordpress 2.8.5

    Thank you very much

Teknopoint Multimedia - Adobe Training, Design and Development, RIA Consulting. Teknopoint Multimedia - Adobe Training, Design and Development, RIA Consulting.

Themes