Mike Little’s not-quite-so-daily thoughts, babblings, and random synapse firings!
A collection of random thoughts and links. Nothing too exciting. ;-) -- Mike Little
[powered by WordPress.]
I have written a small plugin for a friend who wanted an easy way to display his favourite football (soccer) team’s next fixture on his blog.
He had previously needed to edit his theme sidebar.php every time, often twice a week.
So I came up with the idea of this theme widget, which allows him to select the two teams from drop down lists, type in the date, time, and competition and then save the changes. He can also specify which TV or Satellite channel the match will be shown on.
I have set up a demo of the widget on this page
In the spirit of open source, I thought I would release it to the world.
You can download version 1.0.7 of the plugin. Update: Version 1.0.7 has a minor CSS tweak.
Note the zip file includes UK soccer team badges (sourced from Wikipedia), but you can just drop in any team badges you like. Name them like Team_Name.jpg (or .gif, or .png) and the plugin will simply add them to the drop down list. Add them in a subdirectory (perhaps by league) for example Sport_League_1 and it will subcategorise them in the drop down list.
The settings dialog allows you to configure all aspects of the widget.

The drop down list will categorise the badges it finds in subdirectories.

The URI to TrackBack this entry is: http://zed1.com/journalized/wordpress-plugins/zed1-fixtures/trackback/
Please note: Comment moderation is currently enabled so there will be a delay between when you post your comment and when it shows up. Patience is a virtue; there’s no need to re-submit your comment.
[powered by WordPress.]
counter: 15810352
jour·nal n. A personal record of occurrences, experiences, and reflections kept on a regular basis; a diary.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||

95. We are waking up and linking to each other. We are watching. But we are not waiting.
— The Cluetrain Manifesto

39 queries. 0.792 seconds
July 12th, 2008 at 17:55
[...] is a post to demonstrate the Team Fixtures widget plugin. Got to the plugin page to download, discuss, or ask questions about the [...]
January 22nd, 2009 at 13:57
This is a great little tool, going to try and use it for a non-league website i’m trying to build.
One quesiton is it possible to include this in a page? Thnking of having it as a page header before the posts. Anyways great stuff, thanks very much!
January 23rd, 2009 at 09:13
Hi Paul,
If you had a theme that allowed an extra area for widgets at the top of the page, you could use it that way.
However if your theme doesn’t provide that, you can add the following code to your template in the place you want the fixture to appear:
<?php
$args = array('before_widget' => '<div id="team-fixture">',
'before_title' => '<h2>', 'after_title' => '</h2>',
'after_widget' => '</div>');
widget_zed1_fix($args);
?>
Give it a try and let me know how it goes.
Mike
January 29th, 2009 at 21:48
[...] plugin is still working [...]
February 14th, 2009 at 18:47
[...] plugin is still working [...]
April 10th, 2009 at 04:34
Can i change the time displayed to use for other locales? like Asia
April 10th, 2009 at 19:42
Hi LaX,
Yes you can enter any time you like.