summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-15 17:28:38 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-15 17:28:38 +0800
commit9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749 (patch)
treef2df77e9a1d4f20170d3c504616af04d1031862c
parentaeb899e370f5fef1eddb35e6860ccebfc79f1ba1 (diff)
downloadpttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.tar
pttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.tar.gz
pttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.tar.bz2
pttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.tar.lz
pttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.tar.xz
pttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.tar.zst
pttbbs-9cffa0dd2fd15f104bbd3abbfdb1fe6497f51749.zip
OLDRECOMMEND
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2066 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c16
-rw-r--r--sample/pttbbs.conf3
2 files changed, 18 insertions, 1 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index f0acc4ec..ad38e206 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1521,7 +1521,13 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
}
setdirpath(path, direct, fhdr->filename);
- type = vmsg_lines(b_lines-2, "您要對這篇文章 1.推薦 2.噓聲 [1]?") - '1';
+ type = (
+#ifdef OLDRECOMMEND
+ '1'
+#else
+ vmsg_lines(b_lines-2, "您要對這篇文章 1.推薦 2.噓聲 [1]?")
+#endif
+ ) - '1';
if (fhdr->recommend == 0 && strcmp(cuser.userid, fhdr->owner) == 0){
mouts(b_lines-1, 0, "本人推薦或噓第一次, 改以 → 加註方式");
@@ -1539,6 +1545,13 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
path == NULL || getans("確定要\033[%s\033[m嗎? 請仔細考慮(Y/N)?[n]", ctype[type])!='y')
return FULLUPDATE;
+#ifdef OLDRECOMMEND
+ snprintf(buf, sizeof(buf),
+ "\033[1;31m→ \033[33m%s\033[m\033[33m:%s\033[m%*s推%15s %02d/%02d\n",
+ cuser.userid, path,
+ 51 - strlen(cuser.userid) - strlen(path), " ", fromhost,
+ ptime->tm_mon + 1, ptime->tm_mday);
+#else
snprintf(buf, sizeof(buf),
"\033[1;%s \033[33m%s\033[m\033[33m:%s\033[m%*s%15s %02d/%02d\n",
ctype[type],
@@ -1548,6 +1561,7 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
" ",
fromhost,
ptime->tm_mon + 1, ptime->tm_mday);
+#endif
do_add_recommend(direct, fhdr, ent, buf, type);
#ifdef ASSESS
/* 每 10 次推文 加一次 goodpost */
diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf
index 91773abb..8cb5d27f 100644
--- a/sample/pttbbs.conf
+++ b/sample/pttbbs.conf
@@ -151,6 +151,9 @@
/* 開啟小天使小主人功能 */
//#define PLAY_ANGEL
+/* 若訂義, 則使用舊式推文 */
+#define OLDRECOMMEND
+
/* 前進站畫面 */
#define INSCREEN \
"前進站畫面 (請至 pttbbs.conf 修改您的前進站畫面)"