English Mike
The random musings of an indolent writer.
The random musings of an indolent writer.
Sep 6th

Sunset over the Kruger
The weather, while we were at the Ngala Game Reserve, was cool and dry but overcast most of the time. That made for some flat light when taking photos of the wildlife which certainly wasn’t ideal. But on all three evening drives, the clouds would break up enough to give us some beautiful sunsets. Sadly, most of my attempts at capturing them on camera were not that great, but this is one of the better ones.
Aug 30th
Ask and ye shall receive!
I have been going through the backlog of comments and noted that a couple of people wanted to sort their indexes in chronological order — i.e. they want the list of posts sorted by date with the most recent at the top. So I was just pondering the issue, wondering if I should really add this feature even though it’s not really something AZIndex is designed to do, when I suddenly had “D’oh” moment…
You can already do this with the current release of AZIndex! (By using a one-line custom compare function.)
Here’s how you do it:
Aug 29th

Sneaking a Peek at an African Wild Cat
For all you feline fanciers out there, thanks to the new 10x zoom camera I brought for the trip, I was able to snap a photo of an African wild cat as we were being driven from the airport into the game park. Appartently they are quite rare, even though we saw another one a couple of days later. Not as impressive as the big cats they share the African bush with but still, they do take a good photo, don’t they?
Aug 27th
I have had a couple of questions about putting an index in the sidebar of a blog so that it is visible on every page. After a bit of testing and fiddling, it turns out that, yes indeed it is possible, and it’s actually quite easy to do. The trick is to use a sidebar widget, and here are the step-by-step instructions on how to do it:
add_filter('widget_text', 'do_shortcode');IMPORTANT: It must be inside a PHP tag: i.e. somewhere between <?php and ?>
For example, if there is a line containing <?php at the top of the file, then add it on the following line. (Just make sure you don’t put it inside a PHP function). If the file is empty, or doesn’t have those tags, you will have to add them yourself:
<?php
add_filter('widget_text', 'do_shortcode');
?>These instructions assume that you are already using a theme with a widget-enabled sidebar. If you do not see the new text widget, then it’s possible you will need to “widgetize” your theme (search for that term on Google for more information). Most popular themes are already widgetized these days.
I have tried this, and it works fine, though obviously there isn’t much room for large entries in your index. There is one site I know that is using this trick to display an index of movies in their sidebar. If you try this yourself and have any questions, just leave me a comment.
Aug 27th

A leopard feeding on an what’s left of an unlucky impala
This was one of the highlights for our stay in the Kruger. We sat and watched for about 30 minutes as the leopard tucked into a meal of very rare impala steak. Not only that, but there was a hyena sniffing around below the tree waiting, in vain, for something to drop from above. And I’ll tell you something, those hyenas are huge! People tend to think that a hyena would be no match for a leopard, but in truth it’s quite the opposite. If the leopard had been on the ground with that kill, it would have easily been driven off by the lone hyena I snapped at the foot of the tree.

The Hopeful Hyena
Aug 26th

Sunrise over the Kruger National Park
Apologies to everyone who has been waiting for answers to their questions. No excuses — just action to make up for lost time. I will be going back though all the comments and catching up as quickly as I can.
I will also be posting select photos from my summer vacation to South Africa. It’s a beautiful country and the people we met, of all races, were nothing but kind and generous. They are still struggling with the after effects of decades of segregation and injustice, and I can only hope their leaders act wisely and bring peace and prosperity to their country.
Aug 7th
The wanderer returns!
My apologies for not attending to the questions, suggestions, and comments left on my blog in the past three weeks or so, but there was a very good reason for my absence… I was having way too much fun on vacation in South Africa and Mauritius with my sister and her wonderful family. The highlight of the trip was undoubtedly our stay at the Ngala Private Game Reserve on the border of the Kruger National Park where we were treated like royalty and given the experience of our lives on safari in the African bush.
As a taster of what we saw, here are photos of the legendary “big five”.
First, a female leopard and her cub. This amazing photo was snapped (I think) by my sister, so I can take no credit for the captured moment.

Unfortunately lions were a little scarce in the game park while we were there, but we managed to intercept a couple of male lions before they vanished into the Kruger in pursuit of their pride.

Bull elephants we saw plenty of… this one in particular, and thereby hangs a tale (but it will have to wait for another day of two).

We caught up with a rhino family just as the sun was setting over the park.

And finally, we only caught a glimpse of the water buffalo which, thanks to megazooms and megapixels, seems a lot closer than it actually was.

Plenty more photos where those came from, but I promise not to post all 2,000 of them!
Jul 15th
Nice timing! Just as I am about to go on vacation and don’t have much time (and only a very slow computer) they go and release a major new version of WordPress! Ah well, I have managed to perform a quick test with both of my plugins on the new version and I am happy to say that:
Yes, it’s actually good news that my TinyMCE Entities Patch plugin is no longer necessary — WordPress has fixed the bug my plugin was designed to fix. I may get the chance to update the plugin tomorrow so that those who installed it so they could keep the spaces around will still be able to use it, but I can’t promise anything at this point.
UPDATE: Well, I spoke too soon yesterday — there was a problem that many other plugins also seem to have stumbled over thanks to a change in the get_option WordPress function (naughty WordPress!). I have updated AZIndex to v0.5.4 with a workaround for the problem on WP 2.6. The plugin should continue to work with WP 2.5 and WP 2.5.1, and with WP 2.6 even if they revert the behaviour of get_option back to the way it was in 2.5.1.
Jul 14th
AZIndex version 0.5.3 has just be released. It’s just another interim version as I am gearing up for my summer vacation, mainly to fix a bug where the sorting of the headings was case-sensitive. I’m not sure how that one escaped detection for so long!
I also took the opportunity to add a filter to the plugin — ‘azindex_heading’ — which, if set, will be called for every heading before the index is sorted. This allows users to write a filter function that can modify the heading in ways that can’t currently be done using the AZIndex plugin — for example, if you want to strip words like “A”, “An” and “The” from the front of the heading then you can write a simple filter to do that.
Below is an example of such a filter. It will remove “The”, “An” and “A” (of various cases) and put them at the end of the heading instead — e.g. “The Great Escape” will be transformed to “Great Escape, The”. Useful for certain types of indexing:
add_filter('azindex_heading', 'my_filter_heading');
function my_filter_heading($heading) {
if (preg_match('/^(THE |The |the |AN |An |an |A |a )/', $heading)) {
$split = explode(' ', $heading, 2);
$heading = $split[1].', '.$split[0];
}
return $heading;
}
Note that this is just an example and there may be a more correct way to do the same thing, but it works as advertised. You can add your filter function to the functions.php file in your current theme. Remember to clear the index cache (from the AZIndexes admin page) once you’ve added the filter so that the altered headings will be sorted in the correct order.
If anyone comes up with a useful filter function of their own, please feel free to post it here.
Jul 7th
Have you ever slaved over the formatting of particularly tricky blog post then forgotten how you did it? Ever gone back and edited an old post to hunt down the fiddly HTML you wrote so you can use it again in a new post? Well, I have, and I just found out something that makes the whole process easier and quicker.
Recent Comments
Adding a Shortcode to a Sidebar Widget
Embedding HTML in Blog Taglines
Embedding HTML in Blog Taglines
Adding a Shortcode to a Sidebar Widget