minor changes
This commit is contained in:
parent
b07d598ff3
commit
26c20e73f0
|
@ -1,8 +1,8 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=ISO-8859-15"
|
<meta http-equiv="content-type"
|
||||||
http-equiv="content-type">
|
content="text/html; charset=ISO-8859-15">
|
||||||
<title>Module specification</title>
|
<title>Module specification</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -25,30 +25,10 @@ These functions are called without instanciating an object of the
|
||||||
module class. They must not depend on class variables and are only
|
module class. They must not depend on class variables and are only
|
||||||
allowed to call other static functions.<br>
|
allowed to call other static functions.<br>
|
||||||
<br>
|
<br>
|
||||||
<h3>2.1.1. Constructor</h3>
|
<h3>2.1.1. get_alias</h3>
|
||||||
<br>
|
<br>
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
<table cellpadding="2" cellspacing="2" border="0"
|
||||||
cellspacing="2" cellpadding="2">
|
style="text-align: left; width: 300px;">
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td
|
|
||||||
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
|
||||||
style="font-weight: bold;">function <module name> ($base)</span><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
Every module needs a constructor that has an<span
|
|
||||||
style="font-style: italic;"> <span style="font-weight: bold;">account
|
|
||||||
container</span></span> as argument $base.<br>
|
|
||||||
With this account container you can interact with other modules and use
|
|
||||||
several helper functions.<br>
|
|
||||||
<br>
|
|
||||||
<h3>2.1.2. get_alias</h3>
|
|
||||||
<br>
|
|
||||||
<table style="text-align: left; width: 300px;" border="0"
|
|
||||||
cellspacing="2" cellpadding="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
|
@ -67,7 +47,61 @@ a-z, A-Z, 0-9, -, _ and spaces.<br>
|
||||||
The <span style="font-weight: bold;">$scope</span> parameter defines
|
The <span style="font-weight: bold;">$scope</span> parameter defines
|
||||||
the account type ("user", "group", "host" at this time).<br>
|
the account type ("user", "group", "host" at this time).<br>
|
||||||
<br>
|
<br>
|
||||||
<h3>2.1.3. get_dependencies</h3>
|
<h3>2.1.2. is_base_module</h3>
|
||||||
|
<br>
|
||||||
|
<table cellpadding="2" cellspacing="2" border="0"
|
||||||
|
style="text-align: left; width: 300px; height: 30px;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
||||||
|
style="font-weight: bold;">function is_base_module($scope)</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
Returns <span style="font-weight: bold;">true</span> if your module is
|
||||||
|
a base module and otherwise <span style="font-weight: bold;">false</span>.<br>
|
||||||
|
<span style="font-weight: bold;">$scope</span> is the account type
|
||||||
|
("user", "group", "host" at this time).<br>
|
||||||
|
<br>
|
||||||
|
Every account type needs at least one base module. A base module
|
||||||
|
defines a full qualified account.<br>
|
||||||
|
E.g. modules that use the object class posixAccount may be base modules
|
||||||
|
as it makes sense to manage these Unix accounts. On the other hand the
|
||||||
|
quota module is no base module as it needs posixAccount.<br>
|
||||||
|
<br>
|
||||||
|
<h3>2.1.3. get_ldap_filter</h3>
|
||||||
|
<br>
|
||||||
|
<table cellpadding="2" cellspacing="2" border="0"
|
||||||
|
style="text-align: left; width: 300px; height: 30px;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
||||||
|
style="font-weight: bold;">function get_ldap_filter($scope)</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
Returns a string that can be used as part of a LDAP filter. Usually
|
||||||
|
used to filter object classes.<br>
|
||||||
|
<span style="font-weight: bold;">$scope</span> is the account type
|
||||||
|
("user", "group", "host" at this time).<br>
|
||||||
|
<br>
|
||||||
|
All filter parts of the base modules are combined with OR and used to
|
||||||
|
find the accounts for the lists.<br>
|
||||||
|
<br>
|
||||||
|
<span style="font-weight: bold;">Example: <span
|
||||||
|
style="font-style: italic;">return "(objectClass=posixAccount)"</span></span><br>
|
||||||
|
<br>
|
||||||
|
<span style="font-weight: bold; color: rgb(255, 0, 0);">This function
|
||||||
|
is only used for base modules. Standard modules do not need to
|
||||||
|
implement it.</span><br>
|
||||||
|
<br>
|
||||||
|
<h3>2.1.4. get_dependencies</h3>
|
||||||
<br>
|
<br>
|
||||||
<table style="text-align: left; width: 300px; font-weight: bold;"
|
<table style="text-align: left; width: 300px; font-weight: bold;"
|
||||||
border="0" cellspacing="2" cellpadding="2">
|
border="0" cellspacing="2" cellpadding="2">
|
||||||
|
@ -100,106 +134,10 @@ your module depends on one of these modules.<br>
|
||||||
=> array("exim"));</span><br
|
=> array("exim"));</span><br
|
||||||
style="font-weight: bold; font-style: italic;">
|
style="font-weight: bold; font-style: italic;">
|
||||||
<br>
|
<br>
|
||||||
|
<h3>2.1.5. get_profileOptions</h3>
|
||||||
<br>
|
<br>
|
||||||
<h3>2.1.4. module_ready</h3>
|
<table cellpadding="2" cellspacing="2" border="0"
|
||||||
<br>
|
style="text-align: left; width: 300px; height: 30px;">
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
|
||||||
cellspacing="2" cellpadding="2">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td
|
|
||||||
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
|
||||||
style="font-weight: bold;">function module_ready()</span><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
Your module might depend on input of other modules. This function
|
|
||||||
determines if the module button on the account page is active or not.<br>
|
|
||||||
The return value is <span style="font-weight: bold;">true</span> if
|
|
||||||
your module accepts input, otherwise <span style="font-weight: bold;">false</span>.<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<h3>2.1.5. module_complete</h3>
|
|
||||||
<br>
|
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
|
||||||
cellspacing="2" cellpadding="2">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td
|
|
||||||
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
|
||||||
style="font-weight: bold;">function module_complete()</span><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
This function is called after your module has processed the POST input
|
|
||||||
data.<br>
|
|
||||||
If there was an input error and you want to display a page again then
|
|
||||||
return <span style="font-weight: bold;">false</span>. If <span
|
|
||||||
style="font-weight: bold;">true</span> is returned the next module
|
|
||||||
page will be displayed.<br>
|
|
||||||
<br>
|
|
||||||
<h3>2.1.6. is_base_module</h3>
|
|
||||||
<br>
|
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
|
||||||
cellspacing="2" cellpadding="2">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td
|
|
||||||
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
|
||||||
style="font-weight: bold;">function is_base_module($scope)</span><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
Returns <span style="font-weight: bold;">true</span> if your module is
|
|
||||||
a base module and otherwise <span style="font-weight: bold;">false</span>.<br>
|
|
||||||
<span style="font-weight: bold;">$scope</span> is the account type
|
|
||||||
("user", "group", "host" at this time).<br>
|
|
||||||
<br>
|
|
||||||
Every account type needs at least one base module. A base module
|
|
||||||
defines a full qualified account.<br>
|
|
||||||
E.g. modules that use the object class posixAccount may be base modules
|
|
||||||
as it makes sense to manage these Unix accounts. On the other hand the
|
|
||||||
quota module is no base module as it needs posixAccount.<br>
|
|
||||||
<br>
|
|
||||||
<h3>2.1.7. get_ldap_filter</h3>
|
|
||||||
<br>
|
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
|
||||||
cellspacing="2" cellpadding="2">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td
|
|
||||||
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
|
||||||
style="font-weight: bold;">function get_ldap_filter($scope)</span><br>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<br>
|
|
||||||
Returns a string that can be used as part of a LDAP filter. Usually
|
|
||||||
used to filter object classes.<br>
|
|
||||||
<span style="font-weight: bold;">$scope</span> is the account type
|
|
||||||
("user", "group", "host" at this time).<br>
|
|
||||||
<br>
|
|
||||||
All filter parts of the base modules are combined with OR and used to
|
|
||||||
find the accounts for the lists.<br>
|
|
||||||
<br>
|
|
||||||
<span style="font-weight: bold;">Example: <span
|
|
||||||
style="font-style: italic;">return "(objectClass=posixAccount)"</span></span><br>
|
|
||||||
<br>
|
|
||||||
<span style="font-weight: bold; color: rgb(255, 0, 0);">This function
|
|
||||||
is only used for base modules.</span><br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<h3>2.1.8. get_profileOptions</h3>
|
|
||||||
<br>
|
|
||||||
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
|
||||||
cellspacing="2" cellpadding="2">
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
|
@ -221,6 +159,69 @@ The return value is an array that contains <span
|
||||||
The type "fieldset" is not allowed here.<br>
|
The type "fieldset" is not allowed here.<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
<h3>2.2. Class functions</h3>
|
||||||
|
<h3>2.2.1. Constructor</h3>
|
||||||
|
<br>
|
||||||
|
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
||||||
|
cellspacing="2" cellpadding="2">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
||||||
|
style="font-weight: bold;">function <module name> ($base)</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
Every module needs a constructor that has an<span
|
||||||
|
style="font-style: italic;"> <span style="font-weight: bold;">account
|
||||||
|
container</span></span> as argument $base.<br>
|
||||||
|
With this account container you can interact with other modules and use
|
||||||
|
several helper functions.<br>
|
||||||
|
<br>
|
||||||
|
<h3>2.2.2. module_ready</h3>
|
||||||
|
<br>
|
||||||
|
<table style="text-align: left; width: 300px; height: 30px;" border="0"
|
||||||
|
cellspacing="2" cellpadding="2">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
||||||
|
style="font-weight: bold;">function module_ready()</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
Your module might depend on input of other modules. This function
|
||||||
|
determines if the module button on the account page is active or not.<br>
|
||||||
|
The return value is <span style="font-weight: bold;">true</span> if
|
||||||
|
your module accepts input, otherwise <span style="font-weight: bold;">false</span>.<br>
|
||||||
|
<br>
|
||||||
|
<h3>2.2.3. module_complete</h3>
|
||||||
|
<br>
|
||||||
|
<table cellpadding="2" cellspacing="2" border="0"
|
||||||
|
style="text-align: left; width: 300px; height: 30px;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center;"><span
|
||||||
|
style="font-weight: bold;">function module_complete()</span><br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
This function is called after your module has processed the POST input
|
||||||
|
data.<br>
|
||||||
|
If there was an input error and you want to display a page again then
|
||||||
|
return <span style="font-weight: bold;">false</span>. If <span
|
||||||
|
style="font-weight: bold;">true</span> is returned the next module
|
||||||
|
page will be displayed.<br>
|
||||||
|
<br>
|
||||||
|
<h3><br>
|
||||||
|
</h3>
|
||||||
<h2>3. Meta HTML code</h2>
|
<h2>3. Meta HTML code</h2>
|
||||||
The modules are not allowed to display HTML code directly but return
|
The modules are not allowed to display HTML code directly but return
|
||||||
meta HTML code. This allows to have a common design for all module
|
meta HTML code. This allows to have a common design for all module
|
||||||
|
|
Loading…
Reference in New Issue