Rev 7679 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 6463 | bpr | 1 | !!##class |
| 2 | basedir=bases/class |
||
| 33 | reyssat | 3 | !if $srch!=$empty |
| 12821 | bpr | 4 | suffix_dictionary= |
| 5 | dictionary=$basedir/$search_lang |
||
| 6 | translator_unknown= |
||
| 7 | !read search.common |
||
| 33 | reyssat | 8 | !else |
| 12821 | bpr | 9 | scnt=0 |
| 33 | reyssat | 10 | !endif |
| 11 | # Limit of shown items |
||
| 7044 | bpr | 12 | gotlim=1000 |
| 33 | reyssat | 13 | !distribute item 0,0,, into weight,gotcnt,gotm,gotw,lastmod |
| 14 | |||
| 15 | !for i=1 to $scnt |
||
| 12821 | bpr | 16 | l_=!line $i of $sout |
| 17 | t_=!wordcnt $l_ |
||
| 18 | !advance gotcnt |
||
| 19 | !if $t_=2 |
||
| 20 | !distribute word $l_ into m_,w_ |
||
| 21 | !if $m_=$lastmod or $gotcnt>$gotlim |
||
| 22 | weight=$[$weight+$w_] |
||
| 23 | !else |
||
| 24 | !if $lastmod!=$empty |
||
| 25 | gotm=$gotm $lastmod |
||
| 26 | gotw=$gotw $weight |
||
| 27 | !advance gotcnt |
||
| 28 | !endif |
||
| 29 | lastmod=$m_ |
||
| 30 | weight=$w_ |
||
| 31 | !endif |
||
| 33 | reyssat | 32 | !else |
| 12821 | bpr | 33 | gotm=$gotm $l_ |
| 33 | reyssat | 34 | !endif |
| 35 | !next i |
||
| 36 | !if $lastmod!=$empty |
||
| 12821 | bpr | 37 | gotm=$gotm $lastmod |
| 38 | gotw=$gotw $weight |
||
| 39 | !advance gotcnt |
||
| 33 | reyssat | 40 | !endif |
| 41 | |||
| 6465 | bpr | 42 | gotm=!words2lines $gotm |
| 7044 | bpr | 43 | gotm=!line 1 to $gotlim2 of $gotm |
| 44 | gotcnt=!linecnt $gotm |
||
| 7679 | bpr | 45 | |
| 33 | reyssat | 46 | translator_switch=leaveline |
| 6463 | bpr | 47 | dictionary=$basedir/title |
| 33 | reyssat | 48 | gott=!exec translator $gotm |
| 6463 | bpr | 49 | dictionary=$basedir/description |
| 33 | reyssat | 50 | gotd=!exec translator $gotm |
| 6967 | bpr | 51 | dictionary=$basedir/information |
| 52 | gotiC=!exec translator $gotm |
||
| 6961 | bpr | 53 | |
| 33 | reyssat | 54 | !if $gotcnt>0 and / notin $gotm |
| 12821 | bpr | 55 | dictionary=$basedir/addr |
| 56 | gotm=!exec translator $gotm |
||
| 33 | reyssat | 57 | !endif |