いたストDS 待ち合わせ場所こっちのサイトにはBBSを2つ設置してます。
Web Patioのアンチスパムバージョンを使わせていただいてるのですが、BBSが2つになったために新着記事が埋もれてしまいがちです。
トップページに新着記事の表示をしたいなーと思って、調べていたらKentWebさんのサポートコーナで改造方法発見!
スパム対策掲示板配布サイトのBALさんが回答してくださってます。
BALさん、ありがとうございました。
以下、おぼえがきメモ
全ての掲示板から新着10件を表示させる方法。
以下の追加を全ての掲示板のregist.cgiに対して行う(青字部分を追加)。
#!/usr/local/bin/perl#┌─────────────────────────────────
#│ [ WebPatio ]
#│ regist.cgi - 2006/11/11
#│ Copyright (c) KentWeb
#│ webmaster@kent-web.com
#│ http://www.kent-web.com/
#└─────────────────────────────────# 外部ファイル取り込み
require './init.cgi';
require $jcode;$logfile = '../patio_newlog.cgi'; ##
$max = 10; ##
#-------------------------------------------------
# 記事投稿処理
#-------------------------------------------------
--途中省略--
# スレッド更新
open(OUT,">$logdir/$new.cgi") || &error("Write Error: $new.cgi");
print OUT "$new<>$i_sub<>0<>1<>\n";
print OUT "0<>$in{'sub'}<>$i_nam2<>$in{'email'}<>$i_com<>$date<>$host<>$pwd<>$in{'url'}<>$in{'mvw'}<>$my_id<>$time<>$ex{1},$w{1},$h{1}<>$ex{2},$w{2},$h{2}<>$ex{3},$w{3},$h{3}<>\n";
close(OUT);# 参照ファイル生成
open(NO,">$logdir/$new.dat") || &error("Write Error: $new.dat");
print NO "0:";
close(NO);# パーミッション変更
chmod(0666, "$logdir/$new.cgi");
chmod(0666, "$logdir/$new.dat");open(DAT,"+< $logfile") || &error("Open Error: $logfile") if (-e $logfile);
eval 'flock(DAT, 2);';
@data =;
while ($max <= @data) { pop(@data); }
unshift(@data,"0<>$in{'sub'}<>$i_nam2<>$in{'email'}<>$i_com<>$date<>$host<>$pwd<>$in{'url'}<>$in{'mvw'}<>$title\n");
seek(DAT, 0, 0);
print DAT @data;
truncate(DAT, tell(DAT));
close(DAT);&sendmail if ($mailing);
--途中省略--
unshift(@new,"$no2<>$host<>$time<>\n");
seek(DAT, 0, 0);
print DAT @new;
truncate(DAT, tell(DAT));
close(DAT);
}
open(DAT,"+< $logfile") || &error("Open Error: $logfile") if (-e $logfile);
eval 'flock(DAT, 2);';
@data =;
while ($max <= @data) { pop(@data); }
unshift(@data,"$newno<>$in{'sub'}<>$i_nam2<>$in{'email'}<>$i_com<>$date<>$host<>$pwd<>$in{'url'}<>$in{'mvw'}<>$title<>\n");
seek(DAT, 0, 0);
print DAT @data;
truncate(DAT, tell(DAT));
close(DAT);
# メール送信
&sendmail if ($mailing == 2);
以下read2.cgiというファイル名にして掲示板のどれか一つにpatio.cgiと同じ階層にアップ。
#!/usr/local/bin/perl# 外部ファイル取り込み
require './init.cgi';
require $jcode;
$logfile = '../patio_newlog.cgi';&view2;
#-------------------------------------------------
# 個別記事閲覧
#-------------------------------------------------
sub view2 {
# スマイルアイコン定義
if ($smile) {
@s1 = split(/\s+/, $smile1);
@s2 = split(/\s+/, $smile2);
}# 汚染チェック
$in{'f'} =~ s/\D//g;&header($sub);
print <<"EOM";
<div align="center">
<Table cellspacing="0" cellpadding="0" width="95%">
<Tr><Td bgcolor="$col1">
<table cellspacing="1" cellpadding="5" width="100%">
EOMopen(IN,"$logfile");
while (<IN>) {
local($no,$sub,$nam,$eml,$com,$dat,$ho,$pw,$url,$mvw,$title) = split(/<>/);# 記事表示
print "<tr bgcolor=\"$col1\"><td bgcolor=\"$col3\" width=\"100%\">";
print "<img src=\"$imgurl/file.gif\"> <b><font color=red>$title</font> $sub</b> ";
print "<span class=num>( No.$no )</span></td></tr>\n";
print "<tr bgcolor=\"$col1\"><td bgcolor=\"$col2\">";
print "<dl><dt>日時: $dat<dt>名前: <b>$nam</b>";if ($eml && $mvw ne '0') {
print " <<a href=\"mailto:$eml\" class=\"num\">$eml</a>>\n";
}
if ($url) {
print "<dt>参照: <a href=\"$url\" target=\"_blank\">$url</a>\n";
}
$com = &auto_link($com, $in{'f'});
print "<br><br><dd>$com</dl><br></td></tr>\n";
}
close(IN);print <<"EOM";
</table></Td></Tr></Table>
</div>
</body>
</html>
EOM
exit;
}#-------------------------------------------------
# リンク処理
#-------------------------------------------------
sub auto_link {
local($msg, $f) = @_;$msg =~ s/([^=^\"]|^)(http\:[\w\.\~\-\/\?\&\+\=\:\@\%\;\#\%]+)/$1<a href=\"$2\" target=\"_target\">$2<\/a>/g;
$msg =~ s/>>(\d)([\d\-]*)/<a href=\"$readcgi?mode=view2&f=$f&no=$1$2\" target=\"_blank\">>>$1$2<\/a>/gi;# スマイル画像変換
if ($smile) {
local($tmp);
foreach (0 .. $#s1) {
$tmp = $s2[$_];
$tmp =~ s/([\+\*\.\?\^\$\[\-\]\|\(\)\\])/\\$1/g;
$msg =~ s/$tmp/ <img src=\"$imgurl\/$s1[$_]\">/g;
}
}
$msg;}
新着記事一覧はread2.cgiをアップした掲示板のアドレスをhttp://****/***/read2.cgiにして呼び出す。
patio.cgiの一つ上の階層にpatio_newlog.cgiという名前の空のファイルをアップ。
MTのメインページにインラインフレームで呼び出すときのスクロールバーを変更したいので、read2.cgiのヘッダー部分にスタイル設定。
これでキレイに表示されました

こっちにコメントすいません
旦那がメール記録を消してしまって暗証番号
分からなくなってしまいました
ヘルプから入ってみたんですがうまくつながら
ないんですよね・・・メールアドレスが違いますって・・
新規で繋げようとしたら駄目だったので・・・
すいません
さなえさん、こんにちは
登録アドレスのほうにメール送っときました~
仮パスワードを発行したので、それでログイン後に
パスワード変更してくださいね♪
This website is very nice and colorful too. Its nice to have something to show others where you attend church and to show all the smiling people filled of the goodness of the Lord. You have a wonderful website here. May God rich bless you always./
Posted by: Rosina : 2008,06,09 : 14:16Thanks so very much for taking your time to create this very useful and informative site. I have learned a lot from your site. Thanks!!g
Posted by: Ron : 2008,07,06 : 03:16Cool guestbook, interesting information... Keep it UP. excellent site i really like your stuff.<
Posted by: Robert : 2008,07,11 : 04:27