Seems to me that the only reason you're storing items in a multi-level structure is so you can access posts by timestamp. This doesn't make a whole lot of sense. Use DBI and mySQL and a simple table format, and you may want to install one of the popular forums (phpBB, for instance) as well so you can get some ideas for how to arrange your tables and fields. The way you're currently doing things is a bit of a kludge.
And to be honest, you're probably better off using existing forum software that's been fairly well optimized and bug checked, rather than spending months developing your own. I've been that route, and it isn't pretty.