Latest Subject on Main Page 1.0 This mod adds the last post subject of the forum in the last post column of the board index. MADD Hatter SP1 By Ken Ault http://www.ghostcdr.com/cgi-bin/forum/YaBB.cgi Sources/BoardIndex.pl chomp $curboardmods; fclose(FILE); ## LAST SUBJECT MOD ## if (-e "$boardsdir/$curboard.lastsub") { fopen(FILE, "$boardsdir/$curboard.lastsub"); $subjectmain = ; chomp $subjecthat2; $subicon = ; chomp $icon3; $threadurl = ; chomp $threadurl; fclose(FILE); } else { $subjectmain = 'N/A'; $subicon = 'xx'; $threadurl = ""; } $subjectmain{curboard} = $subjectmain || 'N/A'; if (length($subjectmain{curboard}) > 25) { $subjectmain{curboard} = substr($subjectmain{curboard}, 0, 25); $subjectmain{curboard} .= ' ...'; } $subjecthtml = qq~$subjectmain{curboard}~; $iconhtml = qq~ ~; ## END LAST SUBJECT MOD ## $lastposttime{$curboard}
$txt{'525'} $lastposter
$iconhtml$subjecthtml
$lastposttime{$curboard}
$txt{'525'} $lastposter
Sources/ModifyMessage.pl $newlastposttime = $mdate; unlink("$boardsdir/$currentboard.lastsub"); &Sticky_remove($tnum); if( $threadnum == 0 ) { unlink("$boardsdir/$currentboard.lastsub"); Sources/RemoveThread.pl $messagecount -= $tmpb; if( $yyThreadPosition == 0 ) { unlink("$boardsdir/$currentboard.lastsub"); Sources/Post.pl fopen(FILE, "+>$boardsdir/$currentboard.poster"); print FILE $name; fclose(FILE); fopen(FILE, "+>$boardsdir/$currentboard.lastsub"); print FILE qq~$FORM{'subject'}\n$FORM{'icon'}\n&action=display&num=$thread~; fclose(FILE);