- 主题:想添加一个功能,新帖子都转到某个版面,方便扫版
在 src/bbs.c的post_article()最后添加了一个
post_file(currentuser,"",filepath,"Newposts",buf,0,0);
未果。。。
大家出出主意吧 :)
--
FROM 211.151.89.*
函数原型是:
int post_file(struct userec *user, char *fromboard, char *filename, char *nboard, char *posttitle, int Anony, int mode, session_t* session)
所以调用的时候你少了最后一个参数getSession()
(我这里看的是smth1.2, 刚看了, KBS也有最后一个参数的)
【 在 NewBiee (aa) 的大作中提到: 】
: 在 src/bbs.c的post_article()最后添加了一个
: post_file(currentuser,"",filepath,"Newposts",buf,0,0);
: 未果。。。
: ...................
--
FROM 159.226.37.*
而且 post_file 如果 mode == 0 的话貌似啥也发不出来,被英明神武的acore给咔嚓了。
【 在 jiangjun2000 (%d) 的大作中提到: 】
: 函数原型是:
: int post_file(struct userec *user, char *fromboard, char *filename, char *nboard, char *posttitle, int Anony, int mode, session_t* session)
: 所以调用的时候你少了最后一个参数getSession()
: ...................
--
FROM 221.219.3.*
mode == 0不是转载么?(我是比较老的了,当然)
post_cross
if (!mode) {
if (!strstr(title, "(转载)"))
sprintf(buf4, "%s (转载)", title);
else
strcpy(buf4, title);
} else
strcpy(buf4, title);
strncpy(save_title, buf4, STRLEN);
getcross
if (mode == 0){
if (in_mail == true)
fprintf(of, "\033[1;37m【 以下文字转载自 \033[32m%s \033[37m的信箱 】\033[m\n", user->userid);
else
fprintf(of, "【 以下文字转载自 %s 讨论区 】\n", board);
}
【 在 fancyrabbit (兔兔猫★Initial F★那些故去的如果的事) 的大作中提到: 】
: 而且 post_file 如果 mode == 0 的话貌似啥也发不出来,被英明神武的acore给咔嚓了。
--
修改:jiangjun2000 FROM 159.226.37.*
FROM 159.226.37.*
int post_file(struct userec *user, const char *fromboard, const char *filename, const char *nboard, const char *posttitle, int Anony, int mode, session_t* session)/* 将某文件 POST 在某版 */{
const struct boardheader *toboard;
if (mode == 0) {
return -1; // 对此有意见者找 atppp 单挑 20060425
}
....
【 在 jiangjun2000 (%d) 的大作中提到: 】
: mode == 0不是转载么?(我是比较老的了,当然)
: post_cross
: if (!mode) {
: ...................
--
FROM 221.219.3.*
有意见...但是不敢单挑...
【 在 fancyrabbit (兔兔猫★Initial F★那些故去的如果的事) 的大作中提到: 】
: int post_file(struct userec *user, const char *fromboard, const char *filename, const char *nboard, const char *posttitle, int Anony, int mode, session_t* session)/* 将某文件 POST 在某版 */{
: const struct boardheader *toboard;
: if (mode == 0) {
: ...................
--
FROM 159.226.37.*
那你可以直接调用 post_cross 嘛
【 在 jiangjun2000 (%d) 的大作中提到: 】
: 有意见...但是不敢单挑...
--
FROM 221.219.3.*
没关系, 呵呵, 说说而已, 我们的代码比较老, 跟不上时代
【 在 fancyrabbit (兔兔猫★Initial F★那些故去的如果的事) 的大作中提到: 】
: 那你可以直接调用 post_cross 嘛
--
FROM 159.226.37.*
那就自己把代码改掉...
【 在 jiangjun2000 (%d) 的大作中提到: 】
: 有意见...但是不敢单挑...
--
FROM 59.66.172.*
那就群殴吧
【 在 jiangjun2000@newsmth.net-SPAM.no (%d) 的大作中提到: 】
: 有意见...但是不敢单挑...
--
FROM 58.41.94.*