荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: dgwang.bbs@bbs.qxntc.edu.cn (DG大哥), 信区: InstallBBS
标 题: Re: ytht代码添加 dinger 的模板发文
发信站: 笔山书院_BBS (Thu Oct 21 00:52:12 2004)
转信站: SZU!news.szu.edu.cn!news.uestc.edu.cn!QXNTC
nju09下改回dinger的本意,在原有的patch下在patch如下内容:
re>RCS file: /home/cvs/bbs/nju09/bbssnd.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- bbs/nju09/bbssnd.c 2004/10/12 05:26:55 1.1
+++ bbs/nju09/bbssnd.c 2004/10/20 16:45:48 1.2
@@ -22,7 +22,7 @@
{
char filename[80], filename2[80], dir[80], board[80], title[80],
buf[256], *content,
*ref;
- int r, i, sig, mark = 0, outgoing, anony, guestre = 0, usemath, use_ubb;
+ int r, i, sig, mark = 0, outgoing, anony, guestre = 0, usemath, use_ubb,
use_tmpl;
int is1984, to1984 = 0;
struct boardmem *brd;
struct fileheader *x = NULL;
@@ -37,6 +37,7 @@
anony = strlen(getparm("anony"));
usemath = strlen(getparm("usemath"));
use_ubb = strlen(getparm("useubb"));
+ use_tmpl = strlen(getparm("tmpl"));
brd = getboard(board);
if (brd == 0)
http_fatal("错误的讨论区名称");
@@ -109,6 +110,8 @@
sprintf(filename2, "bbstmpfs/tmp/%d.tmp2", thispid);
if (use_ubb)
ubb2ansi(content, filename2);
+ else if (use_tmpl)
+ sprintf(filename2, "bbstmpfs/tmp/tmplpst.%s.www", currentuser->
userid);
else
f_write(filename2, content);
if (!hideboard_x(brd)) {
re>
re>RCS file: /home/cvs/bbs/nju09/bbspsttmpl.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bbs/nju09/bbspsttmpl.c 2004/10/19 14:50:16 1.3
+++ bbs/nju09/bbspsttmpl.c 2004/10/20 16:45:48 1.4
@@ -216,19 +216,18 @@
strcpy(titlebuf, "没有标题");
titlebuf[49] = 0;
printf("<center>%s </center><hr>", titlebuf);
- printf("<form name=form1 method=post action=bbssnd?B=%d&th=-1>",
- getbnumx(x));
- printf("<input type=hidden name=title size=40 maxlength=100 value='%s '>
", titlebuf);
- printf("<input type=hidden name=tmpl value=1>");
- printf("<textarea onkeydown='if(event.keyCode==87 && event.ctrlKey)
{document.form1.submit(); return false;}' onkeypress='if(event.keyCode==10)
return document.form1.submit()' name=text rows=20 cols=76 wrap=virtual class=f2>
");
if((fout = fopen(psttmpfn, "r")) != NULL)
{
while(fgets(buf, sizeof(buf), fout))
- printf("%s", buf);
+ fhhprintf(stdout, "%s", buf);
fclose(fout);
}
-
- printf("</textarea><br><input type=submit value=发表
onclick=\"this.value='文章提交中,请稍候...';"
+ printf("<hr>");
+ printf("<form name=form1 method=post action=bbssnd?board=%s&th=-1>",
+ x->header.filename);
+ printf("<input type=hidden name=title size=40 maxlength=100 value='%s '>
", titlebuf);
+ printf("<input type=hidden name=tmpl value=1>");
+ printf("<input type=submit value=发表 onclick=\"this.value='文章提交中,
请稍候...';"
"this.disabled=true;form1.submit();\"></form>");
for(i = 0; i < bn.question_num; i ++)
free(alist[i]);re>
【 在 dgwang 的大作中提到: 】
: 把dinger的模板发文添加到ytht的代码中,我把src,libythtbbs,nju下的diff都贴
出来,直接patch就应该可以使用了,对dinger的程序里添加了这个函数check_posttmpl,
对bbspsttmpl.c做了一点点的修改。把dinger的 .h 文件的内容加到article.h中了。
: 在安装的过程中,得到了 dinger、wekey等高手的帮助和指导,在此一并致谢。希
望能对使用ytht代码的站
: (以下引言省略...)
这里本来有一个附件 newnju.diff
但是目前CN BBS转信系统不转带有较大附件的信件,所以 QXNTC BBS 去掉了.
--
※ 来源:.笔山书院 BBS http://bbs.qxntc.edu.cn [FROM: 218.194.254.*]
附件访问地址:http://bbs.qxntc.edu.cn/qxntc/con?B=BBSDev&F=M.1098291132.A
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店