Rev 10970 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10970 | Rev 12821 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | forumtest=!defof mb_readpolicy in wimshome/log/classes/$wims_class/forum/.def |
2 | forumtest=!defof mb_readpolicy in wimshome/log/classes/$wims_class/forum/.def |
3 | !if $wims_user!=supervisor and $forumtest!=alluser |
3 | !if $wims_user!=supervisor and $forumtest!=alluser |
4 | msgcnt=0 |
4 | msgcnt=0 |
5 | !exit |
5 | !exit |
6 | !endif |
6 | !endif |
7 | 7 | ||
8 | !if $wims_user=supervisor and ($wims_realuser=$empty or $wims_realuser=supervisor) |
8 | !if $wims_user=supervisor and ($wims_realuser=$empty or $wims_realuser=supervisor) |
9 | deffile=wimshome/log/classes/$wims_class/supervisor |
9 | deffile=wimshome/log/classes/$wims_class/supervisor |
10 | !else |
10 | !else |
11 | !if $wims_realuser!=$empty |
11 | !if $wims_realuser!=$empty |
12 | deffile=wimshome/log/classes/$wims_class/.users/$wims_realuser |
12 | deffile=wimshome/log/classes/$wims_class/.users/$wims_realuser |
13 | !else |
13 | !else |
14 | deffile=wimshome/log/classes/$wims_class/.users/$wims_user |
14 | deffile=wimshome/log/classes/$wims_class/.users/$wims_user |
15 | !endif |
15 | !endif |
16 | !endif |
16 | !endif |
17 | 17 | ||
18 | newlim=10 |
18 | newlim=10 |
19 | user_lastmsg=!getdef user_lastmsg in $deffile |
19 | user_lastmsg=!getdef user_lastmsg in $deffile |
20 | !default user_lastmsg=0 |
20 | !default user_lastmsg=0 |
21 | 21 | ||
22 | msgs=!record 0 of wimshome/log/classes/$wims_class/forum/.newlist |
22 | msgs=!record 0 of wimshome/log/classes/$wims_class/forum/.newlist |
23 | msgcnt=!linecnt $msgs |
23 | msgcnt=!linecnt $msgs |
24 | 24 | ||
25 | #msgcnt=0 |
25 | #msgcnt=0 |
26 | 26 | ||
27 | !if $user_lastmsg=0 |
27 | !if $user_lastmsg=0 |
28 | !if $msgcnt>$newlim |
28 | !if $msgcnt>$newlim |
29 | newmsgcnt=> $newlim |
29 | newmsgcnt=> $newlim |
30 | !else |
30 | !else |
31 | newmsgcnt=$msgcnt |
31 | newmsgcnt=$msgcnt |
32 | !endif |
32 | !endif |
33 | !exit |
33 | !exit |
34 | !endif |
34 | !endif |
35 | 35 | ||
36 | user_lastmonth=!char 1 to 6 of $user_lastmsg |
36 | user_lastmonth=!char 1 to 6 of $user_lastmsg |
37 | !for n=$msgcnt to 1 step -1 |
37 | !for n=$msgcnt to 1 step -1 |
38 | l_=!line $n of $msgs |
38 | l_=!line $n of $msgs |
39 | !distribute words $l_ into w_,t_ |
39 | !distribute words $l_ into w_,t_ |
40 | !if $w_<$user_lastmonth |
40 | !if $w_<$user_lastmonth |
41 | !break |
41 | !break |
42 | !endif |
42 | !endif |
43 | L_=!record $t_ of wimshome/log/classes/$wims_class/forum/$w_/.msglist |
43 | L_=!record $t_ of wimshome/log/classes/$wims_class/forum/$w_/.msglist |
44 | !distribute items $L_ into m_,d_,h_ |
44 | !distribute items $L_ into m_,d_,h_ |
45 | h_=!char 1,2,4,5,7,8 of $h_ |
45 | h_=!char 1,2,4,5,7,8 of $h_ |
46 | !if $user_lastmsg<=$w_$d_$h_ |
46 | !if $user_lastmsg<=$w_$d_$h_ |
47 | !if $newmsgcnt>$newlim |
47 | !if $newmsgcnt>$newlim |
48 | newmsgcnt=> $newlim |
48 | newmsgcnt=> $newlim |
49 | !exit |
49 | !exit |
50 | !else |
50 | !else |
51 | !advance newmsgcnt |
51 | !advance newmsgcnt |
- | 52 | !endif |
|
52 | !endif |
53 | !endif |
53 | !endif |
- | |
54 | !next n |
54 | !next n |