Welcome, visitor! Log in
 

KB Plugins blog

The best Wordpress plugins are free

KB Linker v1.10

Improvements:

  • Inserts the keyword into the link’s title tag
  • Won’t link a page to itself
  • Won’t use the same URL more than once in a post. (It’s always checked for re-linking the same keyword multiple times, but now it checks URLs too).

As always, download it here .

Dazzled? Confused? Disagree? Write a comment »
There have been 48 comments so far.

48 Comments

  1. Posted September 25, 2007 at 12:19 am | Permalink

    Hi Adam, I’m just setting up a new WP2.3 blog and I’ve found that your plugin works quite well except under the one circumstance.

    If a keyword is found within a manually created link, your plugin still works its magic, which unfortunately breaks the manually created link. I’m sure this is unintended, so I’m writing in the hope that you’ll consider patching this up in time for all the upgraders who will no doubt come chasing your plugin thanks to WP’s new plugin update system.

    Cheers.

  2. Posted September 25, 2007 at 8:36 am | Permalink

    And that’s where I’m stumped. I cannot replicate this on any of my blogs. I put the keyword in the link text, in the link target, in the link title, in all three, and it doesn’t get touched by the plugin (nor should it). And the difference in blog versions shouldn’t make a difference–regexes are regexes, regardless of what version of WP you’re running.

    So if there’s somebody who knows regexes, take a look at the plugin code and make a suggestion… Anybody interested in helping squash the bug should read the more detailed discussion of the problem starting here.

  3. Posted September 25, 2007 at 2:51 pm | Permalink

    See initially I thought it was an oversight on this version because I was using an older version of this plugin on another wordpress install prior to upgrading… and the problem was nowhere to be found!

    In fact chances are that if people persist the problem will go away, though I don’t propose to explain it.

    I don’t know if its possible for you to try a fresh WP testbed install, but it seems like that would be the only way of accurately reflecting people’s experiences of installing the plugin for the first time. Reading those other posts seems to suggest that the more you use it, the less likely it is to display this behaviour.

    Anyway, cheers for your effort on this Adam, I’m sure it’ll come to light eventually.

  4. Posted September 25, 2007 at 5:54 pm | Permalink

    Hey Adam!

    Not to add to the confusion, but… I’ve checked every way I can think of, and v. 1.101 is working great on both my site (WordPress 2.3-RC1) and my husband’s (WP 2.2.2). No time to upgrade to WP 2.3 right now for any further testing, though — too many papers to write this week.

    Yay! :)

  5. Posted September 28, 2007 at 7:00 pm | Permalink

    The v1.101 plugin seems to be working great for me with WP 2.3 installed. I ran into some issues before, which have all been tackled by Adam. Thanks for your quick response to my email Adam!

  6. Jeff (Unregistered)
    Posted October 11, 2007 at 12:48 am | Permalink

    Works fine ! Thank you for this plugin !
    It will be great if we can automatically add all the tags to the KBLinker list ! So each time a word corresponds to a tag in a post, it will link to [link] !

    (Sorry for my languages mistakes, I don’t speak well english…)

  7. Posted October 12, 2007 at 10:20 am | Permalink

    Jeff, I use WPMU, not standard WP, which means I don’t get the new tagging features yet. Maybe when they introduce this feature into WPMU I’ll take a look at that, though.

  8. Darrin (Unregistered)
    Posted October 19, 2007 at 12:01 am | Permalink

    Im using 2.2.1 and for some strange reason it’s not working properly. One instance only the 1st entry in the keyword-URL pair worked. Now nothing.

  9. Posted October 19, 2007 at 7:44 am | Permalink

    Darrin,

    If what you mean is that the keyword gets linked only once per post, that’s what’s supposed to happen. If you mean that only the first keyword-URL pair gets linked while the other pairs get ignored, that’s a bug. Not sure which you mean, though.

  10. Darrin (Unregistered)
    Posted October 21, 2007 at 9:13 am | Permalink

    Thanks Adam, that is exactly the case. Thanks for clarifying.

  11. James (Unregistered)
    Posted December 21, 2007 at 9:25 am | Permalink

    Hello, how does this plug ins compare to link-a-dink? Thank you.

  12. Posted December 21, 2007 at 10:03 am | Permalink

    I don’t use link-a-dink, so I have no idea. Try and see.

  13. Posted December 24, 2007 at 7:09 am | Permalink

    hi!
    first of all really tanks for this script, I’m using it in a personal project. when lunch the site I will know you about the credits.
    Now a trying to do link for not single word, for example i have in my $pairs array :


    $pairs = array('ipsum dolor' => 'http://example.com');

    but the problem is that doesn’t works, do you know how modify the regular expression in order to catch this kind of phases.

    tanks

  14. Posted December 31, 2007 at 9:05 am | Permalink

    Sorry about the delay, Gabriel–I’ve been on vacation.

    “ipsum dolor” should work fine. Perhaps the problem is that you’ve written the array in the plugin file itself instead of using the WP admin interface?

  15. Vladimir (Unregistered)
    Posted January 4, 2008 at 6:30 pm | Permalink

    That’s a great plugin, but I’ve ran into a couple of seemingly related problems:
    1. It doesn’t link the keywords if the post is truncated to the “more” tag.
    2. It doesn’t link the keywords if there is a link _anywhere_ in the text of a post.

    All the best,
    Vladimir

  16. Vladimir (Unregistered)
    Posted January 4, 2008 at 6:37 pm | Permalink

    Here follows the server data if it’s of any help to you :)
    WordPress: 2.3.2
    PHP: 5.2.3

  17. Posted January 11, 2008 at 10:12 am | Permalink

    It might be awhile until I can look at these. I’m unable to replicate the second problem.

  18. Posted January 16, 2008 at 7:43 am | Permalink

    Hello Adam. I’ve encountered a little problem. I host a blog on a free domain and yesterday i entered quite some keywords (around 30) into kb_linker. Since then a lot of parts of my blog stopped working giving an error that it has run out of memory. I disbled the plugin, deleted it from the directory and it still gives me the errors.
    I thought to check phpmyadmin to see if any strings were left in the sql so the blog keeps loading and reading them. I couldn’t find any. Could you please tell me where exactly on the server kb_linker stores the data and strings? Thank you! (please send me an e-mail respond if possible)

  19. Posted January 16, 2008 at 8:17 am | Permalink

    Victor: That’s weird. This is a very simple piece of code. You didn’t install any other plugins at the same time?

    It uses WP’s get_option() and related functions to save to the DB. That means it will be in WP’s “options” table in mysql. The option’s name is, appropriately, “kb_linker.” Find the option in that table and delete it and see if that makes a difference.

    I’m guessing your host limits PHP scripts to the default amount of memory, 8 MB. Without any plugins, WP will use up most of that by itself. So I guess it makes sense that saving a lot of information to the database could cause you to run out of memory.

    If you want to be able to run plugins, even small ones, you’ll need to find a host that allows more memory. Most decent hosts do.

  20. Posted January 17, 2008 at 6:50 pm | Permalink

    Wow thank you for your fast reply. Yes its an 8 MB limit. I installed a couple other plugins, but I was able to keep the memory under the limit. I did an update to those plugins though so they could use more memory now but still it uses quite some. I was thinking about using a host but this blog was mostly for sharing music info and thoughts so its not that personal. I’ll try and use as few features as possible until ill decide to go to a payed host.
    Thank you very much for your reply. And best of luck with this wonderful plugin ;)

  21. Shanta (Unregistered)
    Posted January 20, 2008 at 10:32 am | Permalink

    This is a great auto-linking plugin. Just one tiny problem, which may be similar to what others have reported, especially in the KB-linker v1.03 thread. KB linker breaks links created by Dagon Design’s Site Map plugin, but only when the target link is one word. So, “XML” link breaks; “eXtensible markup language” does not break. This sounds weird I’m sure, except that it is completely reproducible. This is using WP2.3 and PHP5. Hope this adds another piece to the puzzle.

  22. Posted February 22, 2008 at 1:23 am | Permalink

    Hey, super, dass ist doch mal ein hilfreiches Plugin, vielen Dank.

  23. Tim Carver (Unregistered)
    Posted February 22, 2008 at 10:46 am | Permalink

    Hi

    Is it possible to have the KB Linker to link all links on a page? Now it makes one link per one keyword.

  24. Posted February 25, 2008 at 9:08 am | Permalink

    Shanta: Yes, others have reported the sitemap plugin problem, although I haven’t had time to look at it.

    Ralf: Bitte schoen.

    Tim: Comment #5 on this post.

  25. Posted April 28, 2008 at 9:40 pm | Permalink

    I have found a problem with the latest version (at least on my blogs)
    It will only post a link to a single URL, thats good. however it also wont post links to multiple URLs that have the same domain name.
    so if I have 3 keywords that link to [link], [link], and [link] only one of them will get linked.

  26. Posted April 28, 2008 at 9:51 pm | Permalink

    I found the problem (well not in the code)

    If in the config I have:
    contact us->http://www.tomandsean.com/contact.html
    Maui real estate->http://www.tomandsean.com/

    It will work fine
    if they are in reverse order, only the contact us will get linked.

  27. Rob (Unregistered)
    Posted May 6, 2008 at 10:05 am | Permalink

    Thanks for the plugin but I have a problem with it. Its currently linking my posts but not pages. In the page.php template file, I am using the_content() to display the page contents so it should work. I cannot figure out why its not.

  28. Rob (Unregistered)
    Posted May 6, 2008 at 11:42 am | Permalink

    Well it seems to be working on pages but only for some links and not others. I guess I will get into the source code and figure out what is going on.

  29. Posted May 18, 2008 at 3:01 pm | Permalink

    I hope I haven’t overlooked something above…
    I’ve startet using KB linker with great expectations – great functionality! – until it turned out that it also inserted links inside the image (img) attributes – like title or alt texts. Because of that, after activating KB linker and writing a long list of links for it to generate, code appears down below images when I view the pages in a browser.
    I’d hope for an upgrade – especially since the alternatives (the Blog mechanics keyword link plugin and also Cross-linker) are much slower to configure.
    Kjetil

  30. Enrico (Unregistered)
    Posted May 27, 2008 at 3:43 am | Permalink

    you can use regular expressions to jump texts that should not be linked. the script even has already this function:

    // if you get problems with KB linker creating links where it shouldn't, this is the regex you should tinker with, most likely. Here goes:
    $content = preg_replace( '|(]*)('.$keyword.')(.*>)|Ui', '$1&&&$2$3', $content);

    now, just add the following line: (for sure there is still a more comfortable way but if you use e.g. image manager to insert pictures you will always have the same structure for an image. it contains the alt tag but also the border definition at the end.
    $content = preg_replace( '|(alt.*)('.$keyword.')(.*border)|Ui', '$1&&&$2$3', $content);

  31. gulflee (Unregistered)
    Posted July 2, 2008 at 10:03 pm | Permalink

    the problem on google
    the output show <’a href=.com >
    is not fix with content = preg-replace( ‘|(
    ]+>)(.*)(‘.$keyword.’)(.*)(]*>)|Ui’, ‘$1$2&&&$3$4$5′, $content);

  32. Posted August 24, 2008 at 4:13 pm | Permalink

    Hi Adam,
    How i can translate the text : More about .
    I am brazilian and wish change the text to: Saiba mais sobre

    Thanks,

  33. Posted October 8, 2008 at 6:11 am | Permalink

    Adam:

    I have a very basic question. I have a lot of links I put into KB linker, and I have organized them by “categories” in terms of how I group them. I’d like to be able to put commented-out text in the link list so I can tell where each category starts / stops?

    I presume that since the plugin uses the “->” tag to mark links that I cannot use something like:

    Thus, what nomenclature should I use to add comments in the link list, or is that even possible?

    Thanks, I simply love the plugin!

  34. Dieter (Unregistered)
    Posted October 11, 2008 at 5:03 am | Permalink

    Where are the links stored? I couldn’ t find a txt file or a mysql table.

    -Dieter

  35. Dieter (Unregistered)
    Posted October 15, 2008 at 7:14 am | Permalink

    Are you dead? No 45 years left?

  36. Posted October 15, 2008 at 7:32 am | Permalink

    Not dead, but working 50-60 hours a week on my real job and trying to squeeze in family time on the side. The links are in the existing wp options table.

  37. Joanne Greco (Unregistered)
    Posted December 19, 2008 at 8:43 am | Permalink

    Hello,

    I wanted to say thank you for this great plug in. I use it at all my blogs.

    I have trouble with it working sometimes. About 85% of the time it works fine and links to the correct phrase/word but sometimes it doesn’t link to the phrase or word I chose. Is there a problem that I’m not aware of or do you have a checklist I can go through to see if I’m doing anything wrong on my end?

  38. Mario (Unregistered)
    Posted January 10, 2009 at 10:48 am | Permalink

    Hello,

    Thank you for this great plugin :)

    But i have one idea. You write this option :
    Also link the keyword if it ends in s (i.e. plurals in certain languages)

    But in french word is possible same witch this e/é/è it’s possible to create same option ?

    Ex : genial is same génial

    Im ok for give you 100usd ;)

    Bye and happy new year

  39. Raf (Unregistered)
    Posted March 11, 2009 at 5:12 am | Permalink

    Hi, this is nice plugin:)
    But now I have problem with KB Linker. Plugin can`t work with wordpress 2.7 !!!! What is the problem?

  40. Posted April 20, 2009 at 2:14 pm | Permalink

    Thank your for this plugin. It is a pleasure to use it!

  41. JK (Unregistered)
    Posted April 27, 2009 at 2:31 pm | Permalink

    I had a problem where KB Linker was linking a [keyword] if it was the first word in the title tag.
    Eg:

    After playing around for a while, I came up with a fix. Don’t laugh as I’m very inexperienced with regex.

    $content = preg_replace( ‘|(title=.*)(‘.$keyword.’)(.*>)|Ui’, ‘$1&&&$2$3′, $content);

    Thanks Adam for a brilliant plugin!

  42. Posted January 15, 2010 at 7:15 pm | Permalink

    I LOVE the idea of this plug-in, and I feel that Adam has been inordinately generous not only in creating it (for which I’d like to make a donation) but also in addressing so many questions and comments here. Wow!

    There’s just one thing. It seems not to work with the latest (as of 1/15/10) version of WordPress. I’m not getting any links at all.

    If anyone can help, please let me know. If Adam can, I’ll make that donation!

    Cameron

  43. Posted January 23, 2010 at 6:52 am | Permalink

    Hi all,

    I’m using KB Linker on my website and I am pleased with the idea behind it. However I encountered some problems. For example, the system fails when you have a keyword at the very beginning of a post. It also fails when you have a keyword occurring TWICE inside a link tag (I actually had to endure this one!)
    So I looked around a bit and finally came to the following code. It replaces line 148 in the original code.

    $content = preg_replace('/('.$keyword.')(?!([^<]+)?>)/i', '<a href="'.$url.'" class="kblinker"'.$target.$title.'>$1</a>', $content, 1);

    You can also comment the preceding two regexes (line 132 and 138) so it might speed things up a bit. So far it works like a charm. Maybe Adam can include it when he has the time.

  44. Posted January 23, 2010 at 6:56 am | Permalink

    Made a little mistake there. The above expression will also replace parts of words (which you probably don’t want to). The next one won’t:

    $content = preg_replace('/\b('.$keyword.')\b(?!([^<]+)?>)/i', '<a href="'.$url.'" class="kblinker"'.$target.$title.'>$1</a>', $content, 1);

    And where I said “You can comment the preceding two regexes”, I meant you HAVE to. Also, if you’re using the plural option, you have to replace that regex too. I don’t use it personally.

  45. Posted May 5, 2010 at 3:00 pm | Permalink

    Hi,

    I’ve put this into the appropriate field for KB Linker but it won’t work on my blog:

    muscle building->http://www.vincedelmontefitness.com/
    how to build muscle->http://www.vincedelmontefitness.com/
    build muscle->http://www.vincedelmontefitness.com/

    When I click “submit” it says everything is ok but the abvoe words don’t become hyperlinked on the blog.

    How do I fix this?

    Thanks a lot,
    Alex

  46. Posted May 12, 2010 at 5:22 pm | Permalink

    I’ve recently installed KB Linker when Cross-linker was starting to kill my MySQL performance. It’s a nice, simple plug-in. However, I’m finding that it’s putting links into code that’s supposed to be images in the posts. That breaks the image tags. Any guidance on why that would be happening? It’s WP 2.9.2.

  47. Posted June 1, 2010 at 1:31 pm | Permalink

    Hi,

    This plugin is great, evne thou it requires a bit work when using alot of links, but I haven’t figure out how to make it more easy, exept be able to upload a CSV-file or similar.

    Anyway, is there anyway to exclude words on some pages? Like adding a attribute before writing a word to able to disable the KB Linker for that word on that page?

    //Jens

  48. Posted August 16, 2010 at 4:03 pm | Permalink

    Hi!

    Thank you for this great plugin! I’ve i could wish me a feature, it will be very nice, if the user can choose to link every phrase in the text or only the first appearance of the phrase.

    Can you realize it in future versions or is there an existing workaround so far?

    Greetings from germany!

    Christian Kler

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment Guidelines
  • Yes, your comments will be visible to everybody. You can disagree, but civilly.
  • I have the right to delete abusive comments.
  • Allowed HTML: <a> <b> <blockquote> <cite> <code> <em> <i> <strong>
  • Put code in `backticks` (above your "Tab" key) or it won't display well
  • Gravatars: To override the default image by your comment, use a gravatar.
  • Links: If you include more than one link, your comment will go into the spam queue.

Please read before commenting: Because I am now employed and not just a student, I provide only minimal support for my plugins. Sorry.

If you have a bug report, feature request, or other general feedback about a plugin, please leave a comment—but do not expect an immediate response. If you are requesting help, though, please check the plugin's documentation thoroughly rather than ask your question as a comment.

Thank you for your understanding.