Subversion Repositories wimsdev

Rev

Rev 17228 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17228 Rev 17238
Line 1... Line 1...
1
<p>
1
<p>
2
  Each wims module has a private home directory in which go all the files
2
  Each WIMS module has a private home directory in which go all the files
3
  of this module.
3
  of this module.
4
</p>
4
</p>
5
 
-
 
6
A module must have at least the following files:
5
A module must have at least the following files:
-
 
6
!!tit contains <li>
7
<ul>
7
<ul>
8
  <li>
-
 
9
    $tit A variable definition file $emph var.def$emphend. $titend
8
    $tit A variable definition file $emph var.def$emphend. $titend
10
    This file defines $emph external$emphend variables of the module. A parameter given by the
9
    This file defines $emph external$emphend variables of the module. A parameter given by the
11
    user must have a name declared in this file, except parameter names reserved by
10
    user must have a name declared in this file, except parameter names reserved by
12
    wims (cmd, session, module, ...). And exactly variables declared in this
11
    WIMS (cmd, session, module, ...). And exactly variables declared in this
13
    file will be saved in the session directory (to be recalled at the next
12
    file will be saved in the session directory (to be recalled at the next
14
    request from the same session).
13
    request from the same session).
15
  </li><li>
14
  </li>
16
    $tit A variable processing file $emph var.proc$emphend.$titend
15
    $tit A variable processing file $emph var.proc$emphend.$titend
17
     This file is processed at EACH request of the module (except special
16
     This file is processed at EACH request of the module (except special
18
     requests: when cmd=intro or getins).
17
     requests: when cmd=intro or getins).
19
  </li><li>
18
  </li>
20
    $tit A main phtml file $emph main.phtml$emphend.$titend
19
    $tit A main phtml file $emph main.phtml$emphend.$titend
21
    This file will be processed at avery request to the module, except under
20
    This file will be processed at avery request to the module, except under
22
    special commands (when cmd=intro or getins).
21
    special commands (when cmd=intro or getins).
23
  </li><li>
22
  </li>
24
    $tit An indexing file $emph INDEX$emphend, which defines the application's nature.$titend
23
    $tit An indexing file $emph INDEX$emphend, which defines the application's nature.$titend
25
    This file will be used by wims database for searching available modules.
24
    This file will be used by WIMS database for searching available modules.
26
  </li>
25
  </li>
27
</ul>
26
</ul>
28
 
-
 
29
<p>And it may often contain the following (optional) files too:</p>
27
<p>And it may often contain the following (optional) files too:</p>
30
<ul>
28
<ul>
31
  <li>
-
 
32
    $tit A variable initialisation file $emph var.init$emphend.$titend
29
    $tit A variable initialisation file $emph var.init$emphend.$titend
33
    This file has the same syntax as the file $emph var.proc$emphend, and is processed
30
    This file has the same syntax as the file $emph var.proc$emphend, and is processed
34
    exactly at requests with cmd=new or cmd=renew.
31
    exactly at requests with cmd=new or cmd=renew.
35
  </li><li>
32
  </li>
36
    $tit A introductory page $emph intro.phtml$emphend.$titend
33
    $tit A introductory page $emph intro.phtml$emphend.$titend
37
    This is a phtml file, which is processed when the module is
34
    This is a phtml file, which is processed when the module is
38
    accessed with cmd=intro. It is usually used to introduce the content of the
35
    accessed with cmd=intro. It is usually used to introduce the content of the
39
    module, and to let the user choose starting options.
36
    module, and to let the user choose starting options.
40
  </li>
37
  </li>
41
</ul>
38
</ul>
42
 
-
 
43
<p>
39
<p>
44
  There may be any number of other files, like a $emph README.md$emphend file, one or more
40
  There may be any number of other files, like a $emph README.md$emphend file, one or more
45
  help pages, an $emph about$emphend page, one or more graphics files, files called by one
41
  help pages, an $emph about$emphend page, one or more graphics files, files called by one
46
  of the above mandatory or optional files, etc.
42
  of the above mandatory or optional files, etc.
47
</p>
43
</p>
Line 63... Line 59...
63
    $emph #$emphend, or $emph!$emphend followed by another $emph!$emphend.
59
    $emph #$emphend, or $emph!$emphend followed by another $emph!$emphend.
64
  </li>
60
  </li>
65
  <li>A variable definition line, in the form of
61
  <li>A variable definition line, in the form of
66
    $emph name$emphend=$(emph)value$emphend. The content of
62
    $emph name$emphend=$(emph)value$emphend. The content of
67
    $(emph)value$emphend may be a string (if this string contains a new-line
63
    $(emph)value$emphend may be a string (if this string contains a new-line
68
    character, it must be escaped by the character $emph \$emphend), or a wims
64
    character, it must be escaped by the character $emph \$emphend), or a WIMS
69
    variable command (which must then start with the character $emph!$emphend).
65
    variable command (which must then start with the character $emph!$emphend).
70
  </li>
66
  </li>
71
  <li>A command line, whose first non-space character is the character
67
  <li>A command line, whose first non-space character is the character
72
    $emph!$emphend, followed by the command name and optional parameters.
68
    $emph!$emphend, followed by the command name and optional parameters.
73
    <br>If the command produces an output string, this output will be ignored.
69
    <br>If the command produces an output string, this output will be ignored.
Line 79... Line 75...
79
    $emph!goto$emphend.
75
    $emph!goto$emphend.
80
    <br>A label starting with the character '*' is catch-all, matching any
76
    <br>A label starting with the character '*' is catch-all, matching any
81
    $emph!goto$emphend label.
77
    $emph!goto$emphend label.
82
  </li>
78
  </li>
83
  <li>
79
  <li>
84
    Any line not fitting into one of the above 4 will generate a wims error
80
    Any line not fitting into one of the above 4 will generate a WIMS error
85
    message.
81
    message.
86
  </li>
82
  </li>
87
</ol>
83
</ol>
88
 
84
 
89
<hr><h4>Phtml files</h4>
85
<hr><h4>Phtml files</h4>