From 2f160db0ae78365c47dcd8255905330ea2bdc60a Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 3 Apr 2004 14:43:40 +0000 Subject: [PATCH] moved profile functions to non-static because they need the cache --- lam/docs/modules-specification.htm | 285 ++++++++++++++++------------- 1 file changed, 155 insertions(+), 130 deletions(-) diff --git a/lam/docs/modules-specification.htm b/lam/docs/modules-specification.htm index 5a6de578..ba0b495b 100644 --- a/lam/docs/modules-specification.htm +++ b/lam/docs/modules-specification.htm @@ -1,8 +1,8 @@ - + Module specification @@ -28,8 +28,8 @@ allowed to call other static functions.

2.1.1. can_manage


- +

2.1.2. get_alias


- +

2.1.3. is_base_module


- +

2.1.4. get_ldap_filter


- +


2.1.5. get_dependencies


- +
=> array("exim"));

-

2.1.6. get_profileOptions

+
+

2.2. Class functions

+

2.2.1. Constructor

+
+ + + + + + +
function <module name> ($base)
+
+
+Every module needs a constructor that has an account +container as argument $base.
+With this account container you can interact with other modules and use +several helper functions.
+
+

2.2.2. module_ready

+
+ + + + + + +
function module_ready()
+
+
+Your module might depend on input of other modules. This function +determines if the module button on the account page is active or not.
+The return value is true if +your module accepts input, otherwise false.
+
+

2.2.3. module_complete

+
+ + + + + + +
function module_complete()
+
+
+This function is called after your module has processed the POST input +data.
+If there was an input error and you want to display a page again then +return false. If true is returned the next module +page will be displayed.
+
+

2.2.4. get_help

+
+ + + + + + +
function get_help($helpID)
+
+
+This function is called when a page requests a help topic from this +module.
+$helpID is the help identifier; +it must only contain a-z, A-Z, 0-9 +-, . and _.
+It must return the help entry as array for the submitted help +identifier. The format of the array to be returned is described in +section 4. "Help entry syntax".
+
+

2.1.5. get_profileOptions


@@ -184,7 +269,7 @@ as keywords to load and save profiles. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming confilcts.

-

2.1.7. check_profileOptions

+

2.1.6. check_profileOptions


@@ -212,87 +297,6 @@ head, 2 => message text, 3 => additional variables).
If no errors occured the function returns an empty array.

-
-

2.2. Class functions

-

2.2.1. Constructor

-
-
- - - - - -
function <module name> ($base)
-
-
-Every module needs a constructor that has an account -container as argument $base.
-With this account container you can interact with other modules and use -several helper functions.
-
-

2.2.2. module_ready

-
- - - - - - -
function module_ready()
-
-
-Your module might depend on input of other modules. This function -determines if the module button on the account page is active or not.
-The return value is true if -your module accepts input, otherwise false.
-
-

2.2.3. module_complete

-
- - - - - - -
function module_complete()
-
-
-This function is called after your module has processed the POST input -data.
-If there was an input error and you want to display a page again then -return false. If true is returned the next module -page will be displayed.
-
-

2.2.4. get_help

-
- - - - - - -
function get_help($helpID)
-
-
-This function is called when a page requests a help topic from this module.
-$helpID is the help identifier; it must only contain a-z, A-Z, 0-9 --, . and _.
-It must return the help entry as array for the submitted help identifier. The format of the array to be returned is described in section 4. "Help entry syntax".
-


3. Meta HTML code

@@ -417,45 +421,66 @@ example", "td" => array("colspan" => 3))


4. Help entry syntax

-The array that is returned by the get_help function must follow the below described syntax. -Fields marked REQUIRED are neccessary under any circumstances. Fields marked -OPTIONAL may be left out when not needed.
-There are basically two different types of help entries that can be used. Internal help entries, that -means the headline, text, etc is included in the help entry or external help entries, that means the help -entry has only a reference pointing to a HTML/PHP page that offers the help entry. +The array that is returned by the get_help function must follow the +below described syntax. Fields marked REQUIRED are neccessary +under any circumstances. Fields marked OPTIONAL may be left out +when not needed.
+There are basically two different types of help entries that can be +used. Internal help entries, that means the headline, text, etc is +included in the help entry or external help entries, that means the +help entry has only a reference pointing to a HTML/PHP page that offers +the help entry.
-


4.1. Internal help entries

-ext (REQUIRED) -
Must be FALSE in this case. -

-Headline (REQUIRED) -
The headline of this help entry. Can consist of any alpha-numeric characters. No HTML/CSS -elements are not allowed here. -

-Text (REQUIRED) -
The text of this help entry. Can constist if any alpha-numeric characters and can contain -placeholder for variables passed to this help entry. The placeholder must follow the syntax for -placeholder defined by the PHP printf function. HTML/CSS elements are allowed here as long -as they follow the XHTML1.0 Strict specification.

-When placeholders are included you can submit the values that should be displayed there as arguments -when calling the templates/help.php file. There they are attached as var1, var2 -and so on. The names must follow the following rules:
+


+4.1. Internal help entries

+ext (REQUIRED)
+Must be FALSE in this case. +
+
+Headline (REQUIRED)
+The headline of this help entry. Can consist of any alpha-numeric +characters. No HTML/CSS elements are not allowed here. +
+
+Text (REQUIRED)
+The text of this help entry. Can constist if any alpha-numeric +characters and can contain placeholder for variables passed to this +help entry. The placeholder must follow the syntax for placeholder +defined by the PHP printf function. HTML/CSS elements are +allowed here as long as they follow the XHTML1.0 Strict specification.
+
+When placeholders are included you can submit the values that should be +displayed there as arguments when calling the templates/help.php +file. There they are attached as var1, var2 and so on. +The names must follow the following rules:
    -
  • 1. They must be named var$i where $i is any positive number except the '0'.
  • -
  • 2. This number ($i) must either be '1' or $i -1 must be present.
  • +
  • 1. They must be named var$i where $i is any positive +number except the '0'.
  • +
  • 2. This number ($i) must either be '1' or $i -1 must be present.

-SeeAlso (OPTIONAL) -
An array of references to anonther related subjects. Each row of the array must contain a field -called "text" with the text that should be displayed and may contain a field called "link" which is used -as value for the href attribute of a HTML tag when set. +SeeAlso (OPTIONAL)
+An array of references to anonther related subjects. Each row of the +array must contain a field called "text" with the text that should be +displayed and may contain a field called "link" which is used as value +for the href attribute of a HTML
tag when set.
-


4.2. External help entries

-ext (REQUIRED) -
Must be TRUE in this case. -

-Link (REQUIRED) -
The complete filename of the file stored under the help/ directory which should be displayed -when this help entry is called. +
+


+4.2. External help entries

+ext (REQUIRED)
+Must be TRUE in this case. +
+
+Link (REQUIRED)
+The complete filename of the file stored under the help/ directory +which should be displayed when this help entry is called. +