announcement_mod.mod 1.1 Let's you set a board as an "Announcement Board" where everyone can read posts, but only the Admin and Moderators can post/reply to topics. Boards can be set to announcement mode in the admin center under Forum Controls - Edit Boards. This feature may be enabled/disabled at any time for a board through the admin center. 1.1: Fixed error where all boards below announcement boards were also made into announcement boards. DaveB http://www.davesworldzone.com Sources/Post.pl $notification = ! $enable_notification || $username eq 'Guest' ? '' : <<"EOT"; ############################## ## DaveB's Announcement Mod ## ############################## fopen(FILE, "$boardsdir/$currentboard.dat") || &fatal_error("300 $txt{'106'}: $txt{'23'} $currentboard.dat"); @announce = ; fclose(FILE); chomp($announce[3]); if ($announce[3] == 1) { if ($settings[7] ne 'Administrator' && $username ne $moderators{$username}) { &fatal_error("Sorry, this is an announcement board. Posting is reserved for Administrators and Moderators only."); } } ############################## ## /End of Announcement Mod ## ############################## Sources/ManageBoards.pl $descr="$boardinfo[1]"; undef $annchecked; $annset="$boardinfo[3]"; if (!$annset) { $annset = 0; } if ($annset == 1) {$annchecked = ' checked'; }
Check to make this board an announcement board

Check to make this board an announcement board
if($FORM{'moda'} eq "$txt{'17'}") { if (!$FORM{'annset'}) { $FORM{'annset'} == 0; } print FILE "$FORM{'moderator'}\n"; print FILE "$FORM{'annset'}"; $id="$FORM{'id'}"; if (!$FORM{'annset'}) { $FORM{'annset'} == 0; } print FILE "$FORM{'moderator'}|\n"; print FILE "$FORM{'annset'}\n";