Getting SH-Autolink to do what I want

I have always been torn about adding HTML to my blog posts. Clearly, there are times when you need it to point off to an image or to format text for emphasis. I know other markup exists, like Markdown, Textile or even Wikitext, but those carry the same undesirable characteristic – content ends up being marked up. It is probably not that big of a deal, it all stems from the question of if I will ever want to extract the content and place it in a context where <insert your favorite markup> is not interpreted. My goal is to automatically tag keywords with the right URLs, reducing the amount of HTML markup in my posts and better, more centralized, link management.

Being a WordPress and PHP newbie, I thought I might write a plug-in to help accomplish this goal. I went through the “How to write a simple WordPress plugin” tutorial and realized it would be pretty simple to use that approach the problem.

I had a feeling that I was not alone in wanting such a plug-in so after I did a little coding, I did a search and found SH-Autolink. I was both bummed and excited – I really wanted to use writing the plug-in to get more familiar with PHP and after reading some comments about the plug-in, I was not going to have to write it from scratch! Stevie’s plug-in had the same issue I first ran into, if the text of the post included the keyword as part of existing anchor tags, then the string replace would break the markup.

So, I merged my code with Stevie’s to get the best of both worlds – my better string replacement and his data management / administration interface. (As a side note, I do think it is curious that he decided to specify the protocol of a link, but maybe I am not thinking the whole problem through.)

4 Responses to “Getting SH-Autolink to do what I want”

  1. Stevie Says:

    Hi Brian,

    thank you for your comment! Can you send me your changes on the code?

    Thanks a lot!

    Stevie

  2. Brian Kindsvater Says:

    I will second Stevie’s original comment. It would be very helpful if you could post your modification or email it to me. This is a great plugin.

    Thanks,

    Brian Kindsvater
    http://internetprofituniversity.com

  3. Brian Goodman Says:

    Brian, Stevie and I exchanged email a week ago. He is the creator of the plugin and was going to take a look at my suggestions. My hope is that he incorporates the code so there is a single, managed package for all of us to use. If Stevie is not interested, I will post the code with my modifications.

  4. Spirited Thought Says:

    Sharing a slightly better SH-Autolink…

    Back in November of 2005, I posted about a fix I made to Stevie’s SH-Autolink plugin for WordPress. I thought it would be best to get the fix into the distribution Stevie offers so there would be a single version for everyone. Another concern I had w…

Leave a Reply


Bad Behavior has blocked 339 access attempts in the last 7 days.