Flat-File Forum Datasheet 01 June 2004 * Overview The flat-file forum is a script written in Perl as a CGI (common gateway interface) accessible from websites. It was written to provide an alternative for database-driven forums. The purpose of writing the program was not for speed, or even a real-life alternative. On the contrary, it was created purely as an educational lesson, and perhaps provide a practical system for small hierarchical-based messaging services. * Data Source The syntax and flow of the data source files (referenced herein as "tables") is flexible enough to allow for multiple forums and unlimited recursion of message replies. The format gives storage for a message title, body, author name, message ID, and reply-to ID. For more information, see the Source Format heading. Source Format The format of the tables are stored in an ASCII file as follows: Type Header The type header is a three-letter ([A-Z]{3}) identifier that distinguishes the following header to be a Message or a Table. Tables begin with "TBL", messages begin with "MSG". Post ID The PostID of a given item is it's identifier in the application. ID's are generated automatically and are increment per-post, regardless of nesting. Each table has it's own enumeration set, so numbering starts at zero for each table. PostID's are three consecutive numbers in the format (\d{3}). Reply ID The Reply ID for an item is the "parent" of the message. That is, if the post is a child node (is a reply to another post) then the Reply ID is the PostID of the post that is being replied to. Parent topics (root messages) have no Reply ID, so this field is set to 000. Author This is a fixed-width field, restricted to 16 ASCII characters. If the author length is longer than 16 characters, the name is truncated; otherwise the string is right-padded with spaces. This field holds the name of the person who wrote the post. Title This field contains the title of the post. By default the title of a reply post will be "Re: " followed by the original (parent) message's title, unless explicitly set otherwise. The title is scanned and all HTML entities are converted to their representation in HTML. Message The message field holds the actual body of the post. The message and title fields are separated by one double-quote (quotation mark) character (All quotation marks are changed to their HTML entity in the Title to avoid parsing errors). The message is scanned and all HTML entities are converted to their representation in HTML. Every message ends with and ampersand (&) to signify the end of that record. Table Layout: The format for table records is as follows: TBL000Table 1"Table desc& And for messages: MSG001000James Message Title"Body of Message& * Pros The format of the forum files are designed so that... - Multiple tables can be stored in one file - A database is not necessary - Number-based systems allows for easy expansion * Cons Some problems also exist: - Execution time can be slow for large tables - Readability of tables is not clear Developers If you would like to help develop the Flat-File Forum, please read and understand the following requirements and other helpful information: Requirements Aid in code development is needed! Should you create a bug fix, or add onto the code or make any changes to the source, please contribute! I will add all beneficial changes into the distribution of the script. If you would like to contribute to the project in other ways, we would also greatly appreciate ideas, donations, a nice postcard from your part of the world, or other forms of support. If you'd like to e-mail me about an idea or otherwise, please do so! I like hearing from you. If you do message me, please write in English only. If you would like to contribute ideas that are specific to the system, a prerequisite is an understanding of the current workings of the system implemented. My contact information is available at the bottom of this document. What needs to be done? While development of Flat-File Forum is constantly in progress, there are always things that are not complete. For a comprehensive list of the unfinished features, please locate the TODO file in the root directory of the FFF project, or find the TODO section of the FFF website. Contact Information E-mail: Programmer_Zero@hotmail.com AIM: Bizkitofkorn21k Address: James Brannan 1118 South Charlemagne Drive Lake Saint Louis, MO 63367 1 Forum