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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta content="text/html; charset=ISO-8859-15" http-equiv="content-type"><title>Tools</title>
<link rel="stylesheet" type="text/css" href="style/layout.css">
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"></head><body>
<h1 style="text-align: center;">Tools<br>
</h1>
LAM includes a "Tools" page which contains various tools like the
profile editor or the file upload. The content of this page is dynamic.
LAM includes all *.inc files in the directory lib/tools. Each found
class which implements the LAMtool interface is a candidate for this
page. The different tools are displayed and ordered based on their
security level and ordering preferences.<br>
<br>
<span style="font-weight: bold;">Example:</span><br>
<br>
The profile editor implements the LAMtool interface.<br>
<br>
<table style="width: 100%; text-align: left;" class="mod-code" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="vertical-align: top;">/**<br>
* Profile editor<br>
* <br>
* @package tools<br>
*/ <br>
class <span style="font-weight: bold;">toolProfileEditor</span> implements <span style="font-weight: bold;">LAMTool</span> {<br>
<br>
/**<br>
* Returns the name of the tool.<br>
* <br>
* @return string name<br>
*/<br>
function <span style="font-weight: bold;">getName</span>() {<br>
return _("Profile editor");<br>
}<br>
<br>
/**<br>
* returns a description text for the tool.<br>
* <br>
* @return string description<br>
*/<br>
function <span style="font-weight: bold;">getDescription</span>() {<br>
return _("Here you can manage your account profiles.");<br>
}<br>
<br>
/**<br>
* Returns a link to the tool page (relative to templates/).<br>
* <br>
* @return string link<br>
*/<br>
function <span style="font-weight: bold;">getLink</span>() {<br>
return "profedit/profilemain.php";<br>
}<br>
<br>
/** <br>
* Returns if the tool requires write access to LDAP.<br>
* <br>
* @return boolean true if write access is needed<br>
*/<br>
function <span style="font-weight: bold;">getRequiresWriteAccess</span>() {<br>
return true;<br>
}<br>
<br>
/**<br>
* Returns if the tool requires password change rights.<br>
* <br>
* @return boolean true if password change rights are needed<br>
*/<br>
function <span style="font-weight: bold;">getRequiresPasswordChangeRights</span>() {<br>
return true;<br>
}<br>
<br>
/**<br>
* Returns the link to the tool image (relative to graphics/)<br>
*<br>
* @return string image URL<br>
*/<br>
function <span style="font-weight: bold;">getImageLink</span>() {<br>
return 'edit.png';<br>
}<br>
<br>
/**<br>
* Returns the preferred position of this tool on the tools page.<br>
* The position may be between 0 and 1000. 0 is the top position.<br>
*<br>
* @return int preferred position<br>
*/<br>
function <span style="font-weight: bold;">getPosition</span>() {<br>
return 100;<br>
}<br>
<br>
}<br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
</body></html>
|