14 May 2008

word count plugins for habari

November's still five three months away, but I'm thinking ahead. I've written two simple plugins for Habari that will let me easily see how many words I've written* toward the 50,000 word goal of National Novel Writing Month. These plugins provide a quick and easy tally of words used in individual posts and all posts with a given tag.

Requirements

version 0.5 of Habari or later

Download

These will always link to the most recent versions:
Word Count by Tag
Post Word Count

Installation and use

Word Count by Tag
Unzip wordcountbytag.zip in /user/plugins. Then activate and configure it in the Plugins Admin page. If you leave the 'tags to include' box empty it will count all words from published posts with all tags. The words in the posts' titles can optionally be added to the total.

Here how to add it to your theme (no need to echo):$theme->word_count;
Post Word Count

Unzip postwordcount.zip in /user/plugins. Then activate it in the Plugins Admin page. It will count all of the words from the post, and the words in the post's title can optionally be added to the total.

Here is the template tag for adding to your theme, inside the posts loop:

echo $post->word_count;

Comments and questions should be left below. Subsequent updates and releases will likely appear on the plugin page, not here.


* Or rather, how far behind I am, if my typical progress from the last several years progress is any indication.

13 May 2008

geotags plugin for habari

I've written a simple plugin for Habari to add geographical information to a blog. I've used geotags for years* with websites like GeoURL by manually-editing my page headers, but this geotags plugin automatically inserts the correct tags in every generated header.

Requirements

Using version 0.4.1 of Habari or later, all you need is this line somewhere in the <head> block of your theme.

$theme->header();

If you are using one of Habari's default themes, then you are already set.

Download

This will always link to the most recent version: geotags.zip

Installation and use

Unzip geotags.zip in /user/plugins. Then activate and configure it in the Plugins Admin page - you will need to know your latitude and longitude in decimal. To find them you can use My Geo Position.

Once the plugin is installed and configured, you're done. Your headers will now display your position like this (the location of my site):

<meta name="DC.title" content="mikelietz:fine whine">
<meta name="ICBM" content="40.076665, -82.95996">
<meta name="geo.position" content="40.076665, -82.95996">

Comments and questions should be left below. Subsequent updates and releases will likely appear on the plugin page, not here.


* Whether or not they've ever been useful is, I suppose, a question I've never really asked. They've certainly got potential to become something interesting, or at least useful.