LnBlog 0.9.0 beta 1

It's finally that time again. LnBlog 0.9.0 beta 1 is ready for those adventurous souls who feel like taking it for a spin. You can download it here. I actually hadn't intended to get to version 0.9.0 quite yet, but on the way to 0.8.3, I accumulated so many features and under-the-hood changes that a higher version number seemed justified.

If you want to upgrade to the beta version on a live web server, I strongly recommend backing up everything related to your existing LnBlog installation. That means your entire LnBlog directory and each one of your blog directories. I don't expect that anything will go wrong (it didn't for me), but there are a lot of changes in this version and I'd hate to see anyone lose data because of it.

In addition, if you are upgrading from a previous release, please note that you will need to run an upgrade on each of your blogs. You probably won't forget this because there is now a helpful reminder in the sidebar under you logout link.

As for the changes and new features, here's the quick list:

  1. Entry, reply, and user data files have all been converted to XML format. Old files will still be read, so there is no need to convert.
  2. Support for running blogs on multiple subdomains from a single installation.
  3. Lots of those annoying wrapper scripts in the blog, entry, etc. directories have been removed. For existing blogs, the unused wrappers will be deleted when you run an upgrade.
  4. Support for saving draft entries to be published later.
  5. New Linksleeve anti-spam plugin.
  6. Lots of fixes to the blogging APIs. Note that the Blogger, MetaWeblog, and Pingback implementations are now combined in a single xmlrpc.php file, so adjust the URIs in your blogging client accordingly.
  7. Added a "manage replies" feature to view all replies for various levels of archives.

I'm not planning to add any more significant features to this release, otherwise it will drag on forever. However, I am a bit unsure about some of the user interface elements, and I would love any feedback people have on them.

My two big UI questions are the new feature in the entry editor to automatically add a link when you add a file to be uploaded. There is a checkbox in the entry options to turn that off, but I'm generally not satisfied with this. It would probably be better to pop up a prompt window, but that will wait for another release....

The other thing I'm unsure about is the new file writing setup page. It's significantly longer and more verbose than the previous version. That's partially because I added the subdomain options to it, and partially because I added file permission settings and some option buttons to help guide the choice. I'm not really happy with the final product, though. I'm thinking it would be better to break the different sections out into a multi-step wizard kind of interface. I'm also not sure I'm doing a good job explaining the options and issues with configuring file writing. I guess I'm just not sure how to explain the technical details of the the various possible permission, ownership, and safe mode configurations in a non-technical way.

As usual, any feedback is greatly appreciated - suggestions, bug reports, whatever. Leave a comment, send an e-mail, or use the SourceForge tracker. Unfortunately, I am currently unable to accept feedback via telepathy.

New BotBlock plugin

I've just uploaded a new version of the BotBlock plugin. This one adds two options. One makes the comment check depend on a cookie, so user agents that don't accept them will be blocked. The other option blocks any comment that contains markup for HTML or BBcod-style links. Since markup isn't allowed in comments anyway, it's a pretty good bet that comments with links are spam. Either that, or the commenter wasn't paying attention.

Now on a subdomain

Well, now that I have a host that supports subdomains, I've finally gotten around to adding subdomain support to LnBlog. And so, the URL of this page has now changed to http://lnblog.skepticats.com/. Thanks to the wonder that is mod_rewrite, the old URLs should continue to function.

And, of course, it goes without saying that subdomain support will be in the nex release of LnBlog. Of course, first I'll have to add a user interface to configure it, but at least the back-end code is working now.

New file writing twists

It looks like I've got my file permission issues sorted out now. I case you didn't know, I've moved to a new web host and I ended up having some issues with LnBlog.

My previous host ran PHP as an Apache module. In this configuration, andy files PHP creates are owned by the Apache user. Basically, this means that if you want a script to write to the filesystem, you have to disable safe_mode and make everything world-writable, or you have to use FTP. This is the scenario I had in mind when I wrote the NativeFS file writing module for LnBlog.

My new host, however, runs PHP suexec. This means that PHP is running as CGI, not an Apache module, and is running as my regular user account, not the Apache account. Thus, there is no need to worry about file permissions or ownership, because everything "just works."

Well, almost everything. It turns out that the server objects to scripts and directories that are world-writable, throwing an internal server error. This is a good thing as far as security goes. However, the NativeFS module, by default, makes everything world-writable because it was designed for the mod_php scenario. Hence it doesn't work.

Needless to say, I've fixed this problem and deployed it on my site. Basically, I've just added the ability to set the permissions for LnBlog to use when creating files. I just have to work out the configuration interface and then I'll put up a maintenance release.

LnBlog 0.8.2 finally released

Well, it's finally release time again. I've put up LnBlog 0.8.2. As usual, you can find it on the download page or just grab the release archive.

I'll be honest with you: it's been so long since the last stable release, I don't really remember all the changes. I just know there have been quite a few of them. I'll try to highlight the big ones, but if you're really curious, just read the last few blog entries and/or the changelog.

  • Change organization of theme style sheets.
  • Added option in system.ini to group all replies (comments, Pingbacks, and TrackBacks) into a single list.
  • Added mass deletion of replies.
  • Improved the sidebar calendar and made it AJAX-powered.
  • Added interface on admin page for administrators to modify user accounts.
  • Converted entry data files to XML format (don't worry - it'll still read the old format).

Thanks to everyone who contacted me with problems, suggestions, and other feedback for this release. Please keep it up - I really appreciate it! And if you find anything wrong in this release, you know what to do. Thanks!

The next beta and XML

Here's the next one: LnBlog 0.8.2 beta 2. I think I'm done adding things for this release, so I'm going to let this beta cook for a few days or so and then release it. I would have done the release today, but I added some fairly major things in the last couple of days and wanted to test them out a little more.

If you've been keeping score so far, this release contains changes to the theme stylesheets, mass comment/TrackBack/Pingback deletion, reply ungrouping, and a new AJAX calendar. The last big change, and the reason I want to let it cook, is the entry file format.

I finally got with the program and decided to start storing entry, article, and comment data in XML format. The ad hoc format I was using before worked well enough, but it was, well, very hacky. Basically the only reason I was using it was because I didn't want to depend on any optional XML libraries and I couldn't find a good one that I could just drop into the package. However, I finally broke down and wrote my own.

All I really wanted was a little library that did two things:
1) Read an XML file and put the contents in a DOM tree type data structure.
2) Take such a structure and serialize it to an XML file, automatically escaping angle braces and entities.
Unfortunately, PHP 4 doesn't come with anything like that. At least, not as a standard module. All it has is a thin wrapper around expat, an event-based XML parser. Expat is OK, but it doesn't output a DOM tree structure and it doesn't do anything related to serializing such a structure. So I basically just wrote a couple of classes: SimpleXMLReader and SimpleXMLWriter. They're found in the new lib/xml.php file.

The SimpleXMLReader is a wrapper around expat that builds a sloppy DOM tree. It also has the ability to convert that tree into an object. The SimpleXMLWriter takes an object and serializes it as XML. The way it works is that each element under the base node is treated as a field of the same name in a PHP class. This allows me to add fields to classes without having to account for them in the serialization routine. Anything that's new will automatically be written to the file and old files will simply not set the new fields.

Of course, the new classes are still pretty simplistic, but they're working pretty well so far. However, I strongly suspect they'll choke on text that's not encoded in UTF-8 or something compatible. Thus I added an option to turn it off. Just set the following in your userconfig.cfg to revert to writing old-style files:
USE_OLD_ENTRY_FORMAT = true
ENTRY_DEFAULT_FILE = current.htm
ENTRY_PATH_SUFFIX = .htm
COMMENT_PATH_SUFFIX = .txt

The last three lines just change back all the settings back to the old values.

Note that support for the old file formats has been maintained, so there's no need to convert old data. New and edited posts will be written in XML format, but old entries and comments will be read normally.

Aren't I Web 2.0-y

I've been reworking the sidebar calendar plugin lately. It was kind of buggy and just didn't work as well as I would have hoped. In particular, using query strings to browse through the months just really sucked.

My solution to the bugginess was to rewrite a large chunk of it. It's much cleaner and more managable now.

My solution to query strings sucking was to get with this whole Web 2.0 thing and do it with AJAX. So now, rather than the whole page refreshing when you click the previous month link on the calendar, a JavaScript requests an update from the server and then updates the page in place. The down side of this is that the next and previous links don't work if you don't have JavaScript or are using an archaic browser. Of course, you can still use the archive links, so it's not like you can't get to the previous month's links.

I've installed the new calendar plugin on this site. I haven't made it available for download yet because it's still in progress and requires a couple of support files. However, it will be standard in the next version.

New beta

Here's a quick beta release for anyone who's feeling adventurous. This is LnBlog 0.8.2 beta 1, which includes bug fixes, theme reworking, and some new features. I'm going to let this bake for a couple of weeks before releasing the final version.

This includes some reworking of the theme system, so there may be problems with some themes. Basically, I added some documentation to the default templates and consolidated the stylesheets. Refer to the default theme for an example of how things are organized now.

On the feature addition side, I added a facility for bulk reply deletion. Basically, I got sick of deleting comment spams one at a time, so now you can click a check box and mark any number of comments for deletion. I also added a system.ini variable called GroupReplies, which is turned on by default. When turned off, this will cause all replies on an entry (comments, TrackBacks, and Pingbacks) to be displayed in a single list, like many other blogging systems do. When turned on, it will keep the old behaviour of seperating by type of reply.

As usual, let me know if you find any bugs and I'll get them fixed for the final release.

LnBlog 0.8.1

LnBlog 0.8.1 is now available. As usual, you can grab it from the download page.

This release is for bug fixes and some minor feature enhancements. The bug fixes include Unicode issues with editing posts and pretty permalinks, as well as a very annoying issue where newlines were not properly translated to HTML <br /> tags in LBCode. Many thanks to MoonMind for pointing these out.

The feature enhancements are all small. There is now an LBCode color tag. I also changed the LBCode editor to remove the quote buttons (which I never used) and add a color button with drop-down selector and an alignment selector for the image button. For entries with an enclosure, I also added an HTML link tag to the enclosure file. Lastly, I included the new BotBlock plugin in this release.

That pretty much sums it up. As usual, please let me know if you have any thoughts, ideas, or bugs to reports.

TrackBack spam solved

Following up on the post I just made about the BotBlock plugin, I thought I should mention that the reason I'm getting comment spam is that I turned off the DisableComments plugin on LinLog. The reason I turned it off was to test out the TrackbackValidator plugin that comes standard with LnBlog 0.8.0.

The DisableComments plugin allows you to automatically turn off replies (TrackBacks and comments) on entries older than a given number of days. Since my big problem was TrackBack spam, and it was mostly on entries that were more than a month old, I "fixed" the problem by simply setting DisableComments to disable replies after 30 days. On the up side, this stopped the flood of TrackBack spam. On the down side, it stopped all legitimate replies too.

Well, it turns out that I don't really need the DisableComments plugin as much anymore, Happily, the new TrackbackValidator plugin, which only allows TrackBacks from URLs that actually link to you, has completely solved my comment spam problem. My server access logs will show lots of TrackBack pings, but not a single spam ping has gotten through.

The only down side is that now I need to worry about comment spam on old entries.