Jul 2 2009

WP: Better Search Widget 1.1

Better Search Widget 1.1 is a significant upgrade to Better Search Widget that adds new features and fixes an old bug with internationalization.

Features

(New features in bold.)

  • Optional default value.
  • Optional, custom widget title.
  • Optional onfocus and onblur listeners.
  • Optional, customizable focus and blur colors.
  • Custom button value.
  • Custom field size.

The built-in search widget has only one of these features, the optional, custom title.

Onfocus and Onblur

In order to use the blur and focus colors, you must enable the onfocus and onblur event listeners. In order to use the listeners, you must specify a default value (otherwise none of this makes sense). Here’s an example:

Bug Fixes

A pretty serious typo meant that none of the internationalization code worked correctly. This has been fixed, and en_US, en_GB, and fr_FR localizations are available. de_DE is coming. If you’d like to translate, there is a .pot file included in the languages directory.

License

Better Search Widget is released under the MIT License. If you use it, or have suggestions for new features or bug fixes, let me know!

Getting It

You can download Better Search Widget 1.1 now in a Zip file. Or, to save yourself some trouble,  you can check it out of Subversion from

svn co svn://jamessocol.com/better-search-widget/tags/1.1.0 ./better-search-widget

(Run that in your wp-content/plugins directory.) Subversion will make it easiest to upgrade later.

Roadmap

Soon, though probably not today, I will be releasing Better Search Widget 2, which will take advantage of the new Widget API in WordPress 2.8. This will add support for multiple instances of the widget, but will require at least WordPress 2.8. You should upgrade, anyway.


Jul 1 2009

Widget l10n

I spent some of today working on bringing a couple of WordPress widgets up-to-date (Better Search and Most Comments) only to discover there is a new widget API. I guess I haven’t been paying attention.

I’ll probably start some 2.0 branches tomorrow to take advantage of the new API. I wish I didn’t know how many people don’t keep their WordPress installations up to date, so I wouldn’t care about backwards compatibility.

At least both widgets got nice new, and functional, internationalization (i18n) code and new localization (l10n) files.

And BSW got a good feature update, incorporating some suggestions from Marco Jung, who is also, kindly, doing a German localization, and a few of my own. The built-in search widget has stepped up it’s game, and fixed the thing BSW was originally designed to fix (no widget title) so I have a higher bar to clear to justify the name “Better Search Widget.”

I’ll write up the new features tomorrow.


Jun 18 2009

A Personal Update

Most of my blog visitors are people trickling in from Google with questions about rebuilding PHP on RHEL, connecting PHP, IIS6 and SQL Server, or, inexplicably, looking for info on the game Crysis.

I should warn, a lot of that stuff is out of date. And I never did end up buying Crysis. (Gaming at 640×480 just isn’t that fun anymore.)

Anyway, given that traffic profile, I doubt most visitors will care about this. But, in case I’m wrong, and I often am, I thought you deserved to know about some relatively large changes with me lately.

The first and biggest: I no longer work at Michigan State University. I worked there for a year and a half as an student, and when I graduated, they kept me on as a temporary employee and then offered me a year-long contract position. That contract expired at the end of May—literally: May 31st would’ve been my last day if it hadn’t been a Sunday.

My month-to-month lease renewed on June 3rd, so I had a choice of moving everything out very quickly or paying for an extra month. Since I was only bugging out about 100 miles to my father’s place, I decided to get out quickly. (Nice for the landlord: there were already people coming to see and apply for the place before I was done packing.)

And then the last week of May I needed to fly out to California.

So in the span of a week, I flew to California and back, ended my job, and moved. Quite a turbulent time. A lot of things, like Twitter and this blog, fell by the wayside. Don’t worry, though. I have a post about semantic form markup that’s almost ready to go.

The job thing: I was not particularly excited about staying in the Lansing area when it was offered, but I took it because, basically, everyone told me to. Really, I only ended up staying about 9 months longer than I’d planned, but I needed to get out of the area. In the future, I may write about my experiences as support staff in a university environment (hint: I didn’t love it) but for now, know that leaving was a very positive thing for me in a lot of ways.

When you start to feel like Matthew McConaughey in Dazed and Confused (”That’s what I love about these undergrads, man. I get older; they stay the same age…”) it’s time to move on.

And, while I’m not yet quite ready to talk about it, it looks like the job situation will work out very well, and very quickly. Of course, I’ll have to move again.

That’s the story. Or at least as much as I’ll tell right now. Now for some technical mumbo-jumbo.

I’ve been working on a little project—though not in the past three weeks—called Cocode. It’s an open-source pastebin app that runs on my PHP framework, Maveric. Well, not quite a pastebin. More accurately, it’s a tool to support internal code review. It supports user authentication, comments on code snippets, and, of course, revisions with diffs and syntax highlighting.

Working on Cocode has given me a good reason to do some development on Maveric, itself. I’ve added some neat ORM features and am working on a real database abstraction layer. I also want to improve routing and several other ugly bits, but, you know, one thing at a time. The changes to Maveric give me a good reason to go back and rework the application layer of Today’s Meet, as well, though I haven’t done it yet. What a good time to add some of the features people request!

You can check out Maveric and Cocode from Subversion, if you’re curious. And if you’re a PHP developer who wants to contribute, please let me know. I would certainly appreciate the help and a fresh perspective. I’ll post more about Cocode soon.

Finally, I’m working on a little WordPress plugin to help with the new rash of irrelevant comment spam I’m getting. (You know the kind: they just say “Great Psot!” and their URL is the important part.) I’ll post about that one, too.

There’s my life, lately, both the coding and non-coding aspects. I hope you’ve enjoyed this brief, personal interlude. Next up, you’re regularly scheduled geekery and social media name-calling—except on the West Coast, where you’re local news is up next.