summaryrefslogtreecommitdiff
path: root/fml/doc/en/tutorial/command/extension.sgml
blob: ab910912f20da777b90b87f3529a1c2f0e719363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<!--
   $FML: extension.sgml,v 1.3 2005/07/20 10:37:42 fukachan Exp $
   $jaFML: extension.sgml,v 1.10 2003/04/15 14:51:36 fukachan Exp $
-->


<sect1 id="fml.command.hack.commandmail">
	<title>
	Command Extension: Command Mail
	</title>


<warning>
<para>
To make a new local command usable for all ML's on this host, 
you need to put the module you wrote at
<screen>
/usr/local/lib/fml/site_local/
</screen>
.
If the command is allowed only for the specifiec ML
(e.g. elena ML), put it at the ML local library path
<screen>
/var/spool/ml/elena/local/lib/
</screen>
where $ml_home_dir = /var/spool/ml/elena.
</para>

</warning>


<sect2>
	<title> 
	Create A New User Command
	</title>

<para>
Consider to make a new local user command "uja".
Pick up a command at FML::Command::User, cut and paste it.
Please put it at
<screen>
/usr/local/lib/fml/site_local/FML/Command/User/uja.pm
</screen>
To permit the use of it for all ML's, 
edit site_default_config.cf to add it into $commands_for_user
to permit the user of "uja" command.
<screen>
user_command_mail_allowed_commands += uja
</screen>
It you allow the command only for the specific elena ML, 
edit /var/spool/ml/elena/config.cf in the same way.
<screen>
user_command_mail_allowed_commands += uja
</screen>
</para>

</sect2>


<sect2>
	<title> 
	Create A New Admin Command Such As "admin uja"
	</title>

<para>
In the same way described above, hack the module!:)
but the module path differs.
Put it at the FML::Command::Admin:: class. For example
<screen>
/usr/local/lib/fml/site_local/FML/Command/Admin/uja.pm
</screen>
Edit site_default_config.cf to add it into
$user_command_mail_allowed_commands to permit the use of "admin uja"
command.
<screen>
admin_command_mail_allowed_commands += uja
</screen>
</para>

</sect2>

</sect1>


<sect1 id="fml.command.hack.makefml">
	<title>
	CUI Command Extension: makefml/fml
	</title>

<warning>
<para>
To make a new local command usable for all ML's on this host, 
put the module you wrote at
<screen>
/usr/local/lib/fml/site_local/
</screen>

If you permit the command is used only for the specifiec ML
(e.g. elena ML), put it at the ML local library path
<screen>
/var/spool/ml/elena/local/lib/
</screen>
.
</para>

<para>
In this section, we consider the former case.
In both cases, the module codes are same.
</para>
</warning>

<para>
Create a module "uja" and put it at 
<screen>
/usr/local/lib/fml/site_local/FML/Command/Admin/uja.pm
</screen>
You do not need to edit .cf files. The existence of module file
enables the command automatically in the CUI case since the usability
of CUI implies administrator use.
</para>

</sect1>


<sect1 id="fml.command.hack.cgi">
	<title>
	GUI Command Extension: CGI
	</title>


<warning>
<para>
You need another work to create a menu screen.
</para>

<para>
To make a new local command usable for all ML's on this host, 
put the module you wrote at
<screen>
/usr/local/lib/fml/site_local/
</screen>

If you permit the command is used only for the specifiec ML
(e.g. elena ML), put it at the ML local library path
<screen>
/var/spool/ml/elena/local/lib/
</screen>
.
</para>

<para>
In this section, we consider the former case.
In both cases, the module codes are same.
</para>
</warning>


<para>
Craete a module "uja" and put it at
<screen>
/usr/local/lib/fml/site_local/FML/Command/Admin/uja.pm
</screen>
Edit site_default_config.cf to add it into $admin_cgi_allowed_commands
to permit the use of "uja" command.
<screen>
admin_cgi_allowed_commands += uja
</screen>
</para>


</sect1>