WordPress.org

Plugin Directory

wiki:Kramer

Kramer

Tags: Technorati, Links, Cosmos, Pingback
Contributors: Nik, Mark

Kramer is a plugin that will add inbound links to a post on your weblog as Pingbacks. What this means is that when a post in blog A links to a post in blog B, blog B will find the inbound link and add it as a pingback, without the need for the author of the post on blog A to send a ping to blog B. The way it finds the new links is by searching Technorati (http://www.technorati.com) for all new inbound to a particular post and also by analyzing and verifying incoming referrers.

What this means is that pingback/traceback/trackback and other post-pinging tools are no longer required, as all links to a post will be found (eventually) and shown as Pingbacks. To show links to the main weblog, or to other pages in general, a function called kramer_inbound() is provided. It can be used in Wordpress templates to display a list of the latest inbound links to that page. It is usually included in the sidebar of a blog and can be fully configured via the Kramer administration interface.

A planned feature is the ability for the plugin to inform Technorati of new referrers, i.e. other sites or blogs linking to your blog. This means that Technorati will be kept up-to-date about sites linking to your site. This is planned for version 0.8, due sometime in 2006.

Download

The latest version of Kramer is 0.7.7. It is available to download as a zip archive from:

http://txfx.net/wp-plugins.org/kramer/download/

If you are upgrading, over-write your existing kramer.php with the following:

http://svn.wp-plugins.org/kramer/trunk/kramer.php

The source and latest development version (/branches/development/) can be viewed and downloaded at:

http://dev.wp-plugins.org/browser/kramer/

Installation

  1. The zip archive contains two files, README.txt and kramer.php. Place upload or copy kramer.php to your your wp-content/plugins/ directory.
  2. Once there, log into your weblogs administration console, click on plugins and then activate the Kramer plugin.
  3. Click on Options then Kramer to view the Kramer options page
  4. Under the API Key section, follow the link to Technorati to get an API key and insert the key into the field provided.
  5. Your installation is now complete, if there are incoming links to a post they should appear immediately.

Screenshot

http://perfected.org/wp-content/kramerscreenshot.jpg

The above screen shot shows inbound links to a blog post as comments for that post. The comments that are added as inbound links from Technorati as signified with the Technorati balloon.

Support and Updates

To debug your Kramer install, view the HTML source on any page, and scroll down to the bottom where Kramer produces its debug output as a HTML comment. Within the debug output any errors are reported, as well as a trace of the request to Technorati and any comment actions.

To submit a bug, feature request or support ticket fill in the ticket form found at:

http://dev.wp-plugins.org/newticket?component=kramer

Or alternatively, email nik@… and provide as much detail about your request or bug as possible. The latest news about Kramer and updates can be found at:

http://www.nik.com.au/projects/kramer/

Awards

Kramer was awarded a consolation prize at the Wordpress Plugin competition:

http://weblogtoolscollection.com/pluginblog/2005/07/23/wordpress-plugin-competition-winners/

FAQ

  1. How can this plugin help me?
  2. It will show every post linking to your posts, in the form of comments or pingbacks. The blog post linking to yours does not need to ping your post for the comment to be shown in your weblog. This means that by default you can carry out conversatios between blogs.
  1. Is there a limitation on using Technorati?
  2. Yes, the limit is 500 queries per day, per API key. It is recommended that the cache time is set to 12 hours or more if your site gets a lot of traffic.
  1. How does the cache work?
  2. The cache time is the time taken between reqests to Technorati for new inbound links for a post, for each post.
  1. How do can I include inbound links for a page in my sidebar?
  2. Simply edit your template, and at the position that you want the list of inbound links place <?php $kramer_inbound(); ?>
  1. How can I change the position of the Technorati balloon icon?
  2. The balloon icon is defined with the class technorati-balloon that you can set in your style sheet. Note that in the future, you will be able to customize everything about this markup, including the position (before or after your text). Technorati's API requires that the link back to Technorati remain, so that part will have to stay in one form or another.

Development News

2005-12-20 -- WordPress 2.0 will be realeased in a day or two, so Kramer is being updated for 2.0 compatibility, fixing and obvious errors noticed after upgrading my site. From here on out, WP 1.5.x will not be supported, so stick with 0.7.4 if you're not ready to upgrade to WordPress 2.0

2005-10-07 -- Mark here. Minor update today. I'm depreciating the _kramer_ref_ignored key, as it tends to bloat the database. I also depreciated some other keys that weren't being used, like _kramer_ref_processed and _kramer_ref. When you view the options page and it checks for an update, it will flush all these old options out. I also released an updated .pot file for the translators, in case the old one was outdated. 2005-09-05 -- Mark again. I just released version 0.7.0 today! It includes LOTS of improvements. One thing you may have noticed is that Technorati isn't exactly the most reliable service. The way we were doing it, we were getting data from Technorati before you page loaded... which could mean BIG delays if Technorati was down. Now, all querying of Techcnorati is done on "shutdown," meaning "in the background." So now, Technorati can go down, and it shouldn't affect your page load times at all! Yay! Also, the auto ref pingback functionality has been enabled. Note that you can turn it off in the options. I included this switch because you'll find that the functionality works well... sometimes too well. I've been working for several months building up a filter so that you don't get pingbacks from URIs that are meaningless... like front pages, or search engines, etc. But it's not perfect, so I wanted to let people turn it off if they didn't like it. I have found, however, that the auto ref pingback is quite valuable, and has alerted me to incoming links to my site that I never would have found otherwise. If you do happen to see a ref come through that you don't think should have (like, some obscure search engine result), drop me a line and give me the URI that got through. I'll likely be issuing a few minor upgrades with improved filtering before the next major release.

2005-08-01 -- Hey, Mark here. Just letting you know that there are some very exciting development happening with Kramer. On my personal blog, I already have Kramer logging incoming refs, filtering them (don't want search engines, hits from your own blog, etc), and sending pingbacks to my own blog. This solution is nice, because WordPress takes care of validating the referrer. If the link is invalid, WordPress ignores it, and it will never be pinged again. If it is valid, a new Pingback is created, along with our nifty new Kramer Auto Pingback icon in place of the Technorati one that shows up for incoming Technorati links. This auto pingback happens on the shutdown hook, so it doesn't slow down the page load. Pings are currently stored in one of 4 meta keys for the entry: _kramer_ref_pending (held here for a split second while we do checks on the ref... to ensure that someone double clicking on a link doesn't sneak 2 of them in), _kramer_ref_ignored, for refs that are ignored, like ones from Google or Technorati, _kramer_ref_ping, for refs that result in a successful pingback, and _kramer_ref_failed, for refs that were pinged, but failed (usually because there wasn't a valid link at the destination. Certain refs, like blank ones, non-URI ones, ones from your own site, etc, are ignored outright. I'm sure that besides logging valid refs as Pingbacks, people will find cool uses for the other stored values. If anything, it's neat to just look at them and see how people are getting to your entries from off-site.

The code is relatively stable right now, but I'm adding new filters every day. Unfortunately not every search engine looks like Google (with /search?q=), so when a ref comes through that should be ignored, I'm deleting the pingback and adding it to the filter list. Next, I need to tinker with the options page to account for all the new functionality that I've introduced. Stay tuned!

Changelog

v0.7.7 mark 3-january-2006

  • WP 2.0 roles compat
  • Role Manager plugin compat (strange menu interference bug)

v0.7.6 mark 21-december-2005

  • Force (array) type to avoid is_array() errors

v0.7.5 mark 20-december-2005

  • additional blocks
  • WP 2.0 compat

v0.7.4 mark 08-november-2005

  • create_function() fix

v0.7.3 mark 13-october-2005

  • check to ensure that an invalid file handle doesn't get passed to feof() which can result in an infinite loop.

v0.7.2 mark 10-october-2005

  • Depreciating old meta keys for speed, and less database bloat
  • Updated .pot for i18n

v0.7.0 mark 05-september-2005

  • Technorati always queried on shutdown (much faster)
  • incoming refs are validated and generate pingbacks
  • numerous code improvements

v0.6.1 mark 24-july-2005

  • update times are stored in individual post metadata instead of in the options table
  • the Technorati balloon is inserted via comment content filters, so that it may be customized later

v0.4.2 nik mark 14-Jun-2005

  • i18n support (Mark)
  • code cleanup and minor bugs (Nik)
  • referrers that are blogs and store them in the posts metadata

v0.4.1 nik 7-Jun-2005

  • Technorati balloon now wrapped in a div with class="technorati-balloon"
    • Will send an optional notification email on new pingback/comment (thanks MCincubus!) (#188)
    • Inbound links are now pingbacks by default, but can be standard comments via admin option (#186)

v0.4 nik 4-June-2005

  • Made the balloon XHTML compliant, removed align and added style (thanks MCincubus and Firas)
  • Implemented _kramer_flush_cache()
  • Implemented _kramer_delete_all() which will delete all technorati comments form the admin panel
  • More sanity checking from Technorati results
  • Cleaned up the debug output so it looks neater (when user views source)
  • Changed license from CC to LGPL
  • Added function that will check for new version of the plugin

v0.3.1 nik 3-June-2005

  • Cleaned up some XML errors
  • Recognise bad Technorati API keys and throw error

v0.3.0 nik 31-May-05

  • removed dupe retruns from technorati in results
  • cleaned up all the results so there is only one inbound link

v0.2.0 nik 26-May-05

  • added an admin interface to set apikey and cache settings
  • comparison for existing post now on permalink
  • added function kramer_inbound() to show links to main weblog to be used in the sidebar etc. these links are stored in the comments table as post id of 0

v0.1.1 nik 26-May-05

  • minor bug fixes

v0.1 nik 25-May-05

  • initial release

TODO

v0.80

  • Submit valid referrer pings back to Technorati (currently being developed)
  • Honour 'allow pingbacks' for the post

Contributors

  1. Nik Cubrilovic - initial developer
  2. Mark Jaquith - developer from v0.4.1
  3. Firas - testing, ideas
  4. Kevin Marks - support from Technorati and ideas

License

Copyright 2005 Nik Cubrilovic (email: nik@…)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Last modified 8 years ago Last modified on 01/03/06 10:06:50