「sub put_macro」の「if( $hd =~…」というのがたくさん並んでるところに以下をまぎれこませる。 「if( $hd =~ /%Category%/ ){」の行の上あたりにでも if( $hd =~ /%RecentComment%/ ){ #見出しと表示件数 $RComment="最近のコメント"; $RCcnt=10; ($hd1, $hd2)=split(/%RecentComment%/, $hd); if(open(RCOM, "<$vDir/recent.cmnt")){ binmode(RCOM); @recentc = ; close RCOM; } $cal="
$RComment
"; $cal.="
"; for($i=0; $i<$RCcnt; $i++){ $recentc[$i]=~s/(\d\d\d\d\/)(\d\d\/\d\d)( \d\d:\d\d)/$2/; $cal.= $recentc[$i]; } $cal.="
"; $hd="$hd1$cal$hd2"; } --------------------- 最近のコメント一覧のファイルを作るサブルーチンを作る。 「sub NickyInputComment{」の行の上にでも以下を入れる。 sub NickyRecentComment{ my($pt,$recom,$i,$cnt,@recentc); $pt="$year$month$day$daysub"; ($cdate) = @_ ; &MakeNickyFname(); &GetNickyFile($NickyFname); if(open(RCOM, "<$vDir/recent.cmnt")){ binmode(RCOM); @recentc = ; close RCOM; } $recom= "${Title}(${cdate})$br\n"; unshift @recentc, $recom ; if(open (RCOM, ">$vDir/recent.cmnt")){ binmode(RCOM); $cnt=30; for($i=0; $i<$cnt; $i++){ print RCOM $recentc[$i]; } close RCOM; } } ------------------------------ 個別記事表示にしてる場合は↑の「$recom= "${Title}(${cdate})$br\n"; にする。 ------------------------------ 「sub NickyInputComment」の「&SendMailRcvNotice(0);」の行の上に、 &NickyRecentComment($cdate); と入れる。