This section describes how to customize the Address Book Search to return more LDAP attributes.
You need to perform the following tasks to customize the Address Book Search to return more LDAP attributes:
Obtain the additional LDAP attributes from the server using the configutil utility.
Customize the client files to display the LDAP attributes obtained from the server.
For example, to customize the Address Book Search to return an additional LDAP attribute pager, perform the following steps:
Include the LDAP attribute pager to the list of LDAP attributes in the config attribute local.service.http.ldapaddresssearchattrs using the configutil utility:
configutil -o local.service.http.ldapaddresssearchattrs -v "cn, mail, sn, telephoneNumber, pager"
Restart the Messaging server for the changes to take effect.
Add the following line to the s_SearchCtrl() function in the lookup.fs file:
.... ' <select name="attr"\>\\n' + .... '<option value="'+ main.attr_list['telephonenumber']+ '"\>Phone #</option\>\\n' + '<option value="'+ main.attr_list['pager']+ '""\>Pager #</option\>\\n' + '</select\>\\n' + .... |
Add the following lines to the getSearchResults() function in the lookup.js file:
if(forGroup) s = '<form name="form"\>\\n' + main.tableStart + .... '<td width=1% nowrap\><nobr\>' + main.font() + (pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+ '<td width=1% nowrap\><nobr\>' + main.font() + (pab ? i18n_lu['pager'] : i18n['ldap pager']) +'</td\> else s = '</form\><form name="form"\>\\n' + main.tableStart + '<td width=1% nowrap\><nobr\>' + main.font() + (pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+ '<td width=1% nowrap\><nobr\>' + main.font() + (pab ? i18n_lu['pager'] : i18n['ldap pager']) +'</td\> .... |
Add the following lines to the lookup.js file:
.... if (list[i].telephoneNumber) s += '<td nowrap\>' + main.font() + main.unescape_crlf(list[i].telephoneNumber) + '</td\>\\n'; else if (list[i].telephonenumber) s += '<td nowrap\>' + main.font() + main.unescape_crlf(list[i].telephonenumber) + '</td\>\\n'; else s += blank; if (list[i].pager) s += '<td nowrap\>' + main.font() + main.unescape_crlf(list[i].pager) + '</td\>\\n'; else if (list[i].pager) s += '<td nowrap\>' + main.font() + main.unescape_crlf(list[i].pager) + '</td\>\\n'; else s += blank; s += '\\n'; } .... |
Add the following line to the updatePabAttrList() function in the main.js file:
.... attr_list['telephonenumber']= pabFrame.attrs?pabFrame.attrs.telephonenumber.name:'telephonenumber'; attr_list['pager']= pabFrame.attrs?pabFrame.attrs.pager.name:'pager'; .... |