Tetra WebBBS Documentation
Description
A standalone tool that allows you to delete threads or move them to an archive.
You can set the tool script to delete/move threads when they reach a certain age or when the number of messages exceeds a defined maximum count. The tool can be set to run a number of such commands at a time. For example, you can set it to move older threads from your active forum to an archive, and then delete even older threads from the archive.
The main difference between the old webbbs_archive.pl for WebBBS 5.1x and this new tool for Tetra-WebBBS 5.2+:
- The old tool deletes/moves messages, whereas the new tool deletes/moves threads.
- The old tool moves uploaded images but doesn't adjust the image URL of the archived messages. So, image links of archived messages will be broken. The new tool doesn't move uploaded images so the problem of broken image links in archived messages doesn't arise.
To us, the old archive script is obsolete.
To install and run this tool
- Edit bulkarchive.pl and define the variables (for their descriptions, see Configuration section below.)
- Upload bulkarchive.pl to your webspace (eg, to the folder where your _config.pl files reside.)
- Chmod bulkarchive.pl to 755.
- You can run bulkarchive.pl
(1) via cron (for scheduled deletion/archive processes.)
(2) via commandline (for manually deleting/archiving messages from very busy boards.)
(3) by pointing your browser to bulkarchive.pl (for manual deletion/archive processes.)
Before running your (scheduled) deletion/archive processes for real, you may run bulkarchive.pl in preview mode to confirm your paths and settings. This can be done by appending ?debug to the URL. Eg:
http://yoursite.com/cgi-bin/bbs522/bulkarchive.pl?debug
Configuration
$data_basedir
Location of your bbs data base-directory.
For example, $data_basedir = "/path/to/data_basedir";
$data_subdir
The subdir of the SOURCE forum from which you want messages deleted/moved.
(That is, the subdir as defined in the _config.pl file of your active forum.)
For example, $data_subdir = "/main";
$archive_subdir
The subdir of the DESTINATION forum to which you want messages to be moved.
(That is, the archive_subdir as defined in the admin_config.pl of your active forum.)
For example, $archive_subdir = "/archive";
NOTE: If $archive_subdir is NOT set, messages will be deleted from the SOURCE forum.
$boardname
The name of the forum being archived.
(That is, the boardname as defined in the _config.pl of your active forum.)
$html_basedir
Optional. Don't touch unless you know what you're doing!
$live_subdir
Optional. Needed only if you use this tool for deleting messages from archives AND image upload is enabled on the live forum.
$Max_Days:
The maximum age (in days) allowed for threads to remain on the forum. For example, $Max_Days = 180; ..will delete/move those threads that are older than 180 days.
If you prefer specifying a cutoff date for deleting/moving threads, set $Max_Days = 0; and define $day, $mon and $year (see below.)
$day, $mon, $year
A specified cutoff date for deleting/moving threads from your forum.
- $days valid range: 1..31
- $mon valid range: 1..12, where 1=Jan.. 12=Dec
- $year valid value: a 4-digit year number
For example, $day = 1; $mon = 1; $year = 2004; ..will delete/move all threads that were posted before 2004-1-1 (IF $Max_Days is set to 0.)
$refering
Defines whether your cutoff date should refer to:
the parent message of each thread ($refering = "p";) or
the most recent response of each thread ($refering = "r";)
$maxmove
If your server is limited in CPU-usage or script-runtime, you may define the number of MESSAGES to be moved at one call of the script.
If your server is not so limited, set $maxmove = 0;
$Max_Messages
The number of MESSAGES allowed to remain on your active forum, even if they are older than your defined cutoff date. This is useful for low traffic boards.
If you don't need to keep a minimum of messages on your active forum, set $Max_Messages = 0;
Note
For Tetra-WebBBS 5.22 and newer versions only.
| Version History | ||
| 3.00 | 2008-11-13 | Version for Tetra-WebBBS 6.00 or TetraBB PRO 0.20 or newer versions - file locking changed |
| 2.00 | 2008-03- | Added support for PRO databases |
| 1.00 | 2007-11-12 | First public release for Tetra-WebBBS 5.22 |

![[+]](/i/toc_collapsed.gif)
![[-]](/i/toc_expanded.gif)
WebScripts










