Plugins

This is where I store all the plugins that I write for different software. You can either browse through every plugin, or choose a category.

Amarok Script: Playlog

I just finished Playlog, my first Amarok plugin, written in Perl. I grew tired of last.fm having the sole properties of my listening-log, and such, this script everything that you listen to, along with the time that you listen to it, into two nice and handy MySQL tables. In the future, I plan to write some kind of analysis script for the data.

This was also my first piece of software to send in to kde-apps.org: Playlog.

Here is the Perl source code, in case you are interested. I release it under the GPL.

WordPress Plugin: Hello Anyone

Hello Anyone is a variant of Matt Mullenweg’s Hello Dolly WordPress plugin. Hello Anyone allows you to choose any lines to be randomly displayed on every page in your Admin panel. You can easily manage the lines and the CSS.

Download and Install

Download Hello Anyone 1.0.

Unzip the file and then upload it to your plugin directory (/wp-content/plugins/) and activate it under the “Plugins” tab.

Go to “Hello Anyone” under the “Options” tab and start adding lines!

Changelog

2006-10-21, version 1.0:

Initial release

WordPress Plugin: CurMusic

CurMusic adds two additional fields to every post, “artist” and “song”. You can use them to show your readers what you were listening to when you wrote the post. The information is shown by adding a PHP function to the theme. The style of the artist/song string can be customized through the option page.

Download and Install

Download CurMusic 1.0.

Unzip the file, upload it to your plugin directory (/wp-content/plugins/) and activate the plugin in the “Plugins” tab.

Edit your theme (Presentation -> Theme Editor) and add this where you want the music announcement to be: <?php echo_curmusic(); ?>. Note that you should know the difference between HTML and PHP before doing this. If you don’t, feel free to ask in a comment.

Todo

Music statistics

Mass-management of songs and artists

Overview of songs and artists

Changelog

2006-10-17, version 1.0:

Initial release

WordPress Plugin: Chemical Formula Formater

Chemical Formula Formater is a WordPress plugin that automatically formats chemical formulae. Ok, not really formulae, but it alters the chemical notation of elements. What it really does is adding <sub> tags to any numbers between 0 and 99 following chemical elements.

Example

Download and Install

Unzip the file and upload it to your plugin directory, wp-content/plugins/.

Activate the plugin through the “Plugins” tab in your WP-Admin.

That’s it! It doesn’t even have an options page!

Changelog

2006-09-15, version 1.0:

Initial release

WordPress Plugin: Favicon Head

Favicon Head is a simple way to automatically include correct tags for linking to your favicon in the head of every page in your blog. No file editing is required, you only have to upload the file to the plugin directory and activate it. The default favicon location is favicon.ico, but can be changed through the options page.

Features:

Animated favicon support

Custom favicon location

Works in WordPress 1.5 and 2

Download and Install

Download Favicon Head 1.1.

Unzip the file and upload it to wp-content/plugins/.

Click the “Plugins” tab in the WP admin panel and activate Favicon Head.

Go to the “Options” tab and click the “Favicon Head” sub-page in order to change the favicon location from /favicon.ico.

Changelog

2006-11-21, version 1.1:

Animated favicon support added (patch by pp)

2006-08-21, version 1.0:

Initial release

Irssi plugin: Hot-or-Not

This is my first irssi script, and it is very useful. If you ever get bored while hanging around on IRC, just type /horny and you will see something along the lines of:

This script fetches three random pictures from the Hot-or-Not API. It only gets images of females younger than 25 years and with a Hot-or-Not rating above 8, which means that I don’t care about minorities. Download the Irssi Hot-or-Not 0.1 source code, .pl or .zip.

Enjoy.

# /horny - Show URLs to random Hot-or-Not girls' pictures.
#
# /horny
#
# 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.
#
# Version 0.1 - 2006-07-29 - Tim A Johansson tim@gurka.se
# Initial release
#
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "0.1";
%IRSSI = (
authors => "Tim A Johansson",
contact => "tim@gurka.se",
name => "Irssi Hot-or-not",
description => "/horny - Show URLs to random Hot-or-Not girls' pictures.",
license => "GPL",
url => "http://timjoh.com/irssi-plugin-hot-or-not/",
);
sub cmd_horny {
use LWP::Simple;
my $max_age = '25';
my $min_rating = '8.1';
for (my $i = 0; $i < 3; $i++) {
$_ = get("http://services.hotornot.com/rest/?app_key=479NUNJHETN&method=Rate.getRandomProfile&retrieve_num=1&gender=female&max_age=$max_age&min_rating=$min_rating&get_rate_info=true");
# Please don't steal my API key. Get your own for free at http://dev.hotornot.com/. It is used for tracking applicatons.
if (m/gender>(.*?)<.*?age>(.*?)<.*?pic_url>(.*?)<.*?rating>(.*?)</) {
Irssi::print($2 . ' years old ' . $1 . ', rated ' . $4 . '. Enjoy. ' . $3);
} else {
Irssi::print('Error: could not recognize string: ' . $_);
}
}
}
Irssi::command_bind('horny', 'cmd_horny');

WordPress Plugin: The Holy Blog

Tired of your old, boring blog? Are all its plugins just plain lame? Does it lack a divine touch? Then The Holy Blog is just what you need! (Holy Book — get the pun? Haha.) The Holy Blog appends a random Bible verse on every page in your blog. Here are som of the features:

Verse cache for saving bandwidth and processing time

Fully customizable CSS

Choose verse update frequency

Verse statistics

Valid HTML/XHTML

Random verse fetched from the ESV

Download and Install

Here, you can download The Holy Blog 1.1. Unzip it and upload the-holy-bible.php to your plugin directory, wp-content/plugins/. Now, you just have to go to the plugin tab in your administration panel and activate the plugin. To change the default settings, go to the options page conveniently located under “Options”.

Changelog

2006-07-26, version 1.1:

Options page

Current verse in options page

Verse statistics

Next-verse countdown

Custom CSS

Resetable CSS

Variable update frequency

“Update now”-option

2006-07-26, Version 1.0

Initial release

WordPress Plugin: Hot-or-Not Admin Panel

“Hot-or-Not Admin Panel” is my second WordPress plugin. Its purpose is to encourage administration of your blog by displaying a picture of a random girl from Hot or Not in the upper right corner of the administration panel. Gender, age and rating are configurable.

Example

Download and Install

The current version of Hot-or-Not Admin Panel is 1.7. Download the zipped file here: hotadminpanel.zip. To install the plugin, just unzip it, upload it to the wp-content/plugins/ folder and activate it through the plugin tab in the administration panel.

Hot or Not Admin Panel works perfectly well on both WordPress 1.5 (Strayhorn) and 2.0, although it does not work in WordPress 1.2. Note that you will need either allow_url_fopen set to TRUE in your php.ini, or CURL support.

Replaced the fopen/CURL option and switch with wp_remote_fopen(). Thanks, “Midwestern City Boy”.

2006-07-27, version 1.6:

Added CURL alternative for fopen. Thanks, Mark

2006-07-26, version 1.5:

Changelog added

Options page added (dude, this quadrupled the file size)

Options for gender, age and rating added

2006-07-22, version 1.0:

Initial release

WordPress Plugin: ChessNotator

“ChessNotator” is a plugin that I wrote for WordPress. I don’t see why it wouldn’t work in WP 1.5, but I’ve only tested it in 2.0. The plugin allows you to paste a pure PGN text file between <chess> tags, and creates a nicely formatted table with the players’ names and the moves. Here is an example:

Download

You can download the current version of ChessNotator (1.0) here. It is zipped, so you will need to unzip it.

Installation

Move the file chessnotator.php to the plugin folder, wp-content/plugins.

Go to the Plugins tab in the administration panel and activate the plugin.

Post a PGN file!

Welcome to Timblog!

I’m Tim Johansson, and this is where I store everything that I write. You can browse through everything on this page, or you could choose a category that interests you in the top bar. If you have anything to say, don’t hesitate to comment — I love comments, too. Enjoy.

A new film tells the story of Carlos Kaiser, who was one of the most famous footballers in Brazil for over 20 years – even though he had no intention of ever kicking a ballYou might know the voiceover at the start of The Big Lebowski. As tumbleweed meanders through Los Angeles, Sam Elliott introduces […]

Rainfall affects our mood, our propensity to commit crime and how hungry we feel – but why?It’s raining, it’s pouring, the old man is snoring. He bumped his head when he went to bed, and he couldn’t get up in the morning. This was possibly because in the absence of sunlight his body was still […]

A trip to North Carolina to study bluegrass yielded this lesson: Earl Scruggs was the greatest there ever wasI spent a couple of months last year studying bluegrass in North Carolina, and I learned that there are is one tune you never ask a banjo player to play for you. Foggy Mountain Breakdown, Earl Scruggs's […]

When Johan Cruyff sold Jan Olsson the mother of all dummies with the subtlest of swerves, the Dutch captain’s signature move became the enduring symbol of Total FootballIt’s the defining image of the 1974 World Cup; the defining image of the great Dutch team of the 70s; the defining image of one of the most […]

Random tales from the 1966 tournament that have absolutely nothing to do with Azerbaijani linesmen, Kenneth Wolstenholme or Pickles the Dog1. The branding for the 1966 Football World Championship for the Jules Rimet Trophy was all over the shop. But at least Fifa were trying. The 1966 finals was the first to be blessed with […]

One of the greatest World Cup games has been largely overshadowed by the West German keeper’s dastardly actThe semi-final stage of the World Cup has, on balance, not been particularly kind to France. In 1958, the free-scoring team of Just Fontaine and Raymond Kopa were more than holding their own against Brazil until Vavá clattered […]

When Holland faced Germany it was always ‘problematic’, never more so than at Italia 90 when two rivals clashedA sort of photographic antithesis of Bobby Moore’s post shirt-swap embrace with Pelé in 1970, it is one of the iconic World Cup images. Four years after the photograph was taken, it was further seared on the […]

War-torn country’s players travelled to the 1982 tournament as heroes but were shunned on their return after some shockingly gung-ho tactics brought about a 10-1 defeat to HungaryOne of the smaller, yet still very pleasing features of the great 1982 World Cup was that even the goal celebrations had a poetic quality. The joy of […]

In open rebellion against their manager, France’s 2010 squad self-destructed as Thierry Henry watched impassivelyThierry Henry had more pressing matters to attend to before he could lose himself in his New York dreamscape [he was joining New York Red Bulls from Barcelona in the summer 2010], starting with his uneasy position within the French national […]

From pop-up bike lanes to painted potholes, here are the imaginative ways frustrated cyclists are taking action to create a safer environmentAcross the world, transport planning and infrastructure tends to favour the car, and facilities for cyclists and pedestrians are an afterthought. In response, frustrated urban cyclists have thrown caution to the wind and written […]