Recycle Bin SP1/1.1/1.2/1.3 1.0 This mod adds a "Recycle Bin" to your forum Any thread deleted using the "Remove Topic" admin/moderator function will be copied to a temporary board and locked. There is no "moved to..." notice created, so all this is done without the moderator knowing! To Install: If you DO NOT have the file attachments mod installed, ignore or remove the last step. Apply the mod file as normal, and upload the modified file to your YaBB Sources directory. Then create a board with the id "Recycle_Bin" to send the deleted threads to (see note 3 below). Note 1: If the Recycle_Bin board cannot be found (or hasn't been created), removed threads will still be deleted! Note 2: Threads removed from the recycle bin will still be deleted! Note 3: Only Administrators should have access to the Recycle Bin, so you may want to try the following: 1...If you have Add-More-Membergroups, skip ahead to step 4! 2...Go to the Admin Area and click on "Edit Member Groups". 3...In the "Additional Member Groups" box, add "Administrator" on a single line, without the quotation marks. 4...Go back to the Admin Area and click on "Edit Catagories". 5...Create a new catagory, and in the box labelled "Only access for membergroup(s):", click on the "Administrator" membergroup so that it is the only thing highlighted. (To un-highlight a selection, hold down the Ctrl key and click on the highlighted option.) 6...Go back to the Admin Area and click on "Edit Boards". 7...Find the Catagory you just created, and add a board with the id "Recycle_Bin". 8...Administrators should now be the only users who can access this Board. This will not work with if you have certain versions of the Global Moderator mod installed, because this gives Global Moderators access to all boards regardless of the membergroup access setting. There are other mods you could try which restrict board access by adding password protection. BHRA Webmaster http://www.bhra.org.uk Sources/RemoveThread.pl if( $yyThreadPosition == 0 ) { my $Recycle_Bin = "Recycle_Bin"; # Change this to the board id of the board you want to move deleted threads to if (-e "$boardsdir/$Recycle_Bin.txt" && $currentboard ne $Recycle_Bin) { # Copy thread to Recycle Bin $newthreadid = time; $i=0; if (-e "$datadir/$newthreadid.txt") { while (-e "$datadir/$newthreadid$i.txt") { ++$i; } $newthreadid="$newthreadid$i"; } fopen(FILE, "$boardsdir/$Recycle_Bin.txt"); @Recycle_Bin_threads = ; fclose(FILE); chomp $threads[$yyThreadPosition]; @newthreadinfo = split(/\|/, $threads[$yyThreadPosition]); $newthreadinfo[0] = "$newthreadid"; $newthreadinfo[8] = "1"; $threads[$yyThreadPosition] = join("|", @newthreadinfo)."\n"; fopen(FILE, ">$boardsdir/$Recycle_Bin.txt", 1); print FILE qq~$threads[$yyThreadPosition]~; print FILE @Recycle_Bin_threads; fclose(FILE); opendir (MMD,$datadir); @files = readdir(MMD); closedir(MMD); foreach $files(@files) { if ($files =~ /\A$thread\.(.+)/ig) { fopen(FILE, "$datadir/$thread.$1"); @fileinfo = ; fclose(FILE); fopen(FILE, ">$datadir/$newthreadid.$1"); print FILE @fileinfo; fclose(FILE); } } my ($tmp_num, $tmp_threadcount, $tmp_messagecount, $tmp_lastposttime, $tmp_lastposter); ( $tmp_threadcount, $tmp_messagecount, $tmp_lastposttime, $tmp_lastposter ) = &BoardCountGet($Recycle_Bin); ++$tmp_threadcount; $tmp_messagecount += $tmpb; ($tmp_num, $dummy, $dummy, $dummy, $tmp_lastposttime) = split(/\|/, $threads[$yyThreadPosition]); fopen(FILE, "$datadir/$tmp_num.data"); $tmpa = ; fclose(FILE); ($dummy, $tmp_lastposter) = split(/\|/, $tmpa); &BoardCountSet( $Recycle_Bin, $tmp_threadcount, $tmp_messagecount, $tmp_lastposttime, $tmp_lastposter ); } # Delete old thread ### Only apply the following step if you have file attachments installed ### if($amthreadid ne $thread) { print AMV qq~$amthreadid|$amreplies|$amthreadsub|$amposter|$amcurrentboard|$amkb|$amdate|$amfn\n~; } elsif ($currentboard ne $Recycle_Bin) { print AMV qq~$newthreadid|$amreplies|$amthreadsub|$amposter|$Recycle_Bin|$amkb|$amdate|$amfn\n~;