What the Scoop archiving process should do is provide a way to take a load of the database server by moving the intro, body, and comments from old stories out of the database and into a flat file. However, it should also be done in such a way that dynamic boxes are still displayed, and comments can possibly still be posted.
My ideas on this are as follows:
First: the actual archiving process.
This should be run as a cron job that will search the database for any stories that are older than the cut-off time for archiving (set as a var, default three weeks). The job will go through these stories, slurp up their intros, bodies, and comments (which should be archived nested, I think), and write them to a file, which will be stored in the filesystem something like /usr/local/www/scoop/archive/2001/9/24/343453/23424/intro.html. Polls will be left alone. The job will then change the stories display status to "4", thus telling Scoop that the story has been archived. Finally, the intro, body, and comments are deleted from the database.
Second: displaying archived stories.
Stories.pm (and any other appropriate files) should have a conditional added to check if a story has been archived. If it has, instead of querying the db for the intro, body, and comments, it will slurp them out of the file (looking in the directory that looks like the story's sid) and put them into one giant |CONTENT|in the story. The rest of the page will use the standard story_template.
Third: posting comments and rearchiving
On the off chance that someone wants to post a comment to a story that's six months old, the "Post a Comment" link will remain. If somebody posts a comment to an archived story, the story will get put back in the database, the comment will get posted, and the story remains in the database until it's been inactive long enough for it to be archived again. To facilitate putting the comments back in, there should be markers placed in the comments file to help put everything back where it should be.
Other Stuff
There needs to be a var to set how often stories will be archived. Also, it should be possible for admins to either deny anyone permission to post in an old story, or restrict it to users with certain permissions. There is also a question about what should happen to 0 rated posts.
Any suggestions, ideas, thoughts on how the best way to integrate this into the codebase, or usability are more than welcome. If there is no way this would work with Scoop the way it's outlined, or anyone can think of a better way, please tell me that too. :-)
-jeremy, aka "Captain_Tenille"