fixed formating

This commit is contained in:
Roland Gruber 2007-10-28 13:53:06 +00:00
parent ed125d96c6
commit a48dea080f
3 changed files with 79 additions and 120 deletions

View File

@ -2,7 +2,6 @@
<html><head><title>Module HowTo - Account pages</title> <html><head><title>Module HowTo - Account pages</title>
<link rel="stylesheet" type="text/css" href="style/layout.css"></head> <link rel="stylesheet" type="text/css" href="style/layout.css"></head>
<body> <body>
<div style="text-align: center;"> <div style="text-align: center;">
<h1>Module HowTo - Account pages<br> <h1>Module HowTo - Account pages<br>
@ -108,33 +107,28 @@ sizeof($this-&gt;attributes['macAddress']); $i++) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return[] = &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return[] =
array(<br> array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 0 =&gt; array('kind' =&gt; 'text', 'text' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt;
_('MAC address')),<br> _('MAC address')),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 1 =&gt; array('kind' =&gt; 'input', 'name' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'name' =&gt;
'macAddress' . $i, 'type' =&gt; 'text', 'size' =&gt; '17', 'maxlength' 'macAddress' . $i, 'type' =&gt; 'text', 'size' =&gt; '17', 'maxlength'
=&gt; '17', 'value' =&gt; $this-&gt;attributes['macAddress'][$i]),<br> =&gt; '17', 'value' =&gt; $this-&gt;attributes['macAddress'][$i]),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 2 =&gt; array('kind' =&gt; 'input', 'type' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'type' =&gt;
'submit', 'name' =&gt; 'delMAC' . $i, 'value' =&gt; _("Remove")),<br> 'submit', 'name' =&gt; 'delMAC' . $i, 'value' =&gt; _("Remove")),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 3 =&gt; array('kind' =&gt; 'help', 'value' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'help', 'value' =&gt;
'mac'));<br> 'mac'));<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // input box for new MAC<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // input box for new MAC<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return[] = array(<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return[] = array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0 =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt; _('New MAC address')),<br>
array('kind' =&gt; 'text', 'text' =&gt; _('New MAC address')),<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'name' =&gt; 'macAddress', 'type' =&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 1 =&gt;
array('kind' =&gt; 'input', 'name' =&gt; 'macAddress', 'type' =&gt;
'text', 'size' =&gt; '17', 'maxlength' =&gt; '17', 'value' =&gt; ''),<br> 'text', 'size' =&gt; '17', 'maxlength' =&gt; '17', 'value' =&gt; ''),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 2 =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'type' =&gt; 'submit', 'name' =&gt;
array('kind' =&gt; 'input', 'type' =&gt; 'submit', 'name' =&gt;
'addMAC', 'value' =&gt; _("Add")),<br> 'addMAC', 'value' =&gt; _("Add")),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 3 =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'help', 'value' =&gt; 'mac'),<br>
array('kind' =&gt; 'help', 'value' =&gt; 'mac'),<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'type' =&gt; 'hidden', 'value' =&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 4 =&gt;
array('kind' =&gt; 'input', 'type' =&gt; 'hidden', 'value' =&gt;
sizeof($this-&gt;attributes['macAddress']), 'name' =&gt; 'mac_number'));<br> sizeof($this-&gt;attributes['macAddress']), 'name' =&gt; 'mac_number'));<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $return;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return $return;<br>
&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; }<br>

View File

@ -1,9 +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><title>Module HowTo - Configuration options</title>
<head>
<title>Module HowTo - Configuration options</title> <link rel="stylesheet" type="text/css" href="style/layout.css"></head>
<link rel="stylesheet" type="text/css" href="style/layout.css">
</head>
<body> <body>
<h1>Module HowTo - Configuration options<br> <h1>Module HowTo - Configuration options<br>
</h1> </h1>
@ -25,19 +24,16 @@ will display all options in one fieldset for each module. Please notice
that there will be no separation on account types if you module is that there will be no separation on account types if you module is
suitable for different account types.<br> suitable for different account types.<br>
<br> <br>
The configuration options are specified with <span The configuration options are specified with <span style="font-weight: bold;">get_configOptions()</span>
style="font-weight: bold;">get_configOptions()</span>
or <span style="font-weight: bold;">meta['config_options']</span>.<br> or <span style="font-weight: bold;">meta['config_options']</span>.<br>
<br> <br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
style="font-weight: bold; text-decoration: underline;">
<br> <br>
The <span style="font-style: italic;">posixGroup</span> module offers The <span style="font-style: italic;">posixGroup</span> module offers
three configuration options. The min/maximum values for GIDs and the three configuration options. The min/maximum values for GIDs and the
password hash type.<br> password hash type.<br>
<br> <br>
<table style="width: 100%; text-align: left;" class="mod-code" <table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
border="0" cellpadding="2" cellspacing="2">
<tbody> <tbody>
<tr> <tr>
<td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br> <td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br>
@ -50,46 +46,46 @@ class<br>
get_metaData() {<br> get_metaData() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // configuration options<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // configuration options<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'config_options'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>] = array(<br>
style="color: rgb(255, 0, 0);">'config_options'</span>][<span
style="color: rgb(255, 0, 0);">'group'</span>] = array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;array(<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;0 =&gt; array('kind' =&gt; 'text', 'text' =&gt; '&lt;b&gt;' . &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt;
'&lt;b&gt;' .
_('Minimum GID number') . " *: &lt;/b&gt;"),<br> _('Minimum GID number') . " *: &lt;/b&gt;"),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'name' =&gt;
&nbsp;1 =&gt; array('kind' =&gt; 'input', 'name' =&gt;
'posixGroup_minGID', 'type' =&gt; 'text', 'size' =&gt; '10', 'posixGroup_minGID', 'type' =&gt; 'text', 'size' =&gt; '10',
'maxlength' =&gt; '255'),<br> 'maxlength' =&gt; '255'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;2 =&gt; array('kind' =&gt; 'text', 'value' =&gt; '&amp;nbsp;'),<br> &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'value' =&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '&amp;nbsp;'),<br>
&nbsp;3 =&gt; array('kind' =&gt; 'text', 'text' =&gt; '&lt;b&gt;' . &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt;
'&lt;b&gt;' .
_('Maximum GID number') . " *: &lt;/b&gt;"),<br> _('Maximum GID number') . " *: &lt;/b&gt;"),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'name' =&gt;
&nbsp;4 =&gt; array('kind' =&gt; 'input', 'name' =&gt;
'posixGroup_maxGID', 'type' =&gt; 'text', 'size' =&gt; '10', 'posixGroup_maxGID', 'type' =&gt; 'text', 'size' =&gt; '10',
'maxlength' =&gt; '255'),<br> 'maxlength' =&gt; '255'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;5 =&gt; array('kind' =&gt; 'help', 'value' =&gt; 'minMaxGID')),<br> &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'help', 'value' =&gt;
'minMaxGID')),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;array(<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;0 =&gt; array('kind' =&gt; 'text', 'text' =&gt; '&lt;b&gt;' . &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt;
'&lt;b&gt;' .
_("Password hash type") . ': &amp;nbsp;&lt;/b&gt;'),<br> _("Password hash type") . ': &amp;nbsp;&lt;/b&gt;'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'select', 'name' =&gt;
&nbsp;1 =&gt; array('kind' =&gt; 'select', 'name' =&gt; 'posixGroup_pwdHash', 'size' =&gt; '1', 'options' =&gt; array("CRYPT", "SHA", "SSHA", "MD5", "SMD5",
'posixGroup_pwdHash', 'size' =&gt; '1',<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;'options' =&gt; array("CRYPT", "SHA", "SSHA", "MD5", "SMD5",
"PLAIN"), 'options_selected' =&gt; array('SSHA')),<br> "PLAIN"), 'options_selected' =&gt; array('SSHA')),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;2 =&gt; array('kind' =&gt; 'text', 'value' =&gt; '&amp;nbsp;'),<br> &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'value' =&gt;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '&amp;nbsp;'),<br>
&nbsp;3 =&gt; array('kind' =&gt; 'text', 'value' =&gt; '&amp;nbsp;'),<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'value' =&gt;
&nbsp;4 =&gt; array('kind' =&gt; 'text', 'value' =&gt; '&amp;nbsp;'),<br> '&amp;nbsp;'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;5 =&gt; array('kind' =&gt; 'help', 'value' =&gt; 'pwdHash'))<br> &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'value' =&gt;
'&amp;nbsp;'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; array('kind' =&gt; 'help', 'value' =&gt; 'pwdHash'))<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;);<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [...]<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [...]<br>
</td> </td>
@ -108,22 +104,19 @@ the browser.<br>
Probably you also want to check if the input data is syntactically Probably you also want to check if the input data is syntactically
correct.<br> correct.<br>
The <span style="font-style: italic;">baseModule</span> already The <span style="font-style: italic;">baseModule</span> already
provides different checks which can be activated with <span provides different checks which can be activated with <span style="font-style: italic;">meta data</span>. However you can also do
style="font-style: italic;">meta data</span>. However you can also do
the checking in the module.<br> the checking in the module.<br>
Implementing the function <span style="font-weight: bold;">check_configOptions()</span> Implementing the function <span style="font-weight: bold;">check_configOptions()</span>
in your module will allow you to do the checks yourself. Basic checks in your module will allow you to do the checks yourself. Basic checks
can be defined with <span style="font-weight: bold;">meta['config_checks']</span>.<br> can be defined with <span style="font-weight: bold;">meta['config_checks']</span>.<br>
<br> <br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
style="font-weight: bold; text-decoration: underline;">
<br> <br>
The <span style="font-style: italic;">posixGroup</span> module only The <span style="font-style: italic;">posixGroup</span> module only
needs to check if the GID numbers are correct. The password hash type needs to check if the GID numbers are correct. The password hash type
needs not to be checked as it is a selection.<br> needs not to be checked as it is a selection.<br>
<br> <br>
<table style="width: 100%; text-align: left;" class="mod-code" <table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
border="0" cellpadding="2" cellspacing="2">
<tbody> <tbody>
<tr> <tr>
<td style="vertical-align: top;">&nbsp; &nbsp; /**<br> <td style="vertical-align: top;">&nbsp; &nbsp; /**<br>
@ -136,9 +129,7 @@ class<br>
get_metaData() {<br> get_metaData() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // configuration checks<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // configuration checks<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'config_checks'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_minGID'] =
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_minGID'] =
array (<br> array (<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt;
'ext_preg',<br> 'ext_preg',<br>
@ -150,9 +141,7 @@ array (<br>
&nbsp;'required_message' =&gt; $this-&gt;messages['gidNumber'][5],<br> &nbsp;'required_message' =&gt; $this-&gt;messages['gidNumber'][5],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;'error_message' =&gt; $this-&gt;messages['gidNumber'][5]);<br> &nbsp;'error_message' =&gt; $this-&gt;messages['gidNumber'][5]);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'config_checks'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_maxGID'] =
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_maxGID'] =
array (<br> array (<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt;
'ext_preg',<br> 'ext_preg',<br>
@ -164,9 +153,7 @@ array (<br>
&nbsp;'required_message' =&gt; $this-&gt;messages['gidNumber'][6],<br> &nbsp;'required_message' =&gt; $this-&gt;messages['gidNumber'][6],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;'error_message' =&gt; $this-&gt;messages['gidNumber'][6]);<br> &nbsp;'error_message' =&gt; $this-&gt;messages['gidNumber'][6]);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'config_checks'</span>][<span style="color: rgb(255, 0, 0);">'group'</span>]['cmpGID'] = array (<br>
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
style="color: rgb(255, 0, 0);">'group'</span>]['cmpGID'] = array (<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt;
'int_greater',<br> 'int_greater',<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'cmp_name1' &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'cmp_name1'
@ -182,9 +169,7 @@ array (<br>
</table> </table>
<br> <br>
The type <span style="font-weight: bold;">"ext_preg"</span> means that The type <span style="font-weight: bold;">"ext_preg"</span> means that
the <span style="font-style: italic;">baseModule</span> will use the <span the <span style="font-style: italic;">baseModule</span> will use the <span style="font-style: italic;">get_preg()</span> function in <span style="font-style: italic;">lib/account.inc</span> for the syntax
style="font-style: italic;">get_preg()</span> function in <span
style="font-style: italic;">lib/account.inc</span> for the syntax
check. This function already contains regular expressions for the most check. This function already contains regular expressions for the most
common cases.<br> common cases.<br>
To check if the minimum GID is smaller than the maximum GID we define a To check if the minimum GID is smaller than the maximum GID we define a
@ -193,5 +178,4 @@ This will do the comparison check.<br>
<br> <br>
<br> <br>
</div> </div>
</body> </body></html>
</html>

View File

@ -1,9 +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><title>Module HowTo - Account profiles</title>
<head>
<title>Module HowTo - Account profiles</title> <link rel="stylesheet" type="text/css" href="style/layout.css"></head>
<link rel="stylesheet" type="text/css" href="style/layout.css">
</head>
<body> <body>
<div style="text-align: center;"> <div style="text-align: center;">
<h1>Module HowTo - Account profiles<br> <h1>Module HowTo - Account profiles<br>
@ -26,8 +25,7 @@ containing its profile options.<br>
The profile options are specified with <span style="font-weight: bold;">get_profileOptions()</span> The profile options are specified with <span style="font-weight: bold;">get_profileOptions()</span>
or <span style="font-weight: bold;">meta['profile_options']</span>.<br> or <span style="font-weight: bold;">meta['profile_options']</span>.<br>
<br> <br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
style="font-weight: bold; text-decoration: underline;">
<br> <br>
The <span style="font-style: italic;">inetOrgPerson</span> The <span style="font-style: italic;">inetOrgPerson</span>
module has only two attributes which may be set to a default value: job module has only two attributes which may be set to a default value: job
@ -35,8 +33,7 @@ title and employee type.<br>
The other attributes are account specific and not useful as profile The other attributes are account specific and not useful as profile
options.<br> options.<br>
<br> <br>
<table style="width: 100%; text-align: left;" class="mod-code" <table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
border="0" cellpadding="2" cellspacing="2">
<tbody> <tbody>
<tr> <tr>
<td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br> <td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br>
@ -49,29 +46,28 @@ class<br>
get_metaData() {<br> get_metaData() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // profile elements<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // profile elements<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return[<span style="color: rgb(255, 0, 0);">'profile_options'</span>] = array(<br>
style="color: rgb(255, 0, 0);">'profile_options'</span>] = array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array(<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 0 =&gt; array('kind' =&gt; 'text', 'text' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt;
_('Job title') . ":"),<br> _('Job title') . ":"),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 1 =&gt; array('kind' =&gt; 'input', 'name' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'name' =&gt;
'inetOrgPerson_title', 'type' =&gt; 'text', 'size' =&gt; '30', 'inetOrgPerson_title', 'type' =&gt; 'text', 'size' =&gt; '30',
'maxlength' =&gt; '255'),<br> 'maxlength' =&gt; '255'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 2 =&gt; array('kind' =&gt; 'help', 'value' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'help', 'value' =&gt;
'title')),<br> 'title')),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array(<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 0 =&gt; array('kind' =&gt; 'text', 'text' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'text', 'text' =&gt;
_('Employee type') . ":"),<br> _('Employee type') . ":"),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 1 =&gt; array('kind' =&gt; 'input', 'name' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'input', 'name' =&gt;
'inetOrgPerson_employeeType', 'type' =&gt; 'text', 'size' =&gt; '30', 'inetOrgPerson_employeeType', 'type' =&gt; 'text', 'size' =&gt; '30',
'maxlength' =&gt; '255'),<br> 'maxlength' =&gt; '255'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 2 =&gt; array('kind' =&gt; 'help', 'value' =&gt; &nbsp;&nbsp;&nbsp; array('kind' =&gt; 'help', 'value' =&gt;
'employeeType'))<br> 'employeeType'))<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [...]<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [...]<br>
@ -90,22 +86,19 @@ of the input element might be not enough.<br>
Probably you also want to check if the input data is syntactically Probably you also want to check if the input data is syntactically
correct.<br> correct.<br>
The <span style="font-style: italic;">baseModule</span> already The <span style="font-style: italic;">baseModule</span> already
provides different checks which can be activated with <span provides different checks which can be activated with <span style="font-style: italic;">meta data</span>. However you can also do
style="font-style: italic;">meta data</span>. However you can also do
the checking in the module.<br> the checking in the module.<br>
Implementing the function <span style="font-weight: bold;">check_profileOptions()</span> Implementing the function <span style="font-weight: bold;">check_profileOptions()</span>
in your module will allow you to do the checks yourself. Basic checks in your module will allow you to do the checks yourself. Basic checks
can be defined with <span style="font-weight: bold;">meta['profile_checks']</span>.<br> can be defined with <span style="font-weight: bold;">meta['profile_checks']</span>.<br>
<br> <br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
style="font-weight: bold; text-decoration: underline;">
<br> <br>
The <span style="font-style: italic;">inetOrgPerson</span> module only The <span style="font-style: italic;">inetOrgPerson</span> module only
needs some regular expression checks on the input. This can be done by needs some regular expression checks on the input. This can be done by
the <span style="font-style: italic;">baseModule</span>.<br> the <span style="font-style: italic;">baseModule</span>.<br>
<br> <br>
<table style="width: 100%; text-align: left;" class="mod-code" <table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
border="0" cellpadding="2" cellspacing="2">
<tbody> <tbody>
<tr> <tr>
<td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br> <td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br>
@ -118,18 +111,14 @@ class<br>
get_metaData() {<br> get_metaData() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // profile checks<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // profile checks<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span style="color: rgb(255, 0, 0);">'inetOrgPerson_title'</span>] = array(<br>
style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span
style="color: rgb(255, 0, 0);">'inetOrgPerson_title'</span>] = array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt;
'ext_preg',<br> 'ext_preg',<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'regex' =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'regex' =&gt;
'title',<br> 'title',<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;'error_message' =&gt; $this-&gt;messages['title'][0]);<br> &nbsp;'error_message' =&gt; $this-&gt;messages['title'][0]);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span style="color: rgb(255, 0, 0);">'inetOrgPerson_employeeType'</span>] =
style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span
style="color: rgb(255, 0, 0);">'inetOrgPerson_employeeType'</span>] =
array(<br> array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;'type' =&gt;
'ext_preg',<br> 'ext_preg',<br>
@ -144,9 +133,7 @@ array(<br>
</table> </table>
<br> <br>
The type <span style="font-weight: bold;">"ext_preg"</span> means that The type <span style="font-weight: bold;">"ext_preg"</span> means that
the <span style="font-style: italic;">baseModule</span> will use the <span the <span style="font-style: italic;">baseModule</span> will use the <span style="font-style: italic;">get_preg()</span> function in <span style="font-style: italic;">lib/account.inc</span> for the syntax
style="font-style: italic;">get_preg()</span> function in <span
style="font-style: italic;">lib/account.inc</span> for the syntax
check. This function already contains regular expressions for the most check. This function already contains regular expressions for the most
common cases.<br> common cases.<br>
<br> <br>
@ -157,22 +144,18 @@ they need for their internal data structures.<br>
The <span style="font-style: italic;">baseModule</span> already The <span style="font-style: italic;">baseModule</span> already
provides the possibility to store profile values directly as LDAP provides the possibility to store profile values directly as LDAP
attributes in <span style="font-style: italic;">$this-&gt;attributes</span>. attributes in <span style="font-style: italic;">$this-&gt;attributes</span>.
This is done by defining profile-attribute mappings in <span This is done by defining profile-attribute mappings in <span style="font-weight: bold;">meta['profile_mappings']</span>.<br>
style="font-weight: bold;">meta['profile_mappings']</span>.<br>
If you have other values than LDAP attributes or need some post If you have other values than LDAP attributes or need some post
processing you can implement the function <span processing you can implement the function <span style="font-weight: bold;">load_profile()</span> in your module.<br>
style="font-weight: bold;">load_profile()</span> in your module.<br>
<br> <br>
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br <span style="font-weight: bold; text-decoration: underline;">Example:</span><br style="font-weight: bold; text-decoration: underline;">
style="font-weight: bold; text-decoration: underline;">
<br> <br>
The <span style="font-style: italic;">inetLocalMailRecipient</span> The <span style="font-style: italic;">inetLocalMailRecipient</span>
module only module only
needs a static mapping. This can be done by needs a static mapping. This can be done by
the <span style="font-style: italic;">baseModule</span>.<br> the <span style="font-style: italic;">baseModule</span>.<br>
<br> <br>
<table style="width: 100%; text-align: left;" class="mod-code" <table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
border="0" cellpadding="2" cellspacing="2">
<tbody> <tbody>
<tr> <tr>
<td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br> <td style="vertical-align: top;">&nbsp;&nbsp;&nbsp; /**<br>
@ -185,8 +168,7 @@ class<br>
get_metaData() {<br> get_metaData() {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $return = array();<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // profile mappings<br> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; // profile mappings<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$return[<span style="color: rgb(255, 0, 0);">'profile_mappings'</span>] = array(<br>
style="color: rgb(255, 0, 0);">'profile_mappings'</span>] = array(<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;'inetLocalMailRecipient_host' =&gt; 'mailHost'<br> &nbsp;'inetLocalMailRecipient_host' =&gt; 'mailHost'<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;);<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;);<br>
@ -204,5 +186,4 @@ stored as LDAP attribute "mailHost".<br>
<h2><span style="font-weight: bold;"></span></h2> <h2><span style="font-weight: bold;"></span></h2>
</div> </div>
</div> </div>
</body> </body></html>
</html>