November 11, 2003 11:11 PM

Implemented Category Support

Maybe I'm just being impatient, but I've attempted to spark a discussion on category support in NanoBlogger's Mailing List, and have hardly received any feedback. So, I've settled on what I think is a pretty flexible solution.

Categories are identified by their given number, much like the entries already are. Category management is handled through a combination of the add, edit, delete, and list options. Meaning that categories can be added using the add option and a special argument, "new", for the category option. Listing and editing categories requires a special argument, "cat", for the edit and list options. I've taken into account, the possibility of adding one entry to more than one category and have implemented batch processing (basically a lot of for loop constructs) to allow for that situation. In essence a category's database is simply a text-file that consist of the category's title and entries. New templates were added for the category pages and the category links. Each category's index page created, includes all the entries in that category. From the command line, multiple categories can be addressed by separating each category's number by a comma. Naturally, I've started to explore batch processing for the delete functions as well, and next I might even consider it for the editing functions.

I'm still open to the discussion of category support. In fact I'd love to hear anyone's thoughts over my implementation at the mailing list.

Posted by n1xt3r | Permanent link | File under: developer-notes | Comments: (0)


Comments are closed

If you really, really want to comment, please mail