This document assumes you have copied the PersonalInfoAddOn files to your user web. Otherwise, see PersonalInfoAddOn for installation instructions.
Further requirements:
Custom UserForm
You have either copied the example UserForm topic to your user web, or you have modified UserForm with the fields in the example.
Custom NewUserTemplate
You have either copied the example NewUserTemplate topic to your user web, or you have modified NewUserTemplate with the fields in the example.
Or by editing topics using a web interface: set the preference
* Local VIEW_TEMPLATE = PersonalInfoUserView
Customize information in the user topic
To change the fields:
Add the custom fields and field formats to the table in Main.UserForm. Below is an example, so change the fields as you like, but keep the fields Picture and WorkStatus (including the value 'Current') (both fields are not displayed to the user in topic view). In the current setup the value for WorkStatus can be set when editing the topic.
| Picture | label | 1 | | | H |
| <nop>WorkStatus | select | 1 | Current, Former | | H |
| <nop>WorkEmail | text | 40 | | | H |
| <nop>WorkPhone | text | 40 | | | H |
| <nop>WorkPhoneMobile | text | 40 | | | H |
| <nop>WorkLocation | text | 40 | | | H |
Edit PersonalInfo#personalInfoFields and write the fields and field labels by editing the INCLUDE variables. The variable fieldName corresponds to the field names in UserForm. The variable label can be any text you wish.
By default Foswiki's SEARCH is used to find all users. With many users this can mean a significant performance hit.
Searches can be sped up by having user data in cache: an attachment to PersonalInfo. For fast user data retrieval:
Manually: in PersonalInfo, click on the "Update" button. By saving the topic, the attachment is updated with the latest information.
Automatically: create a cron job to regularly save the PersonalInfo topic.
The same idea may be used to create an XML file, this is turned off for performance. See #PhoneListXML.
Documentation of the INCLUDE sections in PersonalInfo.
personalInfo
This block is intended as a quick introduction of the user (picture!) and to provide the most common information at hand. It makes it easy to edit the data "on the fly".
This block is included on every user page when PersonalInfoUserViewTemplate is set as view template.
This include is written in PersonalInfoUserViewTemplate:
%INCLUDE{"PersonalInfo" section="personalInfo"}%
Creates:
directSearch
Creates a search box to directly find users with their WorkPhone number.
When AttachContentPlugin is enabled, an updated javascript file attachment is created each time PersonalInfo is saved. This will make loading of the directSearch module a lot faster.
To disable the auto-creation of the attachment, change PersonalInfo#createDirectSearchAttachment: change %STARTATTACH{ to %<nop>STARTATTACH{
Usage:
Creates a list of user data in XML format. Listed users have a field WorkPhone and have the value Current at field WorkStatus.
The auto-generation of an XML attachment is turned off for performance. To create the XML file, remove the <nop> from the beginning of STARTATTACH at PersonalInfo:createPhoneListXMLAttachment.
Usage: