Javascript editor bug

Oops! I just discovered an error with the Javascript LBCode editor - it doesn't work! Apparently, I changed the form element names in the templates and scripts, but forgot to change the linked Javascript file. I hardly ever use the editor myself, so I guess I didn't notice.

Anyway, I'll probably put up a maintenance release before too long. In the mean time, you can download a fixed version of the script here. To install, just copy it into your LnBlog/themes/default/scripts/ directory, over-writing the old file.

LnBlog 0.5.0 released

OK, so I lied: this release is 0.5.0, not 0.4.1. Given the sheer volume of code changes, along with the addition of a major feature like internationalization, I figured a minor version number increment was more appropriate. It just didn't feel like a 0.4.1 anymore. As for all those times I mentioned version 0.5.0, just mentally change that to 0.6.0.

You can check the last two posts for more details regarding the changes. However, I'll summarize below anyway, if for no other reason than to justify changing my mind on the version numbering. For the gory details, refer to the ChangeLog.

  1. Internationalization support. We've got both gettext support and a home-brewed fallback system that uses the same interface.
  2. A sidebar calendar plugin to replace the archive month list.
  3. Some added navigation links and features for the archive pages
  4. A new userconfig.cfg text file to override default configuration constants.
  5. Lots of developer documentation with Natural Docs.
  6. Started migrating user documentation to Natural Docs.
  7. Cleaned up redundant templates.
  8. Improved file writing setup. The setup script will now attempt to guess the FTP root if one is not entered.
  9. Made logins stick between blogs.
  10. Lots of bug fixes. Once again, thanks to WGM for the all bug reports and feedback on i18n issues.

As usual, you can get the latest release from the download page. You can also download the new documentation from that page or view it here. If you have any problems, questions, or comments, feel free to e-mail me or leave a comment on this post.

Behold, a working calendar

You may notice that now the sidebar calendar actually works. It even looks fairly decent, if I do say so myself. In fact, it has now taken the place of the old archives section because, let's face it, the old one wasn't that attrcative or useful.

One thing which, I think, makes the calendar a bit more useful than the old archives section is that it's actually smart. I added auto-detection of the month and year of the current post, if any, so it'll actually show you the month you're looking at. It also has lots of links to the archive pages. In addition to the main archive and entry list links at the bottom, the month and year in the heading are also links to the corresponding archive pages. All in all, I think it's a pretty nice setup, mixing a clean appearance with lots of information. But, then again, I'm not exactly an unbiased observer, am I? ;)

It's almost time for the next release

It's just about that time again: the next release is just about ready. In fact, for anyone who's feeling adventurous, here's a beta release of LnBlog 0.4.1. At least, I think it will be version 0.4.1 - I'm a little torn as to whether to use a higher version number.

You see, aside from a few bug fixes and a couple of small feature additions, there isn't much new in this release. That is, there isn't much new for people who don't program and only speak English. The main focus was adding internationalization support.

The next release includes several fixes for character encoding issues and will be fully translatable. I've added support for PHP's GNU gettext extension as well as an ad hoc translation facility. The idea is that since gettext isn't a standard module, you can also have translations in simple PHP files that don't depend on it. I even added a fix for the character encoding conflict with generated text from strftime(). Sadly, that fix depends on the iconv extension to work properly, but it's better than nothing.

My other focus was documentation. Not end-user documentation, although there's still plenty of that to write, but developer documentation. I used Natural Docs to auto-generate technical documentation from comments in the code. Yes, I know auto-generated docs have a nasty tendency to not be very good, but it's better than hand-written docs that easily get out of sync with the code. Besides, Natural Docs has a really nice syntax which looks a lot like how I would document the code anyway. You can see the results of my furious code commenting in the full LnBlog technical documentation that I've uploaded. It contains documentation on the basic function of all pages, full documentation on configuration constants, and documentation on the methods and properties of the back-end classes. With this, it might actually be possible for people other than me to write plugins that do something interesting.

Lastly, I should probably mention the couple of new features. First, I added a calendar plugin for the sidebar. It still needs some polish before the final release, but I though some people might like it better than the old archive list.

Second, I've added a simplified mechanism for overriding configuration constants. In the previous version, you had to add PHP code to userdata/userconfig.php. Now, you can do it in userdata/userconfig.cfg, which is a plain text file. It uses a simple name=value format. So now, instead of doing something like
define("DEFAULT_CHARSET", "utf-8");
in userconfig.php, you can just do
DEFAULT_CHARSET=utf-8
in userconfig.cfg. Yeah, it's not a big difference, but it's less prone to syntax errors for people who aren't programmers.

Anyway, I still want to do some testing and polishing before the official release. If all goes well, I might make it before Thanksgiving (that's the 24th for those not in the US). If not, then it will probably be another week or so. At any rate, I'm aiming to be done with it by the end of the month.