Attributes
Configuration file: use White-Pages' local configuration file
To configure how LDAP attributes are displayed or searched, use the $attributes_map
parameter which is an array of arrays, with this structure:
- $attributes_map:
- item: item identifier
attribute
: name of LDAP attribute, in lower casefaclass
: name of Font Awesome icon classtype
: type of attribute (see below)
The following table shows how type
are used:
Type | Display | Search | Substring matching |
---|---|---|---|
text | Simple text | Text input | Yes |
mailto | Link mailto | Text input | Yes |
dn_link | Link on user entry | Text input | No |
group_dn_link | Link on group entry | Text input | No |
usergroup_dn_link | Link on user or group entry | Text input | No |
boolean | “Yes” or “No” | Select | N/A |
date | Formatted date | Calendar (“from” and “to”) | N/A |
tel | Link tel (click to call) | Text input | Yes |
guid | Simple text (objectGUID converted to string) | Text input | No |
Example:
$attributes_map = array( 'businesscategory' => array( 'attribute' => 'businesscategory', 'faclass' => 'briefcase', 'type' => 'text' ), 'carlicense' => array( 'attribute' => 'carlicense', 'faclass' => 'car', 'type' => 'text' ), 'created' => array( 'attribute' => 'createtimestamp', 'faclass' => 'clock-o', 'type' => 'date' ), );
To add a new definition to existing ones:
$attributes_map['fax'] = array( 'attribute' => 'facsimiletelephonenumber', 'faclass' => 'fax', 'type' => 'text' );
You can translate attribute label by defining the
label_item
messages in custom lang file, for example:
$messages["label_fax"] = "Fax";
Don't forget to put your LDAP attribute in lower case !