<!--
   $FML: extension.sgml,v 1.1 2003/07/24 15:37:35 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 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 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>
where $ml_home_dir = /var/spool/ml/elena.
</para>

<para>
In this section, we consider the former case. In both cases, the way
of writing the module codes are same. Only path differs.
</para>
</warning>


<sect2>
	<title> 
	Create a new user command
	</title>

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

</sect2>


<sect2>
	<title> 
	Create a new admin command "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 $commands_for_privileged_user
to permit the use of "admin uja" command.
<screen>
commands_for_privileged_user += uja
</screen>
</para>

</sect2>

</sect1>


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

<warning>
<para>
To make a new 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>
To make a new 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 $commands_for_admin_cgi
to permit the use of "uja" command.
<screen>
commands_for_admin_cgi += uja
</screen>
</para>


</sect1>
