WWWBoard Archiver add-on, John Breslin, 27 April, 1998: This is a routine that periodically archives messages. When the message number is a multiple of say 100, the first 100 messages are kept in the main WWWBoard index and the following messages are moved to an archived copy of the index, saved with the date in its name for uniqueness. Step 1: Add new variables. The first is the maximum number of messages you would like to have in the first index page (e.g., 100), the second variable is where you would like the link to the archive to be placed in your index page (e.g., after the line containing ""). $archive_after = 100; $archive_trigger = ""; Step 2: Add the following call to the archive_messages subroutine AFTER the call to &increment_num. # Archive Messages Every "archive_after" Times if ($num%$archive_after == 0) { &archive_messages; } Step 3: Add the archive_messages subroutine. ##################### # archive_messages # John Breslin # 27 April, 1998 sub archive_messages { if ($month < 10) { $month = "0$month"; } open(ORIGMAIN,"$basedir/$mesgfile") || die $!; @main = ; close(ORIGMAIN); open(ARCHMAIN,">$basedir/$mday$month-$hour$min\.$ext") || die $!; print ARCHMAIN @main; close(ARCHMAIN); foreach $main_line (@main) { if ($main_line =~ //) { $messages_counter = 0; } if ($main_line =~ //) { $message_number = $1; $messages_counter++; if ($messages_counter > $archive_after) { push (@ALL, $message_number); } } } foreach $all (@ALL) { undef($top); undef($bottom); foreach ($j = 0;$j <= @main;$j++) { if ($main[$j] =~ //) { $top = $j; } elsif ($main[$j] =~ //) { $bottom = $j; } } if ($top && $bottom) { $diff = ($bottom - $top); $diff++; splice(@main, $top, $diff); } } open(NEWMAIN,">$basedir/$mesgfile"); foreach $main_line (@main) { print NEWMAIN "$main_line"; if ($main_line =~ $archive_trigger) { print NEWMAIN ""; print NEWMAIN "$mday$month-$hour$min<\/A> |\n"; } } close(NEWMAIN); } Step 4: Add the line containing the archive_trigger (e.g., in our case we have the text "") in your main WWWBoard index page. Step 5: Make sure the $basedir directory is writeable as the archived indexes are saved here.