New Thread Notification
1.0
This mod makes YaBB to send a mail to the webmaster if a new thread is started. It is optional for each board
Email: ptpth@peter88.cjb.net
PtPtH
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]";
$descr="$boardinfo[1]";
undef $mailnewthreadc;
$mailnewthread="$boardinfo[6]";
if (!$mailnewthread) { $mailnewthread = 0; }
if ($mailnewthread == 1) {$mailnewthreadc = "checked"; }