New Thread Notification
2.0 (SP1)
This mod makes YaBB to send a mail to the webmaster if a new thread is started. It is optional for each board
*******************************************
Original by : PtPtH - Email: ptpth@peter88.cjb.net
Update to SP1 by Sonic
*******************************************
Sonic (fixed by DummyProof)
www.scotsonphones.co.uk/YaBB
Sources/Post.pl
if($newthreadid) {
# This is a new thread. Save it.
fopen(FILE, "$boardsdir/$currentboard.dat") || &fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.dat");
@mailcheck = ;
fclose(FILE);
chomp($mailcheck[6]);
if($mailcheck[6] eq "1") {
# Mail webmaster about new post
$mailsub = "A new thread has been started, $subject. On board: $mailcheck[0] It's located here:\n $cgi;action=display;num=$newthreadid";
$board = $INFO{'board'};
&sendmail( $webmaster_email, "$board. New Thread: $subject", $mailsub);
}
Sources/ManageBoards.pl
fopen(BOARD, "$boardsdir/$curboard.dat");
@boardinfo = ;
fclose(BOARD);
$curboardname = $boardinfo[0];
chomp $curboardname;
$descr = $boardinfo[1];
undef $mailnewthreadc;
$mailnewthread="$boardinfo[6]";
if (!$mailnewthread) { $mailnewthread = 0; }
if ($mailnewthread == 1) {$mailnewthreadc = "checked"; }