作者maya.bbs@cpu.tfcis.org (瑪雅) 看板: itoc
標題Re: 請問版友停留時間
時間動力核心 (2007/10/04 Thu 16:15:06)
因為時間久了,每個版的 board_usies 檔會很大,
所以想說用另一隻程式,每個禮拜執行一次,
把 board_usies 的內容寫到精華區的某一個私密目錄內。
想要參考自動寫入精華區的現有程式來修改,
不過還沒找到適合的參考程式,
大部分都是自動波文到看板上。
是否有前輩能指點一下,
該如何將文章自動的轉貼到精華區的某私密目錄呢?
謝謝
※ 引述《itoc (核心動力)》之銘言:
> ※ 引述《maya (瑪雅)》之銘言:
> > 我想要每個版主都能夠看到有哪幾個人各停留多久這樣,也許是
> > F7 2007/05/11 13:32:33 停留32秒
> > in2 2006/04/12 12:24:43 停留10000秒
> > F7 2005/01/23 23:22:45 停留235秒
> > 這樣子的資訊
> > 也許在版內,版主多個快捷鍵可以看到這樣的資訊
[刪除部分code]
> void
> board_usies(bno, in)
> int bno;
> int in;
> {
> static time_t start;
> time_t now;
> char fpath[64], buf[80];
> if (in) /* 進入看板,開始計算時間 */
> {
> time(&start);
> }
> else /* 離開看板,結算時間 */
> {
> time(&now);
> brd_fpath(fpath, (bshm->bcache + bno)->brdname, "board_usies");
> sprintf(buf, "%s %s 停留%d秒", cuser.userid, Btime(&now), now - start);
> f_cat(fpath, buf);
> }
> }
> : maple.p
> + void board_usies(int bno, int in);
> int XoPost(int bno);
> : post.c:post_board_usies() 新增此函式於 post_help() 前面
> static int
> post_board_usies(xo)
> XO *xo;
> {
> char fpath[64];
> brd_fpath(fpath, currboard, "board_usies");
> more(fpath, NULL);
> }
> : post.c:post_cb[]
> + 'i', post_board_usies,
> 'h', post_help
> };
--
=[﹎:�摃�◣��:﹎Origin ]|[ ���O���� cpu.tfcis.org ]|[�搟說�﹎:]=
=[﹊:�摃�╱��:﹊Author ]|[59-120-103-217.HINET-IP.hi]|[���插�﹊:]=