Now testing version 0.3.0

If you're reading this in a web browser (as opposed to an RSS aggregator), then you're looking at what will eventually become the next release of LnBlog. I uploaded the latest code last night and I'm playing with it now. There's still lots of work to do, but, hey - this is only the 0.3 release.

Most of the changes areactually visible on this page, in some form. You'll notice that each most now displays the name of the author, for starters. This includes a real name (or username), e-mail address, and a homepage, as well as e-mail notification on comments, which I haven't actually tried yet. There's also a TrackBack ping URL and a form for users to send TrackBack pings to other blogs. I still need to play with that a little, though.

I've added a new theme called Tux Ice, which I'm using for LinLog. That, also, still needs some work, but I think I like it better than the Skepticats theme.

Most of the other changes aren't too big. I made some of the HTML more semantic, added some images for the RSS feed links, and added a link on the month archive pages to show all the entries on one screen. The last one is a nice feature for people who browse from work - you can still read all the entries, but there are fewer of those incriminating log entries in the corporate firewall. ;)

If all goes well, the next release will be in about a week or two. If not, then who knows. I just don't want to rush it this time, though, because I always screw something up when I push for an artificial release date.

The next release draws nigh

I think I've pretty much finished all the new functionality for version 0.3.0. I'll be installing it on the web server this weekend to test it and, with any luck, releasing it not too long after that.

There will be a whole lot of changes in the next release. First, I've added a basic user account system with simple access control. This makes it possible for a small group of people to collaborate on a weblog without all sharing one login. Readers will be able to identify and contact each author individually. It also serves to identify logged-in blog authors in the comments, which is nice. The addition of e-mail information also allowed me to add support for e-mail notification of new comments.

The second bgi feature is that I finally added basic TrackBack support. On second reading, it turns out that the TrackBack specification is pretty simple. To receive pings, all you need to do is process an HTTP POST request. This is trivial in PHP. Likewise, sending pings is pretty simple. For now, I just added a form that can be filled out and submitted to send a ping. I implemented an automatic ping mechanism, but I haven't tested it yet and I'm not sure how much of an excerpt (if any) should be sent by default.

Last, I'm trying to add a new theme. Of course, it still looks a lot like the other themes, but will hopefully be somewhat nicer to look at. I finally decided that the skepticats theme sucks and that I'd like to use something different for LinLog. Hopefully I'll be able to make something that looks pretty and goes with a picture of a penguin. ;)

LnBlog 0.2.2 is out

The next iteration in the 0.2 series, LnBlog 0.2.2, is available. You can get it from the download page.

This release adds a "show all" page for the blog entry archive and a simple Javascript-based editor for posting. It also fixes a quote-escaping problem with post previews.

I'm kind of excited about the editor, since I managed to include what I think are a couple of cool features. This is an accomplishment for me, since I konw only slightly more about Javascript than I do about PL/1. Anyway, I made the acronym and abbreviation buttons in the editor remember the title text you enter for them, so the next time you use that acronym, you only have to enter the actonym itself, not what it stands for. I also found a function to insert text into the textarea at the cursor location rather than at the end. And the best part is that it actually works in the latest version of Opera!

The only thing I'm not sure about is my choice of using text boxes for the editor instead of input popups, which seem to be more popular. The popup inputs do have something going for them in that you can just click a button, type, and hit enter. Using text boxes adds an extra mousing step (click text box, type, click button). On the other hand, popup input boxes are modal, which really, really sucks. I guess it's a balancing act. Although I suppose it would be possible to make this configurable....

LnBlog 0.2.1 released

I just uploaded version 0.2.1. This has some minor bug fixes and feature enhancements. You can get it from the download page.

This release fixes an error in the handling of post dates which caused the original post date to be changed when an entry was updated. It also fixes a bug in the LBCode regular expressions for lists and a bug which kept HTML code from being stripped correctly when using LBCode or auto-markup.

As I mentioned in my last post, I've added a preview button for posting and RSS feeds for comments. I added sidebar entries for comments when a blog or article that has comments is showing.

I also added link elements to the head section of some pages that point to the RSS feeds. If you're not familiar with this, all it is in linking an RSS feed to the page, much like you would do with a stylesheet. The benefit of this is that many modern web browsers, such as Firefox and Opera, will pick up on this and offer you a nice little interface element to view the feed. For example, Firefox has a "live bookmark" feature that shows up in the status bar whenever there is a linked RSS feed in the page, and Opera gives you a nive "RSS" icon in the address bar, which you can click on to open the feed in Opera's RSS reader.

Things for the future

I'm working on the next minor release. I fixed a few bugs, added RSS feeds for entry and article comments, and added a feature that I really need - a preview button. I never even thought of that feature until I posted one too many entries that had a minor typo or LBCode error. A text-book case of "scratching your own itch."

I think I'm going to have to add a real user authentication system. I just don't think the "one user per blog, plus the admin" thing in going to work for me. For instance, it would be nice if more than one person could update the news page. Of course, I can do that now by simply telling soneone else the password, but it would be nice to allow readers to differentiate between the people posting the entries. I would also like to add an "e-mail on comment" feature, and it would be nice to have real user account for this.

I think that will have to wait until version 0.3.0, though. For the time being, I should probably get the smaller problems and features worked out. Like a Javascript editing interface.

LnBlog 0.2.0 has been released

I just finished uploading version 0.2.0 of LnBlog. This is a major improvement over version 0.1.0 and includes lots of bug fixes and several feature additions. You can get it from the download page.

The main feature addition is FTPFS, which is what I call the module for FTP file writing support. Basically, this allows you to write files on the web server through FTP, rather than using PHP's native filesystem functions. This has several advantages:

  1. It lets LnBlog work in Safe Mode.
  2. Your user account will own the files, not the web server account.
  3. You do not have to change any file permissions on the web server to make things work.


Given the above, using FTPFS is highly recommended.

In light of the addition of FTPFS, I've also changed the initial setup program to start by configuring file writing support. To use FTPFS, just select the appropriate option button on the form and fill in you username, password, and host. This information is stored in a PHP file, so it can't be viewed by the web population at large.

The other main feature addition is file upload support. There are now entries in the sidebar to upload files to the weblog root, or to the current entry or article. Combine this with FTPFS and you almost have a mini-CMS

The rest of the feature additions are faily minor. I added links for various inaccessible features, such as deleting entries and comments. New articles are now displayed in the sidebar by default. Lots of updates to the BBCode support. In fact, I've renamed it to LBCode, because I added some non-standard elements (e.g. equivalants for the HTML <abbr> and <q> tags) and I want it to be clear that I'm not even trying to maintain compatibility with the "official" BBCode markup, if such a thing exists.

And, despite what I said in my last post, I still haven't put up a SourceForge project yet. I'll probably get around to it sooner or later. I may put up a listing on Freshmeat while I'm at it.

Maybe it should be 0.2.0....

Well, all the really annoying bugs seem to be out of the code for now. The FTP bug was easily enough fixed by switching from ASCII to binary mode. (Duh!) I fixed quite a few other bugs in the past couple of days, so things are starting to look pretty good. Also, I tested it out on my workstation, and when using FTPFS (my name for the FTP file writing module), LnBlog officially works in safe mode.

I'm thinking that the next release will be in a day or two and it will be version 0.2.0, not 0.1.1, since I've added several new features and made some fairly sizable changes to some of the back-end classes. I think I'm going to set up a SourceForge project first, though. I figure I might as well. When I first started coding, I did a search to see how many other people had already invented this particular wheel, and turned up much fewer results than I thought. Oh, don't get me wrong - there were half a dozen working file-base weblog packages, but there seemed to be a disproportionate number of projects in the "pre-alpha" stage, meaning they never got off the ground.

Anyway, I think most of the core functionality that I'm aiming for right now is in place, so after the next release it will be time to focus on the user interface and clean everything up. Maybe add a couple of themes, document the theme system, add a Javascript rich text editor. You know, the fun stuff. After that I can get to things like trackback, polls, and whatever else is on the TODO list.

FTP writing is working

I officially have FTP file writing working and have built a configuration screen for it. The file writing config screen, which will be the first thing that you see in the initial configuration, lets you choose whether to use FTP for file writing and lets you enter your username, password, host, absolute path to your FTP root, and a path prefix (e.g. ~) if applicable. The script will attempt to detect the host and path automatically, although you can probably change the host to 'localhost' in many cases.

So far, the only complication I need to work out is how newlines work. See, the BBCode routine replaces single line breaks with an HTML break tag, while it uses double line breaks to indicate the start of a new HTML paragraph. However, for some reason, it isn't working correctly. I think the problem is related to FTP trying to automatically do the DOS/UNIX newline translation, but I haven't had much time to look at it yet. (For those who don't know, UNIX systems use one character to represent a line break whereas DOS and Windows use two characters.)

I've uploaded the new code to my web server and am posting with it right now. I've also added some more BBCode-style markup tags and fixed several bugs. That means that, with any luck, LnBlog 0.1.1 will be available for download soon.

Work continues....

I'm making progress on the next release of LnBlog. I've implemented file upload support and am working on an (optional) interface to write files via FTP. In fact, I've finished the backend class and it seems to work, so now I need to integrate it with the rest of the code. The idea is to work around that annoying issue where the files in your weblog are not owned by your account, but rather the Apache account. Instead of letting the web server write the files using native filesystem funcitons, we can use PHP's FTP interface functions, to authenticates to the FTP server using your credentials and writes the files by using FTP commands.

I'm also planning to add some interface elements to the next release. For example, I need to add per-blog login creation, as well as both editing and deleting for comments and entries (right now entries have editing and comments have deleting). I was also thinking of adding an abstract field, i.e. a summary, for entries and articles to support that "teaser links to full article" thing that a lot of sites have. And as long as I'm at it, I was thinking RSS feeds for comments might be nice, as well as a GUI for changing the site map and adding articles to the side bar.

First release - LnBlog 0.1.0

As promised, I've uploaded the first release of LnBlog. You can download it here.

It's still a little rough around the edges, what with this being the first release and all. For one thing, you still have to manually edit the HTML template to change the menubar (where it says "Site map" under the banner) and there isn't yet any mechanism for adding articles to the sidebar. I was going to have all articles shown there automatically, but I'm not entirely sure if that's a good idea. Of course, these won't become real issues until I have some users. ;)

I spent some time tonight fixing a permissions problem. Through a stunning lack of foresight, I failed to account for the fact that the PHP mkdir() function uses the system umask when setting the permissions on new directories. For those who aren't well versed in the ways of UNIX, mkdir() is the function that creates new directories (also known as "folders" in the Windows world) and the umask is a value that essentially determines the default permissions for new files and directories.

On most systems, as on my web host, the standard umask is set to give the file's owner read and write permissions, but only write to anyone else. Well, this turns out to be a problem because LnBlog doesn't yet have a file upload function (that's coming in the next release), so I have to manually upload files via FTP. The catch is that when when LnBlog runs and creates the directories I need to put files in, it doesn't run as the same user account that I use for FTP - it runs as "apache," the web server account. Thus, I couldn't write files to the directories it created.

Fortunately, this was an easy fix. Just change the umask in the directory creation routine and hack together a quick script to change the permissions on the directories I've already created. However, as I was reading over the online PHP manual, I cam across a novel solution to the problem. Somebody suggested using the PHP FTP functions to create new directories. This would allow a script to use FTP-based mkdir() calls and so create directories under my FTP user account. Of course, it would require a little more user setup to make it work, but it sounds like it would be a neat feature to have. It would certainly be better than having a bunch of my data in world-writable directories that I don't own. I think I'll look into that a little further.