作者allen501pc.bbs@bbs.sa.ncyu.edu.tw (靜養中..) 看板: itoc
標題Re: [問題]功能-文章編輯時無法加分
時間新綠園 (2007/02/26 Mon 00:13:41)
※ 引述《allen501pc (靜養中..)》之銘言:
> 我做了以下修改,但是就是不會出現我要的功能(文章正在被編輯時,加分會有警告)
> :include/hdr.h
> + #define POST_NOW_EDIT 0x00008000 /* 本文章修改中 */
> :maple/post.c
> :post_edit()
> FILE *fp;
> + int xmode;
> hdr = (HDR *) xo_pool + (xo->pos - xo->top);
> hdr_fpath(fpath, xo->dir, hdr);
> + xmode=hdr->xmode;
> ..
> ..
> else if (cuser.userlevel && !strcmp(hdr->owner, cuser.userid)) /* 原
> 作者修
> 改 */
> {
> + hdr->xmode = xmode ^ POST_NOW_EDIT;
> if (!vedit(fpath, 0)) /* 若非取消則加上修改資訊 */
> {
> if (fp = fopen(fpath, "a"))
> {
> ve_banner(fp, 1);
> fclose(fp);
> }
> }
> + hdr->xmode=xmode;
> }
> ..
> ..
> :post_score():
> pos = xo->pos;
> cur = pos - xo->top;
> hdr = (HDR *) xo_pool + cur;
> #ifdef HAVE_REFUSEMARK
> if ((hdr->xmode & POST_RESTRICT) &&
> strcmp(hdr->owner, cuser.userid) && !(bbstate & STAT_BM))
> return XO_NONE;
> #endif
> /* allen501pc:20070225 正在編輯文章的旗標 */
+ if(hdr->xmode & POST_NOW_EDIT)
> + {
> + zmsg("此篇文章正被編輯中...");
> + return XO_NONE;
> + }
> 能不能請大大幫我DEBUG?
改了還是一樣@@
--
╒═╕
║ ║║║ ★愛過方知情重★
╠═╣║║╓═┐╭─╮
║ ║║║╠═╜║ ║ ★醉過方知酒濃★
║ ║║║╰─╯│ │
--
╭─ Origin ─╗ 新綠園 bbs.sa.ncyu.edu.tw ~ κλμ ─┤
├ Author ╡ 220-129-175-6.dynamic.hinet.net