Plugin: Auto-hyperlink URLs (17 posts)

  1. Scott Reilly
    WordPress & Plugin Dev
    Posted 12 years ago #

    Plugin: Auto-hyperlink URLs
    Description: Auto-hyperlink text URLs in post content and comment text to the URL they reference (URLs that start in http://, https://, ftp://, or www.). Does NOT try to hyperlink already hyperlinked URLs.
    Details can be found at the plugin's
    All of my plugins can be found at
    Basically, when enabled, this plugin will turn any unhyperlinked URL text into a hyperlink (in both post content and comment text):

  2. unoamigo
    Posted 12 years ago #

    Sounds handy, will be installing. Although, I try to make it a good habit of putting the hyperlink in myself.

  3. unoamigo
    Posted 12 years ago #

    Oh yeah, Thanks!

  4. tbishop61
    Posted 12 years ago #

    Should I hold off installing for the next version, given the comments on your site?

  5. Tek
    Posted 12 years ago #

    Will this work in comments too? I have readers who are always doing that. I wish that they would just auto turn into small urls when they do that. It breaks my formatting. =(

  6. unoamigo
    Posted 12 years ago #

  7. Scott Reilly
    WordPress & Plugin Dev
    Posted 12 years ago #

    tbishop61, Tek : The plugin is now available. It auto-hyperlinks post content and well as comment text. Also, Tek, you can set it to truncate links after N characters to that URLs don't break your formatting, or you can just show the host (but it'll link to the full location).
    unomigo : The latest version doesn't have that same problem.
    allusion : I admit that the original version of this plugin was subpar as compared to WP's built-in make_clickable(). But since you noted this board uses the same function, here are instances in which make_clickable() is insufficient:
    [Does not get hyperlinked.]
    [Gets made into a mailto: link when it is not an appropriate mail address.]
    [Does not get hyperlinked due to being parenthesized. Same could be said if link were braced.]
    Get WordPress help here http://wordpress.org, and http://wiki.wordpress.org.
    [The trailing comma and period gets included as part of their adjacent link, making bad links.]
    This plugin will cover every instance make_clickable() does (when appriopriate), and takes care of more instances (Class B domains), as well as adding the ability via configuration options to truncate displayed URLs, launch links in a new window, and to insert text/HTML before and after the text of truncated links.

  8. tbishop61
    Posted 12 years ago #

    It's looking good now, Scott. Thanks for updating it.

  9. Scott Reilly
    WordPress & Plugin Dev
    Posted 12 years ago #

    That warning usually indicates that there is a space (or possibly other characters) before the opening <?php or after the ending ?> of the file. Can you verify if that is the case or not? (Try obtaining the plugin file via the .zip and not the .phps if you couldn't find a space and if you did indeed not obtain the plugin originally from the .zip).

  10. tbishop61
    Posted 12 years ago #

    My bad. The copy from the zip file works perfectly. Sorry to bother you.
    (There is still the minor gnat about not working when a url is the first thing in a post.)

  11. dalereardon3
    Posted 11 years ago #

    I have downloaded and installed the latest version of this plugin from the zip file.

    I then activated it.

    Then I made some posts with different url formats and none of them were made into active links.

    Do I need to call the plugin in the post somehow or do something else to make it work?

    I'm very new to WordPress so please excuse me if I have missed something simple.

    I do have quite a few other plugins installed so maybe there are conflicts but hopefully not.

    A plugin to let you deactivate all your plugins at once might be nice for debugging!



  12. Scott Reilly
    WordPress & Plugin Dev
    Posted 11 years ago #

    Post an example of a few of the links that won't work for you. Also, what version of WordPress are you using? The plugin doesn't require you to do anything other than activate it.

  13. dalereardon3
    Posted 11 years ago #

    was the one I wanted to work - my site. So thought the .net.au might be upsetting it so tried localhost.net
    as well but still no luck.

    I am using the latest update of WordPress


  14. dalereardon3
    Posted 11 years ago #

    Have found some plugins conflicting. Have turned off many plugins and it now works sort of - will work out which plugin was causing the problem.

    http://www.localhost.net.au doesn't work as turns it into a link to http://www.localhost.net and makes the .au just plain text


    http://www.dalereardon.com doesn't work but is it meant to?

    To make .au .co.uk .co.nz which I refer to work do I just add these in the plugin code where you have |gov|edu| etc in the list?

    If so I can make that change easy enough. Presently your "." test is mucking up non US domains unfortunately.


  15. nmallory
    Posted 11 years ago #


    I tried doing an install via copy & paste of the file from your site. I have a huge list of tinyurl.com urls but it totally messed them up. For example, in my page, I have:

    <em>WPA Daily Recipe Threads</em>

    <li>Meatless meals: http://tinyurl.com/955f2</li>
    <li>Couscous: http://tinyurl.com/aal7k</li>
    <li>Asparagus: http://tinyurl.com/7fmae</li>

    When the page is generated on the site, it looks like:

    # Meatless meals:
    # � title=�http://tinyurl.com/aal7k � target=�_blank�>tinyurl.com/aal7k Asparagus:
    � title=�http://tinyurl.com/djzhy � target=�_blank�>tinyurl.com/djzhy

    The source looks like:

    Meatless meals: <a href="http://tinyurl.com/955f2%3C/li%3E%0A%E2%80%9D%20title=%E2%80%9Dhttp://tinyurl.com/955f2%3C/li%3E%0A%E2%80%9D%20target=%E2%80%9D_blank%E2%80%9D%3Etinyurl.com/955f2%3C/li%3E%0A%3C/a%3E%3C/p%3E%0A%09%3Cli%3ECouscous:%20%3Ca%20href="></a>
    <a href="http://tinyurl.com/955f2%3C/li%3E%0A%E2%80%9D%20title=%E2%80%9Dhttp://tinyurl.com/955f2%3C/li%3E%0A%E2%80%9D%20target=%E2%80%9D_blank%E2%80%9D%3Etinyurl.com/955f2%3C/li%3E%0A%3C/a%3E%3C/p%3E%0A%09%3Cli%3ECouscous:%20%3Ca%20href=">� title=�http://tinyurl.com/aal7k
    � target=�_blank�>tinyurl.com/aal7k

    <li>Asparagus: <a href="http://tinyurl.com/7fmae%3C/li%3E%0A%E2%80%9D%20title=%E2%80%9Dhttp://tinyurl.com/7fmae%3C/li%3E%0A%E2%80%9D%20target=%E2%80%9D_blank%E2%80%9D%3Etinyurl.com/7fmae%3C/li%3E%0A%3C/a%3E%3C/p%3E%0A%09%3Cli%3EArtichokes:%20%3Ca%20href="></a></li>
    <a href="http://tinyurl.com/7fmae%3C/li%3E%0A%E2%80%9D%20title=%E2%80%9Dhttp://tinyurl.com/7fmae%3C/li%3E%0A%E2%80%9D%20target=%E2%80%9D_blank%E2%80%9D%3Etinyurl.com/7fmae%3C/li%3E%0A%3C/a%3E%3C/p%3E%0A%09%3Cli%3EArtichokes:%20%3Ca%20href=">� title=�http://tinyurl.com/djzhy
    � target=�_blank�>tinyurl.com/djzhy</a>

    Any ideas on how to fix this?


  16. nmallory
    Posted 11 years ago #

    FYI: Apparently the problem was in the link list </li>. There needs to be a space between the end of the url and the </li>. It works fine now: http://www.nothingtastesasgood.com/ww-wpa-boards-big-list-of-recipe-links/

  17. genosypheus
    Posted 10 years ago #

    Doesn't work for me *scratching head* I've activated the plugin via dashboard. did not edit anything at all. doesn;t work. not even 'http://somethhing.com'

Topic Closed

This topic has been closed to new replies.

About this Topic