Under every stone lurks a politician.
– Aristophanes

Archive for August, 2005

Plugin: KCA 1.8

Thursday, August 11th, 2005

Another KCA 1.8 plugin update has just been released for Wordpress (Download). This release sees a couple of new features added which will make importing/exporting/copying of data in the plugin that much easier.

So, if you have a nifty mini script and want to share with someone else, all you need to do is copy the pre-formatted data from the KCA clipboard and pass it onto the other person to import into their KCA database with just one (or two) clicks.

Apart from WP 1.5.1.3, KCA has also been developed on the nightly build “1.6-ALPHA-2-still-dont-use”. It so far behaves pretty well with the new tinyMCE editor interface. You can even add a new Quicktags bar to the tinyMCE bar (I’ve included an example of this).

With this plugin you could add almost anything anywhere via the DOM, but without having to edit those pesky source files. :wink:

All configuration is done in the Admin section and all data is saved to the database. The best thing about this version is being able to import and export configuration snippets.

By way of a demo, here’s a little snippet you could copy and paste into the clipboard section. Make sure you change to your blog url. Click “Import”, then “OK”.

Updated: The formatting of the snippet below reflects this update, so please download the latest version now!

Look up at the Admin menu. You will notice a live clock displayed there. Cool huh?

This was just a simple demo that I wrote up in five minutes, but there are a lot of more interesting things you could do with KCA once you understand it’s capabilities.

By the way, in order to use KCA you do not need to hand type out the above and import it into KCA. The configuration code you see was generated by KCA.

Here’s an explanation of what I filled out in the Admin->Manage->KCA page:

  • Description: A reminder of the function of this set. (optional)
  • Needle: URL fragment defining the pages this set will operate on. So, in this case all pages with “wp-admin” in the URL will have this content set added to it. (optional, empty = all pages)
  • Reference: ID of point to insert the data. In this case wp-admin. This ID can be found by viewing the source of the page you want to operate on. (optional)
  • Location: If ID is specified, where should the data be inserted in relation to the ID? (Default = beforeBegin)
  • Content: HTML content to display at the ID specified. (optional)
  • Script: Client side script to do interesting things to the content. (optional)
  • Active: Activate the current set or not. (Default = false)

After filling the fields out, I hit the “Copy” button. This copies the data to the KCA clipboard. From there I just copy and pasted the data here. I could have used the “Export” button, but this would copy all data for every set to the clipboard.

Obviously, if you wanted to do a little bit more than just add a button here and a link there, you will need to know a little programming (mostly client side scripting), but you don’t have to be a guru to get it working.

The reason I originally wrote this plugin was so I could add some custom quick links to my pages, but then I found there’s a lot more I could add, and so it grew. Now I use it to the “Live Preview” you see on my comment pages, the tooltips you see popping up over links, Quicktag buttons, Admin menu buttons etc.

Why do I use this plugin? The main reason I use it is because I don’t like to scan through core files just to customise something to my liking. This plugin lets you customise your WP experience, and saves the settings in the database. When you upgrade WP, all those settings will still there. Even if you need to change something, it’s a lot more simple than hard coding the source files.

Well, all that sounds complicated, but it’s not. Really!

Enjoy!

Upgrade to Wordpress 1.5.2

Monday, August 15th, 2005

The latest upgrade for Wordpress fixes a few security and bug issues. There have also been enhancements made to the plugin API which will aid in future plugin development.

Updated files include:

/

  • wp-commentsrss2.php
  • wp-settings.php
  • xmlrpc.php

/wp-admin

  • categories.php
  • edit-page-form.php
  • post.php
  • upload.php
  • users.php

/wp-includes

  • comment-functions.php
  • functions-post.php
  • pluggable-functions.php
  • template-functions-category.php
  • version.php

This update will be the final release in the 1.5.x series before the 1.6 major release in a couple of months. The Wordpress 1.5.x series of releases, in my opinion, have been the most stable to date.

Robot That Moves Like Us

Tuesday, August 23rd, 2005

Here is a clip showing a 60kg robot getting back onto it’s two feet, very much like a human would. R Daneel, a name taken from a robot character in some of the Asimov sci-fi books, relies more on momentum through a certain trajectory, rather than constant control to achieve it’s tasks - much like the way we do things.

“The main idea behind the design of the robot is the exploitation of body dynamics”, says Max Lungarella, who works at the lab where R Daneel was developed, at University of Tokyo in Japan.

“All kinds of tasks - particularly dynamics-based ones - can be addressed with our framework. We are currently looking at jumping, rolling, walking, trotting, swinging, reaching and grasping.”

Cool.

Why Do Spammers Keep Spamming?

Thursday, August 25th, 2005

The answer is simple. If there is demand then there is supply. Of course it’s not demand for spam that I am talking about, but it’s demand for the products that spam emails offer that keep spammers in business (and a very lucrative business at that).

According to a recent survey, 11% of users actually end up buying products and services offered in spam emails! Not only that, but 9% of users have lost money to these scamming spammers! (There’s one born every minute)

Considering the huge number of spam that gets sent, it’s no surprise why spammers are in business.

So, until certain people stop buying all the crap advertised in spam emails, the spam will just keep rolling in - or until people like Bill Gates take them to court.

Anti-Spam Strategy

Tuesday, August 30th, 2005

For a while now I’ve been using K9 at home to weed out spam emails and largely it’s been quite effective at a 99.15% accuracy rate.

Recently however, I came across this article: “Using Gmail as a Spam Filter“.

It shows a novel approach to combatting spam, that simplifies anti-spam management, once it’s set up and working.

The theory behind this method is to forward all your emails through your Gmail account and let Gmail filter out the spam. After thinking about for a bit, I thought it sounded like quite a good idea.

Why?

  • Gmail’s spam filter is probably a lot more effective than K9, since it has been “trained” from a larger sample pool
  • no need to download all emails before categorising them
  • time is saved by just downloading the filtered emails
  • a record of every email received is kept online and accessible by a browser
  • any false positives can be checked for by examining Gmail’s spam folder
  • spam can be reported, which should improve Gmail’s spam filter
  • spam filter management is done by Gmail - one less thing to worry about

In my case I forward all emails from various accounts I have to my Gmail “filter” account. I then access Gmail through Outlook Express via pop3 and download my emails, which by now does not contain any spam!

Perfect!