LDAP Address Book Icon

LDAP Address Book

Web-based LDAP address book browser/editor

Contents

  1. Getting Started Using the Address Book
    1. Mozilla Firefox Search Integration
    2. Google Chrome/Chromium Search Integration
  2. Installation and Basic Setup
    1. Upgrading from Previous Versions
    2. Installation on Linux: Apache HTTP Server on Debian/Ubuntu
    3. Installation on Windows: Apache HTTP Server or Microsoft IIS
    4. Set up access to the directory service
    5. What is an LDAP distinguished name (DN)?
      1. DNs as shown in Active Directory Users and Computers
      2. DNs as shown in Novell iManager or ConsoleOne
  3. Configuring Users and Permissions
    1. Require users to log in with a user name and password
    2. Only allow users in a paricular OU to log in
    3. Grant additional permissions to a specific user
    4. Grant permissions based on LDAP group membership
    5. Grant access to the Address Book based on LDAP group membership
    6. Deny access to the Address Book for a specific user
    7. Changing the user DN search behavior
  4. Customising the Address Book
    1. Changing the attributes shown for search results
    2. Applying language-specific sorting rules for search results
    3. Applying custom LDAP filters to directory browsing and searching
      1. Directory browsing
      2. Search results
    4. Changing the layout and attributes shown for directory entries
    5. Displaying thumbnail photos or logos when browsing/searching the directory
    6. Setting up phone numbers to be dialed when clicked on
    7. Changing the links shown in the page footer
    8. Changing the look and formatting of the address book
    9. Changing the country code interpretation
    10. Extending and modifying the schema
    11. Using auxiliary object classes
  5. Configuration Reference

Getting Started Using the Address Book

LDAP Address Book is a web application for browsing and searching for contact details within an LDAP directory service, allowing it to be used as an address book. It has been tested on the following LDAP directories:

Searching your LDAP address book is pretty easy. Just type in the name, job title or company of who you're trying to find into search box and click "Search" (or press Return). Alternatively if the directory has been classified into "organisational units" (OUs) you can click on the folders underneath the search box to browse records by department, building, etc.

How to Search or Browse the Address Book

You can add the LDAP Address Book as a search engine in Firefox, Google Chrome/Chromium and other OpenSearch compliant web browsers, allowing you to search more easily.

Mozilla Firefox Search Integration

To add the Address Book as a search engine in Firefox:

  1. Open web browser and navigate to the address book.
  2. Click the icon to the left of the search engine name in the search box.
  3. Select Add "Address Book" (or the name of your address book, if it has been changed from the default) from the menu.

Address book OpenSearch integration in Firefox

Google Chrome/Chromium Search Integration

To add the Address Book as a search engine in Google Chrome or Chromium:

  1. Open web browser and navigate to the address book.
  2. Chromium/Google Chrome will automatically add the LDAP Address Book to the available search engines.

To search the Address Book, first enter the first few characters of the site URL, then press Tab when prompted.

Selecting Address Book OpenSearch in Chromium Browser

Now enter the name you wish to search for.

Using Address Book OpenSearch in Chromium Browser


Installation and Basic Setup

The remainder of this document is aimed towards system administrators setting up and configuring LDAP address book on your network.

Upgrading from Previous Versions

The general method of upgrading to a new version of the Address Book is to replace the application's program files with those from the new release.

In many cases your previous configuration (stored in file config.php) can be reused with only minor changes (if any). Details of what needs to be done for each version can be found on the project Wiki:

https://sourceforge.net/p/ldap-addr-book/wiki/Home/

This information is available for version 0.10 onwards.

Installation on Linux: Apache HTTP Server on Debian/Ubuntu

Install Apache HTTP Server, together with PHP and PHP/LDAP integration:

apt-get install apache2 php5 libapache2-mod-php5 php5-intl php5-ldap

Decide where you want to store the address book web site's files and unpack the address book tar.gz file to the web site directory. For the purposes of this guide, this location is assumed to be /srv/www/addressbook.example.org and the URL of the address book http://addressbook.example.org/, in which case you might type:

mkdir -p /srv/www/addressbook.example.org
cd /srv/www/addressbook.example.org
tar xvzf ~/ldap-addr-book-0.02.tar.gz

Create the file /etc/apache2/sites-available/addressbook.example.org and add the following contents:

<VirtualHost *:80>
        DocumentRoot /srv/www/addressbook.example.org
        ServerAdmin webmaster@example.org
        ServerName addressbook.example.org

        ServerSignature email
        DirectoryIndex index.html index.php

        LogFormat "combined"
        TransferLog /var/log/apache2/addressbook.example.org-access_log
        ErrorLog /var/log/apache2/addressbook.example.org-error_log
</VirtualHost>

Enable the site by running the command:

a2ensite addressbook.example.org

Perform a graceful restart of Apache in order to re-read the configuration and make the new web site live:

apache2ctl graceful

Finally create a DNS record for the address book web site, e.g.:

addressbook.example.org.	IN	CNAME	myserver

Installation on Windows: Apache HTTP Server or Microsoft IIS

In outline, the procedure to set up the LDAP Address Book to run under Windows is as follows:

Set up access to the directory service

First, copy (or rename) the sample configuration file supplied with LDAP Address Book, config.php.sample to config.php.

Open the file in your preferred text editor and change the following settings to tell the application where your Address Book data is stored:

See the Configuration Reference section below for further information on these and other settings.

Note: Windows users may experience problems opening the config.php file using the default "Notepad" text editor. Try downloading and using Notepad++ instead, which should be able to open and edit the file correctly.

Some LDAP directory servers will allow limited read access without having to enter any user name or password (known as allowing "anonymous bind" access). If your directory is set up to allow this then you should be able to open the LDAP Address Book in your web browser and view its contents.

Note: Anonymous access may have very limited read permissions. Some attributes (e.g. telephone numbers) may appear blank unless you log in by name.

If anonymous access is not allowed then you'll get the message "Please log in to use the address book" when you open the LDAP Address Book in your web browser.

The LDAP Address Book will need at least one user login account on the directory service in order to access its contents. This can be either:

If you just want to get the LDAP Address Book up and running quickly, set up a new user account that provides read-only access to your directory, open the config.php in your preferred text editor and locate the following section:

$ldap_server->add_user("__ANONYMOUS__",
        array(
                // LDAP login (or bind DN) to connect to the directory
                //
                // If the LDAP server is set up to allow "anonymous bind"
                // then the the user name and password can be left blank,
                // otherwise replace with a "generic" user that has read
                // permission.

                "ldap_dn"=>"",
                "ldap_password"=>"",

                // Permissions granted to anonymous users:

                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true
        ));

Fill in the values of "ldap_dn" and "ldap_password" with the user account's DN and password. Once the details are correct you should be able to open the LDAP Address Book in your web browser and view its contents.

The section What is an LDAP distinguished name (DN)? (below) gives more information about LDAP DNs and how to fill in the ldap_dn setting correctly. It is also possible to configure individual logging in with individual user names and passwords - see Configuring Users and Permissions for more information.

What is an LDAP distinguished name (DN)?

You'll need to use LDAP distinguished names (DNs) in a few places when configuring the LDAP Address Book:

This section gives a brief overview of what a DN is and how to find which DNs to use when configuring the Address Book.

LDAP records are organised into a "directory information tree" (DIT) of categories and subcategories - similar to how files and folders (directories) are stored on a computer's hard disc.

Each record in the directory is identified by it's name and location within the tree - known as its "Distinguished Name" or DN. A distinguished name consists of a comma-separated representing the "navigation path" through the tree to the object. Here's an example:

CN=John Doe,OU=Friends,O=BigCorp

Each item in the list is represented by an attribute and its value. In the above example:

The attribute used to identify each item varies according to its type, for example:

Here's how to work out the DNs from the graphical admin tools for Microsoft Active Directory and Novell eDirectory.

DNs as shown in Active Directory Users and Computers

The Active Directory Users and Computers admin tool shows the LDAP directory tree in the left-hand panel of its window. Icons are used to represent the type of each object.

Active Directory Users and Computers showing example AD domain layout

The top-level object shown in Active Directory Users and Computers is the domain. The name of the domain is shown as a series of elements separated by dots (e.g. turnersoft.co.uk), however this is not the domain's LDAP distinguished name. Each element of the domain name is represented as a separate domain component (DC) in LDAP notation:

DC=turnersoft,DC=co,DC=uk

The second-level elements within the domain include organizational units (shown with a folder icon overlaid with a book/grey blob) and containers (shown as a folder icon without a book).

The DN of the "Home" organizational unit in the above screenshot is:

OU=Home,DC=turnersoft,DC=co,DC=uk

If you wanted the LDAP Address Book to show only the contents of the "Home" organizational unit, you'd configure the $ldap_base_dn setting (in config.php) as follows:

$ldap_base_dn = "OU=Home,DC=turnersoft,DC=co,DC=uk";

Containers are similar to organizational units, but are named using their CN (common name) attribute. The DN of the "Users" container is:

CN=Users,DC=turnersoft,DC=co,DC=uk

Users are named using their CN (common name) attribute. For example, the DN of the Administrator user for this domain is

CN=Administrator,CN=Users,DC=turnersoft,DC=co,DC=uk

LDAP Address Book also allows you to specify an Active Directory user by their User Principle Name (UPN), i.e. their user login name followed by @ followed by the domain's DNS name (or other allowed UPN suffix, if any have been configured). This allows a user to be specified independently of its position in the directory information tree.

The Administrator user for this domain has the UPN:

Administrator@turnersoft.co.uk

DNs as shown in Novell iManager or ConsoleOne

The iManager and ConsoleOne admin tools also show the LDAP directory structure as a tree of objects. As with Active Directory Users and Computers, icons are used to represent the type of each object.

Novell iManager showing example eDirectory tree layout

The top-level object is the tree, which is not included in the LDAP DN. The DN of the "turnersoft" organization in the above screenshot is:

o=turnersoft

The DN of the "Home" organizational unit in the above screenshot is:

ou=home,o=turnersoft

Users are named using their CN (common name) attribute. For example, the DN of the "admin" user for this tree is:

cn=admin,o=turnersoft


Configuring Users and Permissions

The LDAP address book supports logging in with named user accounts. Typically, this is used by administrators who are permitted to edit the address book contents, or if you need to limit browsing/searching access to known users.

Once per-user access has been set up, users can log in with their own user names and passwords by clicking the "log in" link in the top-right corner of each page. (This link is not displayed if only anonymous access has been configured.)

Log In link - Visible when per-user login enabled

User login names, passwords and permissions are taken from the LDAP directory itself rather than the address book application.

LDAP does not provide any (standard) way of retreiving a user's permissions, so the $ldap_server->add_user() configuration command should be used to tell the Address Book which facilities should be made available to each user. within the back-end directory.

Three types of user mapping can be defined:

The following settings can be applied to each user map entry in order to enable or disable various features of the address book. To use each feature, the necessary permissions will also need to be granted within the back-end directory.

SettingDescription
ldap_dnSpecifies the LDAP DN (or alternatively the UPN when used with Active Directory) used to log in to the directory. The token __USERNAME__ will be replaced by the actual user name as typed into the login dialogue. If not set then the Address Book will search for the user's DN automatically.
ldap_passwordSpecifies the password to be used when connecting to the directory. This is only used for the __ANONYMOUS__ user.
allow_browseAllows the user to browse through organisational units (folders) within the address book.
allow_createAllows the user to create new records within the address book. They will also need to be granted allow_edit in order to populate and save the new record's attributes.
allow_deleteAllows the user to delete records within the address book.
allow_editAllows the user to edit records within the address book.
allow_edit_selfAllows the user to edit only their own record within the address book.
allow_searchAllows the user to search the address book directory tree.
allow_viewAllows the user to click on a record to see full details
allow_exportAllows the user to save/export (individual) records as vCard electronic business cards.
allow_export_bulkAllows the user to export entire OUs of records (or the complete address book) in vCard format, for example to import into another address book or contact database that doesn't support LDAP directly.
allow_folder_infoAllows the user to view and (if allow_edit is also granted) edit folders, OUs and other container objects.
allow_loginAllows the user to log in to the directory. This permission is granted automatically if not specified explicitly.
allow_ldap_pathAllows the user to see the location of the current entry in the "navigation path" at the top of the screen. This permission is granted automatically if not specified explicitly.
allow_system_adminAllows the user to see LDAP server information (root DSE record) and access records other than those under $ldap_base_dn.
display_all_records_by_defaultDisplays a list of all searchable records by default, rather than the objects located directly under $ldap_base_dn.

Require users to log in with a user name and password

The following example shows how to grant all logged in users permission to browse, search or view the Address Book (assuming the __ANONYMOUS__ user has been disabled or removed from the configuration):

$ldap_server->add_user("__DEFAULT__",
        array(
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true
        ));

Only allow users in a paricular OU to log in

The following example shows how to allow only those users in a particular OU to log in to browse, search or view the Address Book:

$ldap_server->add_user("__DEFAULT__",
        array(
		"ldap_dn"=>"cn=__USERNAME__,dc=home",
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true
        ));

Grant additional permissions to a specific user

The following example shows how to grant additional permissions to a specific user. The user name "admin" will be logged in using with Active Directory UPN Administrator@example.org (the default domain administrator).

$ldap_server->add_user("__DEFAULT__",
        array(
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true,
                "allow_folder_info"=>true
        ));
$ldap_server->add_user("admin",
        array(
                "ldap_dn"=>"Administrator@example.org",
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true,
                "allow_create"=>true,
                "allow_edit"=>true,
                "allow_delete"=>true,
                "allow_export"=>true,
                "allow_export_bulk"=>true
        ));

Permissions granted to a user by name will be used instead of the __DEFAULT__ permissions. In the above example, admin will not receive the allow_folder_info permission.

Grant permissions based on LDAP group membership

Permissions can be granted to an LDAP group using the $ldap_server->add_group() configuration command. Members of the group will receive the group's permissions. In the following example, logged in users will receive permissions to browse, search and view the Address Book. Users who are members of the Address Book Admins are also granted permission to create, edit and delete records.

$ldap_server->add_user("__DEFAULT__",
        array(
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true
        ));

$ldap_server->add_group("cn=Address Book Admins,ou=HR,o=BigCorp",
        array(
                "allow_create"=>true,
                "allow_edit"=>true,
                "allow_delete"=>true
        ));

Alternatively, permissions can be granted according to LDAP group membership by specifying the group name as the permission's value. The following example shows how to use this method:

$ldap_server->add_user("__DEFAULT__",
        array(
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true,
                "allow_create"=>"cn=Address Book Admins,ou=HR,o=BigCorp",
                "allow_edit"=>"cn=Address Book Admins,ou=HR,o=BigCorp",
                "allow_delete"=>"cn=Address Book Admins,ou=HR,o=BigCorp"
        ));

Note:

The $group_member_attributes setting is used to define which attributes of a group are checked in order to determine whether the user is a member:

$group_member_attributes = array("member","roleOccupant","memberUid");

The various group membership attributes allows different types of object to be used to represent roles and permissions:

Group Member Attribute Used to Check Membership Of
member groupOfNames, group (Active Directory)
roleOccupantorganizationalRole
memberUid posixGroup

Grant access to the Address Book based on LDAP group membership

The allow_login permission can be used to decide whether users will be allowed to log in to the address book. It is automatically granted if not explicitly defined. The following example shows how to grant login permission based on group membership:

$ldap_server->add_user("__DEFAULT__",
        array(
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true,
                "allow_login"=>"cn=Address Book Users,ou=HR,o=BigCorp"
        ));

Deny access to the Address Book for a specific user

A specific user can be prevented from accessing the address book (whilst continuing to allow others to log in) by setting their "allow_login" permission to "false". For example, the following might be used to prevent the directory's top-level administrative account from being (mis)used to browse the address book:

$ldap_server->add_user("Administrator",array("allow_login"=>false));

Changing the user DN search behavior

The LDAP Address Book searches the directory in order to determine a user's DN during the login process.

By default, the Address Book will search for login user accounts in the same area of the directory as the address book data (i.e. under the location indicated by $ldap_base_dn). If you wish to store the login accounts in a different location outside of this area (e.g. for security reasons) then the setting $ldap_server->dn_search_base can be used:

$ldap_server->dn_search_base = "CN=Users,DC=example,DC=org";

Searching is carried out using an anonymous connection by default. The $ldap_server->dn_search_user and $ldap_server->dn_search_password settings can be used to specify a different account to use when searching for a user's DN:

$ldap_server->dn_search_user = "CN=ldap-browse,OU=Service Accounts,DC=example,DC=org";
$ldap_server->dn_search_password = "foobar";

Customising the Address Book

Changing the attributes shown for search results

The fields/attributes that are used when searching can be customised by editing the contents of $search_ldap_attrib in the configuration file. The default setting is:

$search_ldap_attrib = array(
        "cn","mail","sn","displayName","company","title");

...which searches the following set of attributes:

AttributeDescription (typical usage)
cnName of the directory entry itself (usually a person's full name or "common name")
mailE-mail address
snSurname
displayNamePerferred display version of user's name. Some users may prefer informal versions of their name (e.g. "Andy" instead of "Andrew"), which would be represented here.
companyCompany name
titleJob title

See your directory service's schema documentation for other attributes which are available to be searched.

The columns that appear in search results can be changed by editing the contents of $search_result_columns in the config file.

The special attribute sortableName can be used to display a "sort-friendly" version of a personal name (Surname, Firstname) where this information is available. (This is constructed from the sn and givenName attributes if populated, otherwise falling back to displayName and cn.)

Applying language-specific sorting rules for search results

Certain languages and countries have their own specific sorting rules (e.g. the sequence in which alphabetic characters follow each other). Where necessary, these rules can be selected through the $lc_collate setting in config.php:

$lc_collate = "<language>[_<territory>][.<codeset>][@<modifier>]";

In practice neither the code set or modifier are widely used, and in most cases only the language and territory need to be defined, for example:

$lc_collate = "en_US";

(a code set of UTF-8 will be assumed automatically.)

Applying custom LDAP filters to directory browsing and searching

If is possible to customise the LDAP queries which are used to fetch data from the directory, for example to display only records which have specific object classes or meet some other criteria.

Sites with Microsoft Active Directory/Exchange may wish to set up custom filters that test the msExchHideFromAddressLists and/or showInAddressBook attributes in order to exclude those entries which are hidden from Exchange's Global Address Book (GAL).

Directory browsing

When the user browses through the directory tree directory, the address book retrieves all records at the user's location (LDAP base search) that match the criteria specified by $browse_ldap_filter in config.php. The default LDAP filter is as follows, which allows all objects to be displayed:

$browse_ldap_filter = "objectClass=*";

Search results

Searches results are retrieved by carrying out an LDAP subtree search from the root of the address book (as specified in $ldap_base_dn). The expression to be searched for is based on the value of $search_ldap_filter in config.php. The default LDAP filter is as follows, which limits search results to objects representing people:

$search_ldap_filter = "(&(objectClass=person)___search_criteria___)";

The token ___search_criteria___ will be replaced with an expression to search the attributes listed in $search_ldap_attrib for the string entered by the user. For example if the user searched for "smith", the token would be replaced by:

(|(cn=smith)(mail=smith)(sn=smith)(displayName=smith)(company=smith)(title=smith))

To allow all object types to appear in search results, including organisational units (which typically do not have a cn attribute set), make the following changes to config.php:

Changing the layout and attributes shown for directory entries

You may want to customise the way in which address book entries are displayed - which fields/attributes are used and how they are laid out. If you wish, you can specify a different layout for each type of record.

As shipped, a default layout is provided which displays the address book entries in three "sections":

Default address book layout, with personal, business/work and additional notes sections

This layout is created by the configuration shown below. The layout will be used when displaying inetOrgPerson, user or contact records. Specifying * instead of a list of object classes means that the layout should be applied for all types of record (unless overridden by another definition applying to a specific record type). The layout itself is described as a comma-separated list of arrays.


$ldap_server->add_display_layout("inetOrgPerson,user,contact",array(
        array("section_name"=>"Personal",
                "attributes"=>array(
                        array("givenName",                      "Given Name",           "contact24.png","allow_view"=>false),
                        array("sn",                             "Surname",              "contact24.png","allow_view"=>false),
                        array("cn",                             "Full Name",            "contact24.png","allow_view"=>false),
                        array("displayName",                    "Preferred Name",       "contact24.png"),
                        array("mail",                           "E-mail",               "mail.png","allow_edit"=>false),
                        array("homePhone",                      "Home Phone",           "landline-phone.png"),
                        array("mobile",                         "Mobile Phone",         "cell-phone.png"),
                        array("wWWHomePage",                    "Web Page",             "internet.png"),
                        array("streetAddress:l:st:postalCode",  "Postal Address",       "address.png"),
                        array("c",                              "Country",              "country.png")
                        )
                ),

        array("section_name"=>"Business/Work","width"=>"50%",
                "attributes"=>array(
                        array("company",                        "Company",              "company.png"),
                        array("url",                            "Web Page",             "internet.png"),
                        array("telephoneNumber",                "Office Phone",         "landline-phone.png"),
                        array("facsimileTelephoneNumber",       "Office Fax",           "fax.png"),
                        array("title",                          "Job Title",            "org-role.png"),
                        array("department",                     "Department",           "org.png"),
                        array("physicalDeliveryOfficeName",     "Office",               "office.png"),
                        )
                ),

        array("section_name"=>"Additional Notes","new_row"=>true,"colspan"=>2,
                "attributes"=>array(
                        array("info")
                        )
                )
        ));

The givenName, sn and cn fields will not be visible except while the record is being edited. The mail field will be read only, and cannot be edited by end users.

Note: Some attributes must always be filled in with a value, for example many LDAP directories require record types representing a person to have the surname (sn) attribute filled in. If you want to be able to create new records through the Address Book then these attributes must be included in your directory entry layout so that users can fill them in.

You can define the following settings for each section:

SettingDescriptionDefault if not set
section_name Title to appear above the section. Title is not shown.
new_row Whether or not this section should start on a new row.
In the default setup the "Business/Work" section has "new_row"=>false set, so it is displayed to the right of "Personal" on the same row. "Additional Notes" has "new_row"=>false set, so appears on its own row below the previous sections.
Assumed to be false
width Width of the section, specified as a number followed by any of the following measurement units (which are those supported by the CSS standard):
  • % - percentage of the available width
  • px - pixels
  • em - current font size (traditionally the width of the letter "m" in the font)
  • ex - half current font size (traditionally the height of the letter "x" in the font; or the distance between the font baseline and median)
  • cm - centimetres
  • mm - millimetres
  • in - inches
  • pt - points (1/72 of an inch)
  • pc - picas (1/6 of an inch, or 12 points)
In the default setup the width of "Business/Work" is set to "50%". Any sections on the same row that don't have a specified width will automatically use up the remaining space.
User's browser divides up the available width based on amount of data to be shown in each section
colspan Number of HTML table columns that this section should span.
In the default setup the "Additional Notes" section has "colspan"=>2 set, so spans the width of both the "Personal" and "Business/Work" columns.
Assumed to be 1
attributes List of attributes to appear in the section. (always required)

Each attribute is described by either three or four items:

  1. The name of the LDAP attribute (or list of attributes) to be displayed
  2. The caption text to appear next to the attribute (or leave empty - "" - for no caption)
  3. Icon image to appear next to the attribute (or leave empty for none)
  4. Whether the attribute should be visible only while the record is being edited

A display field can be constructed from several LDAP attributes. To construct a field from multiple attributes, list the attributes in turn, separating them with one of the following symbols:

SymbolMeaning
:Separate attributes with a line break
+Separate attributes with a space

This facility is often used to display the lines of an address. (If the address attributes in your LDAP directory are used to store business addresses rather than personal addresses you may want to relocate the "Address" field from the "Personal" to the "Business/Work" section of the display.)

The following changes will be applied automatically:

More information about displaying images can be found in the following section.

Displaying thumbnail photos or logos when browsing/searching the directory

By default, directory entries are displayed next to an icon representing their object class. Alternatively, the address book can be set to display an image - typically a photo or logo - representing the object instead. These images are retrieved from the following LDAP attributes (listed in order of priority):

AttributeDescription
jpegPhotoUsed to store one or more images of a person using the JPEG File Interchange Format. (Standard ref: IETF RFC 2798) In practice the Address Book will only display the first stored image.
thumbnailPhotoStores a single thumbnail image, maximum size 100K. (Non-standard/Microsoft specific)
thumbnailLogoStores a single thumbnail image, maximum size 32K. (Non-standard/Microsoft specific)

The LDAP Address Book can also display PNG, GIF, WBMP, and GD2 images stored in these attributes, although JPEG is recommended in all cases. (WBMP is not the same thing as Microsoft Windows BMP, which is not supported.) Your PHP installation must have GD Graphics Library support enabled in order to display image attributes.

To display thumbnail photos/logos instead of "generic" icons, set one or both of the following options in config.php:

SettingDescription
$enable_search_browse_thumbnail = true; Display thumbnail photos when browsing and in search results
$enable_ldap_path_thumbnail = true; Display thumbnail photo in detail view navigation path

Beware that setting $enable_search_browse_thumbnail = true can result in slow page loading if there are a large number of images to be displayed.

A larger version of these images can be shown on the entry's detailed view by adding the jpegPhoto and/or thumbnailPhoto to the display layout (as described in the previous section). The following settings control the image size:

SettingDefault valueDescription
$thumbnail_image_size 24x24 Size of thumbnail images displayed in search results and/or detail view navigation path, measured in pixels. For optimal layout the size should be the same as the icons used to represent object schema classes (24x24 as shipped).
$photo_image_size 96x96 Size of large images displayed in detail view, measured in pixels. Set this value to an empty string (or leave undefined) to disable scaling of these images.

Android devices (at least as of version 4.4) will display the logo in preference to the photograph wherever a contact record includes both. To omit the logo from any records that have a photo (so that the photo will be used) when saving as vCard, set the following option in config.php:

$exclude_logo_if_photo_present = true;

Setting up phone numbers to be dialed when clicked on

Phone numbers appearing in the directory can be set to be displayed as HTML links rather than plain text, usually so that the number will be dialed when clicked on. The way that phone numbers are converted into URLs can be configured via the $phone_number_link_template setting in order to support different types of "click-to-dial" software.

The following setting allows many mobile phone browsers and other platforms that have built-in phone support to dial a number when clicked on:

$phone_number_link_template = "tel:___phone_number___";

The following setting will enable phone numbers to be dialed using Microsoft Skype or other software that handles the (non-standard) callto: URI scheme:

$phone_number_link_template = "callto://___phone_number___";

The following settings show how to place a call by passing the phone number to a separate web application such as Cisco WebDialer:

$phone_number_link_template = "https://cucm01/webdialer/Webdialer?destination=___phone_number___";
$phone_number_link_target = "_blank";

If defined, the $phone_number_link_target setting can be used to force the dialer application to open in a separate window/tab.

Changing the links shown in the page footer

The links shown in the page footer can be changed using the $site_footer_links option in config.php. The default set of links are defined as follows:

$site_footer_links = array(
        array("url"=>"doc/","text"=>"User Guide"),
        array("url"=>"https://sourceforge.net/projects/ldap-addr-book/",
                "text"=>"Get Source Code")
        );

Each link is represented by an array containing its URL and the name/label text to be displayed.

Note: The application's software license requires that you provide users with a means of obtaining a copy of the source code. As such you are recommended not to remove the "Get Source Code" link from the footer, although you may change it to a more appropriate URL where necessary (e.g. to a copy containing your own local changes, or if users have only limited connectivity to the external Internet that would prevent them from accessing the default location.)

Please see the license agreement for full information.

Changing the look and formatting of the address book

The appearance (such as font, text size, colours, etc) of the address book is defined in the file styles.css.

Take a look at the stylesheet file (styles.css)

You can change any of these settings (or add your own) by creating your own stylesheet file, called styles_local.css and adding your changes to it. (Although you could modify styles.css directly it will be easier to upgrade to future versions of the address book if you keep your changes separate by using styles_local.css instead.)

The stylesheet file is made up of selectors which specify which part of the user interface is to be changed, followed by style directives surrounded by {...} to define how it should appear. For example, if you wanted to dispay the address book in a different font you might add the following to your own styles_local.css file and change the font-family setting to your own choice of font:

body,table,textarea {
        font-family:serif;
}

Where you don't redefine a setting in styles_local.css (such as font-size:10pt in this example) the value from styles.css will continue to be used.

The following table summarises the CSS selectors used within styles.css and which part of the address book's appearance they affect:

CSS SelectorTypically used to change the font, size, colour, etc, of...
body,table,textarea The address book as a whole.
.ldap_navigation_path li:first-child The address book title, which is shown as the left-most item in the "Navigation Path" shown at the top of each page.
.ldap_navigation_path li+li:before Organisational units, folders, etc, shown in the "Navigation Path" at the top of each page. The left-most element of the navigation path (typically used to show the address book title) is styled separately, described above.
.page_footer Page footer.
.ldap_entry_viewer_section .column_header,
.search_results_viewer .column_header
Column headers/titles used in search results and directory entries.(*)
.ldap_entry_viewer_section td,
.search_results_viewer td
Data displayed in search results and directory entries.(*) Note: The appearance of LDAP attributes can be customised individually, as described below.
.ldap_entry_viewer_section th Name/label text that appears to the left of each attribute shown in a directory entry.

(* These may be split into two separate style declarations if you want to customise the search results and directory entry detail pages separately.)

You can also change the way in which an individual LDAP attribute is displayed by applying style directives to .ldap_attribute_<attrib>, where <attrib> is the attribute to be customised.

For example, adding the following to styles_local.css will cause home telephone numbers (stored in the homePhone attribute) to be displayed in italic:

.ldap_attribute_homePhone
{
        font-style:italic;
}

As a further example, adding the following to styles_local.css will display SSH public keys (stored in the sshPublicKey attribute) to be displayed in a fixed-width font and word-wrapped more appropriately:

.ldap_attribute_sshPublicKey
{
        font-family:monospace;
        word-break:break-all;
}

Changing the country code interpretation

Country codes in LDAP directories normally follow the ISO 3166 standard. The $country_code_standard setting in config.php contains a comma-separated list of which parts of the standard should be used by the Address Book. By default, only the ISO 3166-1 alpha2 officially assigned codes will be used:

$country_code_standard="official";

If your records use country codes for countries which have since been renamed or are no longer in existance, you may want to enable additional parts of ISO 3166, for example:

$country_code_standard="official,transitional,former";

This will enable the correct country names to be displayed, and for the older country codes to be selected from drop-down lists. The following table summarises the available country code standards:

Country Code SettingDescription
official ISO 3166-1 Officially Assigned Codes
user ISO 3166-1 User-Assigned Codes

Country codes that have been reserved for organisations that use ISO 3166 to add further codes to their in-house implementations. Several of the more widely used/known country codes are listed by name.

exceptional ISO 3166-1 Exceptional Reservations

Reserved at the request of national ISO member bodies. Usage other than for the specific purpose which justified the reservation is discouraged. (See comments against each exceptional reservation in file lib/country.php for individual explanations.)

transitional ISO 3166-1 Transitional Reservations

Former official ISO 3166-1 country codes, reserved against reassignment (typically for 50 years) whilst existing historical use are gradually phased out. These are also listed in ISO 3166-3 as former country codes.

indeterminate ISO 3166-1 Indeterminate Reservations

International vehicle registration codes, reserved against reuse in ISO 3166-1 for an indeterminate period until existing historical uses have been sufficiently phased out.

former ISO 3166-3 Formerly Assigned Codes

Previously assigned ISO 3166-1 alpha2 codes for countries that are no longer in existance.

The following alternative (non-standard) coding schemes are also supported if needed for specialist and/or legacy applications:

Country Code SettingDescription
wipo WIPO ST.3 Country Codes

Broadly similar to ISO 3166-1 alpha2 official assignments, but also includes codes which represent intellectual property organisations that participate in WIPO.

Several countries which appear in ISO 3166-1 (2013 ed.) are omitted from WIPO ST.3 - most likely because they are not autonomous for patent treaty purposes or otherwise not recognised by WIPO:

AQ AS AX BL CC CX FM GF GP GU HM IO MF MH MQ
NC NF NU PF PM PN PR PS RE SJ TF TK UM WF YT

ISO has agreed not to assign country codes which conflict with the WIPO participants, so the Address Book can use both ISO and WIPO standards together, e.g. by setting the country code standard to official,wipo.

(ISO have also agreed not to us "EF", which represented an older European patent treaty area, now superceded by "EP".)

fips FIPS 10-4 Country Codes

Country codes used by the US Government and agencies prior to September 2008, when the standard was withdrawn and ISO 3166 adopted in its place. It's coding is substantially different from ISO 3166, and the two standards cannot be used meaningfully together.

Extending and modifying the schema

The schema is a set of information which the Address Book uses to display and edit the different types of records. The schema information is stored inside the Address Book's schema subdirectory. The set of files that is loaded and used depends on the server type and/or on additional entries in the configuration file. The default set schema files used for each server type are:

Server typeSchema configuration files used
admicrosoft
edirnovell
openldapcore, cosine, inetorgperson
custom(none)

You can load an additional schema file using $ldap_server->add_schema() from the configuration file. For example, the following commands will connect to an OpenLDAP server and allow objects and enable the Mozilla Address Book schema to be used (and displayed correctly) in addition to the defaults (core, cosine and inetorgperson):

$ldap_server = new ldap_server("openldap","ldap.example.org");
$ldap_server->add_schema("mozilla");

The following schema files are supplied with the Address Book. (Future versions may include additional files.)

Schema FileDescription
core Basic objects and attributes which make up the directory structure (such as definitions of person or surname). Adapted from on X.500 directory standards, described in IETF's RFC 2252 and RFC 2256.
cosine Additional objects/attributes which were identified and adopted as a result of the COSINE (Co-operation and Open Systems Interconnetion in Europe) initiative's PARADISE directory pilot project in the early 1990s. Described in IETF RFC 1124 (and its successors).
dhcp Allows the Address Book to be used to manage the Internet Software Consortium DHCP Server (dhcpd). This also allows a pair of DHCP servers to be set up as a failover cluster, sharing configuration and IP address lease data through an LDAP directory.
inetorgperson Enhanced object class for recording details of a person in an "organizational context" (e.g. a member of staff) on an Internet/Intranet directory. Described in IETF RFC 2798.
microsoft Objects and attributes used in Microsoft Active Directory ("AD"). These include redefinitions of Core, COSINE and inetOrgPerson (often with subtle differences) together with numerous Microsoft-specific classes.
mozilla Extends inetOrgPerson for storing additional attributes used by the address book feature of Mozilla Thunderbird and related products.
nis Allows the Address Book to manage a Network Information Service (NIS) server that has been set up to store its configuration data in LDAP. This is typically used for centrally managing UNIX/Linux-type operating systems on a network.
novell Objects and attributes used in Novell eDirectory (formerly called Novell Directory Services, NDS). These include redefinitions of Core, COSINE, NIS and inetOrgPerson (often with subtle differences) together with numerous Novell-specific classes.
openldap Versions of the organisation, OU and Internet/intranet organisational person objects with additional attributes, as used in the OpenLDAP Project's own directory schema.
oracle Objects and attributes used to store information about Oracle databases and services in a central directory. Oracle clients can look up this information via LDAP instead of a locally-stored tnsnames.ora file on each machine.
ppolicy Defines objects for storing an LDAP directory's password policy within the directory itself. Administrators of OpenLDAP servers can configure the ppolicy overlay module to read these records and apply the policy settings.
schac Objects and attributes used to represent personal records in educational institutions (Schema for Academia).

Defining your own objects and attributes

Unless configured otherwise, the Address Book will display unrecognised object and attribute classes as follows:

This default behavior can be modifed and extended by defining the object or attribute class (or enabling a schema file that defines it).

The following example shows how to define a container object class (similar to the one defined in the microsoft schema). The class which should appear as a folder - similar to an OU - so that users can navigate into it and see further objects inside. Users with allow_create permission should be able to create container objects from within the Address Book's user interface:

$ldap_server->add_object_class("container",array(
	"icon"=>"folder.png",
	"is_folder"=>true,
	"display_name"=>"Container",
	"can_create"=>true)
	);

The following example defines sshPublicKey as a multi-valued text attribute (data type text_list) intended to hold a list of the user's SSH public keys.

$ldap_server->add_attribute_class("sshPublicKey",array(
	"data_type"=>"text_list",
	"display_name"=>"SSH Public Key")
	);

Existing object and attribute classes can be deleted as follows:

delete_object_class($name);

delete_attribute_class($name);

(The main use of this is to delete an existing class so that you can redefine it with different settings.)

Object class schema settings

The following settings can be used in object class definitions:

SettingDefaultDescription
icongeneric24.pngFilename of an icon image to appear next to objects of this class
is_folderfalseWhether the object class should be displayed as a folder
display_name(class name)Display name of the object class
can_createfalseWhether objects of this class can be created frmo within the address book
rdn_attribcnAttribute which should be used as the RDN
required_attribs(none)Comma-separated list of attributes which are not permitted to be empty

The attribute used in the object's name (the RDN attribute) must always have a value and does not need to be listed in required_attribs.

Attribute class schema settings

The following settings can be used in attribute class definitions:

SettingDefaultDescription
data_typetextData type of this attribute (as per below)
display_name(class name)Display name of the attribute class

Attribute data types

The following values can be used in an attribute class's data_type setting in order to indicate the type of data and how it should be displayed/edited:

Data TypeDescription
ad_group_typeActive Directory group type and scope (microsoft schema)
country_codeCountry code
dateDate.
date_timeDate and time
dn_listList of other objects in the directory, e.g. group members
genderGender
imageImage
phone_numberPhone number
postcodePost code
textSingle line of text
text_areaMulti-line text value (e.g. notes)
text_listList of text values
use_html_mailBoolean, presented as a choice whether HTML mail is prefered (mozilla schema)
yes_noBoolean, presented as a yes/no choice

Using auxiliary object classes

Auxiliary object classes can added to an LDAP record in order to extend its capabilities. For example, the simpleSecurityObject auxiliary class can be added to a contact object. This adds a new attribute for storing a password, allowing the record to be used as a user account for logging into the LDAP directory or an LDAP-enabled applications.

Display layouts can be defined for auxiliary classes in the same way as "normal" object classes. Adding the following setting to the configuration file (config.php) will cause the LDAP Address Book to show auxiliary class layouts automatically whenever it displays an object that uses them:

$append_auxiliary_layouts = true;

Auxiliary class layouts are shown after the object's main display layout. A warning message will be displayed if LDAP Address Book encounters an auxiliary class that does not have any display layout defined.

Current versions of the LDAP Address Book cannot add or remove auxiliary classes from a record.


Configuration Reference

SettingDescription
$site_nameSite name, which appears in the browser title bar. You may want to customise this, e.g. with your company name.

Example:
$site_name = "BigCorp Address Book";

$site_footer_linksList of links that appear in the footer of each page.
 
Example:
$site_footer_links = array(
        array("url"=>"doc/","text"=>"User Guide"),
        array("url"=>"https://sourceforge.net/projects/ldap-addr-book/",
                "text"=>"Get Source Code")
        );
Connection to LDAP Directory
$ldap_server Creates a connection to the LDAP server holding the address book data. The following information needs to be provided about the server:
  • LDAP server type. The following values are accepted:

    ad - Microsoft Active Directory (or Samba 4 Active Directory)
    edir - Novell eDirectory
    openldap - OpenLDAP (core/inetorgperson schema)

  • Host name, port number or LDAP URL (or several, separated by spaces)

  • Port number (optional)

Examples:
$ldap_server = new ldap_server("openldap","ldap.example.org");
$ldap_server = new ldap_server("openldap","ldap.example.org ldap-backup.example.org"); - fail over to a backup LDAP server if first is not available
$ldap_server = new ldap_server("openldap","ldapi://",0); - connect to local server via a UNIX domain socket

Active Directory-specific Options:

(1) As an alternative to giving the name of a specific server (domain controller) you can specify just the domain name. This will load balance the connections across the available domain controllers. (See Microsoft KB 842197 for further information on how to use DNS netmask ordering for more fine-grained control of the servers used for load balancing.)

(2) For multi-domain forests, specify the LDAP port number as 3268 in order to use the AD Global Catalogue. (By comparison, using the default LDAP port (389) will return incomplete information other than for the local AD domain.)

$ldap_server = new ldap_server("ad","example.org"); - load balances across the DCs as listed in DNS
$ldap_server = new ldap_server("ad","dc1.example.org",3268); - use AD global catalogue port

For further information, see: http://www.php.net/manual/en/function.ldap-connect.php

$ldap_base_dnSpecifies the search base within the directory which will be used for displaying the address book. Rather than searching the whole directory, you can use this option to restrict search results to only a specific part of the directory tree which contains the user accounts or contacts.

Examples:
$ldap_base_dn = "dc=example,dc=org";
$ldap_base_dn = "ou=Users,dc=example,dc=org";

Syntax where one of the OU names contains a space:
$ldap_base_dn = "ou=User Accounts,dc=example,dc=org";

$ldap_server->dn_search_base Specifies the search base within the directory for looking up a potential user's DN during the login process.

Example:
$ldap_server->dn_search_base = "cn=Users,dc=example,dc=org"

$ldap_server->dn_search_user Temporary user name (bind DN) used by the address book software to search the LDAP directory for a user's DN when logging in. The corresponding password should be provided in $ldap_server->dn_search_password.

Examples:
$ldap_server->dn_search_user = "cn=LDAPUserLookup,cn=Users,dc=example,dc=org";
$ldap_server->dn_search_user = "cn=LDAPUserLookup,dc=MyDirectory";
$ldap_server->dn_search_user = "LDAPUserLookup@example.org"; - Active Directory specific syntax

If the directory is set up to allow read access without having to log on then just leave the user name and password blank (which will perform an "anonymous bind").

$ldap_server->dn_search_password Password corresponding to the account specified in $ldap_server->dn_search_user, which is used by the address book software to search the LDAP directory for a user's DN when logging in.

Example:
$ldap_server->dn_search_password = "password";

$ldap_server->add_user() Specifies the mapping between address book logins and the back-end directory when per-user authentication is enabled. (see Configuring Users and Permissions for further information.)
 
This setting can be repeated for however many user mappings need are needed.
 
Example:
$ldap_server->add_user("__ANONYMOUS__",
        array(
                "ldap_dn"=>"CN=ldap-browse,O=example",
                "ldap_password"=>"foobar",
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true
        ));
$ldap_server->add_user("__DEFAULT__",
        array(
                "allow_browse"=>true,
                "allow_search"=>true,
                "allow_view"=>true,
                "allow_create"=>true,
                "allow_edit"=>true,
                "allow_delete"=>true
        ));
(allows read-only access to anyone, log in by name in order to edit records)
$ldap_server->follow_referrals Causes the address book to attempt to follow LDAP referrals.
 
Referrals are used where the contents of the LDAP directory are divided between several servers, with a different section of the directory stored on each. This is normally used only in larger organisations. A referral is a message which indicates that the requested information is stored on a different server. If follow_referrals is set to true the Address Book will attempt to connect to the other server to retrieve the information.
 
Beware: This feature is currently experimental.
 
In Microsoft Active Directory, referrals are used where several domains have been joined into a "forest". As an alternative to using referrals, the LDAP Address Book can be set up to use the forest's Global Catalog (by connecting to an alternate LDAP service running on port 3268 - see description of $ldap_server above). Not all attributes are stored in the Global Catalogue by default - for example job titles and department information. Missing attributes can be added to the Global Catalog using the "Active Directory Schema" admin tool.

Example:
$ldap_server->follow_referrals = true;

Search/Browse Directory Settings
$search_ldap_attrib This specifies which attributes (fields) get searched when a user searches the address book. Add to the list if you have specific requirements, e.g. if you want users to be able to search on a department name (department) or building (physicalDeliveryOfficeName).

Example:
$search_ldap_attrib = array("cn","mail","sn","displayName","company","title");

$search_ldap_filter Specifies the LDAP filter to be applied when searching through records in the directory. The token ___search_criteria___ will be replaced with an expression to search the attributes listed in $search_ldap_attrib for the string entered by the user.

Example:
$browse_ldap_filter = "(&(objectClass=person)___search_criteria___)";

$browse_ldap_filter Specifies the LDAP filter to be applied when browsing through records in the directory. This is normally set to objectClass=*, which allows all records in the directory to be displayed.

Example:
$browse_ldap_filter = "objectClass=*";

$search_result_columns Specifies the column layout to be used for displaying search results. Each column has three fields associated with it:
  • caption - Caption to appear in column heading
  • attrib - LDAP attribute to display
  • link_type - Whether and how to display the attribute as a hyperlink. This field can be ommitted if not used.

The special attribute sortableName will display constructed "sort-friendly" version of a personal name (Surname, Firstname) based on which LDAP attributes are populated. (Ideally sn and givenName if populated, otherwise falling back to displayName or cn.)

Example:
$search_result_columns = array(
        array("caption"=>"Name",                "attrib"=>"sortableName",       "link_type"=>"object"),
        array("caption"=>"E-Mail",              "attrib"=>"mail"),
        array("caption"=>"Office Phone",        "attrib"=>"telephoneNumber"),
        array("caption"=>"Organisation",        "attrib"=>"company")
        );

The syntax "link_type"=>"object" indicates that values in the the name (sortableName) column should show as links to show more information about each object. It is recommended to place record names in the left-most column, shown as links.

$search_result_default_sort_order Specifies the default sort order for displaying search results. User can change the sort order by clicking a column header.

Example:
$search_result_default_sort_order = "sortableName";

$enable_search_suggestions Specifies whether search results from the directory should be the "suggested" as the user types in search terms. It may be more appropriate to disable this facility in large installations in order to reduce server load.

Example:
$enable_search_suggestions = true;

$lc_collate Specifies the collation locale (sorting language/region/script) to be used for browsing and displaying search results.

Example:
$lc_collate = "en_US";

$search_method Specifies the search result matching method to be used. This setting is optional, included to allow users to restore legacy search behavior should they wish. Allowed values are:
1
match anywhere in string (default search behavior)
2
match start of string only (behavior like versions 0.20 and earlier)

Example:
$search_method = 1;

Detailed Info View
$ldap_server->add_display_layout() Specifies the attributes to be shown in detailed entry view and how they should be layed out. See the section "Changing the layout and attributes shown for directory entries" above for further information.
 
Example:
// Display information about a printer in Active Directory

$ldap_server->add_display_layout("printQueue",array(
    array("section_name"=>"Shared Printer",
        "attributes"=>array(
            array("printerName",                    "Printer",              "microsoft/printer24.png"),
            array("location",                       "Location",             "address.png"),
            array("driverName",                     "Driver/Model",         "generic24.png"),
            array("description",                    "Description",          "description.png")
            )
        ),

    array("section_name"=>"Capabilities","width"=>"50%",
        "attributes"=>array(
            array("printColor",                     "Color Printing",       "generic24.png"),
            array("printStaplingSupported",         "Stapling",             "generic24.png"),
            array("printDuplexSupported",           "Double-Sided Printing","generic24.png"),
            array("printRate",                      "Printing Speed (PPM)", "generic24.png"),
            array("printMaxResolutionSupported",    "Max. Resolution (DPI)","generic24.png")
            )
        ),

    array("section_name"=>"Print Server","new_row"=>true,"colspan"=>2,
        "attributes"=>array(
            array("serverName",                     "Host Name",            "microsoft/computer24.png"),
            array("uNCName",                        "Printer UNC Path",     "microsoft/domain24.png")
            )
        ),

    array("section_name"=>"Paper Available","new_row"=>true,"colspan"=>2,
        "attributes"=>array(
            array("printMediaReady")
            )
        )
    ));
Photo/Image Display Settings
$enable_search_browse_thumbnail Specifies whether thumbnail images should be displayed next to directory entries in browse/search results view (if available) instead of object class icons.

Example:
$enable_search_browse_thumbnail = true

$enable_ldap_path_thumbnail Specifies whether thumbnail images should be displayed in the detailed info view's "navigation path" (if available) instead of object class icons.

Example:
$enable_ldap_path_thumbnail = true

$thumbnail_image_size Size to which images should be scaled for use as thumbnails/icons.

Example:
$thumbnail_image_size = "24x24";

$photo_image_size Size to which images should be scaled for display in the detailed info view. Set to an empty string (or leave undefined) to disable scaling of these images.

Example:
$photo_image_size = "96x96";

Computer/Telephony Integration Settings
$phone_number_link_template Specifies if and how phone numbers should be displayed as clickable links (e.g. to support "click-to-dial" functionality). Leaving this setting blank (or not setting it at all) will display phone numbers as plain text rather than a link.

The token "___phone_number___" will be replaced with the actual phone number to be dialed.

Examples:

Enable click-to-dial support on many mobile phone web browsers:

$phone_number_link_template = "tel:___phone_number___";

Enable click-to-dial by calling Cisco WebDialer running on host cucm01:

$phone_number_link_template = "https://cucm01/webdialer/Webdialer?destination=___phone_number___";
$phone_number_link_target = "_blank";

$phone_number_link_target Specifies a value for a phone number link's "target" attribute. It may be useful to set this to "_blank" for certain click-to-dial software or if the address book is set up to run inside a HTML frame.

Example:
$phone_number_link_target = "_blank";

Data Export Settings
$exclude_logo_if_photo_present Specifies whether logo images (from the thumbnailLogo attribute) should be omitted when exporting as vCard if a photograph is also present. This may be useful when transfering records from the Address Book to Android devices.

Example:
$exclude_logo_if_photo_present = true;

Date and Time Display Settings
$date_format Specifies the format/layout for displaying attributes containing dates on an LDAP entry's "detailed info" page.

The following tokens (each consisting of % followed by a letter) used to describe the format/layout:

  • %a - An abbreviated textual representation of the day
  • %A - A full textual representation of the day
  • %d - Two-digit day of the month (with leading zeros)
  • %e - Day of the month, with a space preceding single digits. (Not implemented on Windows.)
  • %j - Day of the year, 3 digits with leading zeros
  • %u - ISO-8601 numeric representation of the day of the week
  • %w - Numeric representation of the day of the week
  • %U - Week number of the given year, starting with the first Sunday as the first week
  • %V - ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week
  • %W - A numeric representation of the week of the year, starting with the first Monday as the first week
  • %b - Abbreviated month name, based on the locale
  • %B - Full month name, based on the locale
  • %h - Abbreviated month name, based on the locale (an alias of %b)
  • %m - Two digit representation of the month
  • %C - Two digit representation of the century (year divided by 100, truncated to an integer)
  • %g - Two digit representation of the year going by ISO-8601:1988 standards (see %V)
  • %G - The full four-digit version of %g
  • %y - Two digit representation of the year
  • %Y - Four digit representation for the year
  • %D - Same as %m/%d/%y
  • %F - Same as %Y-%m-%d (commonly used in database datestamps)
  • %x - Preferred date representation based on locale (without the time)
  • %n - A newline character (\n)
  • %t - A Tab character (\t)
  • %% - A literal percentage character (%)

(information based on PHP manual)

Example:
$date_format = "%A %d %B %Y";

$date_time_format Specifies the format/layout for displaying attributes containing dates and times (timestamps) on an address book entry's "detailed info" page.

See the description of $date_format (above) for a list of tokens (each consisting of % followed by a letter) used to describe the format/layout. The following additional tokens may be used to describe the time:

  • %H - Two digit representation of the hour in 24-hour format
  • %k - Two digit representation of the hour in 24-hour format, with a space preceding single digits
  • %I - Two digit representation of the hour in 12-hour format
  • %l - Hour in 12-hour format, with a space preceding single digits
  • %M - Two digit representation of the minute
  • %p - Upper-case 'AM' or 'PM' based on the given time
  • %P - Lower-case 'am' or 'pm' based on the given time
  • %r - Same as %I:%M:%S %p
  • %R - Same as %H:%M
  • %S - Two digit representation of the second
  • %T - Same as %H:%M:%S
  • %X - Preferred time representation based on locale, without the date
  • %z - The time zone offset. Not implemented as described on Windows. See below for more information.
  • %Z - The time zone abbreviation. Not implemented as described on Windows. See below for more information.
  • %c - Preferred date and time stamp based on locale
  • %s - Unix Epoch Time timestamp (same as the time() function)

Example:
$date_time_format = "%A %d %B %Y %H:%M:%S";

$short date_format Specifies a more compact format/layout for displaying attributes containing dates shown when browsing or searching the address book.

See the description of $date_format (above) for a list of the tokens (each consisting of % followed by a letter) used to describe the format/layout.

Example:
$short_date_format = "%d %b %Y";

$short date_time_format Specifies a more compact format/layout for displaying attributes containing dates and times (timestamps) shown when browsing or searching the address book.

See the descriptions of $date_format and $date_time_format (above) for lists of the tokens (each consisting of % followed by a letter) used to describe the format/layout.

Example:
$short_date_time_format = "%d %b %Y %H:%M:%S";

Schema Configuration
$ldap_server->add_schema() Adds the contents of a schema file to the Address Book.

Example:
$ldap_server->add_schema("mozilla");

$ldap_server->add_object_class() Adds a new object class to the schema.

Example:

$ldap_server->add_object_class("container",array(
	"icon"=>"folder.png",
	"is_folder"=>true,
	"display_name"=>"Container",
	"can_create"=>true)
	);

$ldap_server->add_attribute_class() Adds a new attribute class to the schema.

Example:

$ldap_server->add_attribute_class("sshPublicKey",array(
	"data_type"=>"text_list",
	"display_name"=>"SSH Public Key")
	);

$ldap_server->delete_object_class() Deletes an object class from the schema.

Example:
$ldap_server->delete_object_class("container");

$ldap_server->delete_attribute_class() Deletes an attribute class from the schema.

Example:
$ldap_server->delete_attribute_class("container");