summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-29 21:42:47 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-29 21:42:47 +0800
commit13c558b9e8fd5b10298f3a4afba54ac7111e8519 (patch)
treed646693109599ff424d6a93c8b60d4db7ba6f143 /mbbsd
parent6dfdfa5f38690608af3c892f231d98c6bc6df2d4 (diff)
downloadpttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.tar
pttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.tar.gz
pttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.tar.bz2
pttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.tar.lz
pttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.tar.xz
pttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.tar.zst
pttbbs-13c558b9e8fd5b10298f3a4afba54ac7111e8519.zip
quickly create blogscw.brc2@1625
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1625 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/announce.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c
index 9af9e135..3bb1aad5 100644
--- a/mbbsd/announce.c
+++ b/mbbsd/announce.c
@@ -1115,8 +1115,10 @@ void BlogMain(int num)
"4.刪除迴響\n"
"\n"
"5.刪除一篇部落格\n"
+ "\n"
+ "C.建立部落格目錄 (您只有第一次時需要)\n"
);
- switch( getans("請選擇(0-5)?[0]") ){
+ switch( getans("請選擇(0-5,C)?[0]") ){
case '1':
snprintf(genbuf, sizeof(genbuf),
"bin/builddb.pl -c %s", currboard);
@@ -1172,7 +1174,7 @@ void BlogMain(int num)
}
}
break;
-
+
case '5': {
char date[9];
getdata(16, 0, "請輸入該篇的日期(yyyymmdd): ",
@@ -1181,6 +1183,27 @@ void BlogMain(int num)
"bin/builddb.pl -D %s %s", date, currboard);
system(genbuf);
}
+ break;
+
+ case 'C': case 'c': {
+ fileheader_t item;
+ char fpath[PATHLEN], adir[PATHLEN], buf[256];
+ sprintf(fpath, "man/boards/%c/%s", currboard[0], currboard);
+ stampdir(fpath, &item);
+ strlcpy(item.title, "◆ Blog", sizeof(item.title));
+ strlcpy(item.owner, cuser.userid, sizeof(item.owner));
+
+ sprintf(adir, "man/boards/%c/%s/.DIR", currboard[0], currboard);
+ append_record(adir, &item, FHSZ);
+
+ snprintf(buf, sizeof(buf),
+ "cp -R etc/Blog.Default/.DIR etc/Blog.Default/* %s/",
+ fpath);
+ system(buf);
+
+ more("etc/README.BLOG", YEA);
+ }
+ break;
default:
exit = 1;