History: User Tracker
Source of version: 75
Copy to clipboard
!User and Registration tracker You can use ((trackers)) to collect additional information for users during registration. Some uses of this type of tracker could be: *To collect user information (such as mailing address or phone number) *To require the user to acknowledge a user agreement * To prevent spammer registration, by asking new users to provide a reason why they want to join (the prompt should tell the user that his answer should indicate that he or she clearly understands what the site is about). See also: ((Group Tracker)) for a tracker that allows a sign-up form for groups. ^Follow these steps carefully. Or you can apply the [http://profiles.tikiwiki.org/User_Trackers|User_Trackers profile] in your Tiki site through the ((Profiles Wizard)) > "__Demo of commonly used configurations" > User & Registration Tracker__" ^ !!# Activate tracker feature. # Activate the tracker feature (Control Panels->Features->Trackers) +{img fileId="1634" thumb="y" alt="" rel="box[g]"} !!# Enable the Registration Tracker. #From the Control Panels->Log in page, enable the __Use a tracker to collect more user information__ option. +{img fileId="1635" thumb="y" alt="" rel="box[g]"} !!# Configure the tracker. #Create a new tracker (__List Trackers__ link). ## From the System Menu, select the __Trackers > List Trackers__ link. ++{img fileId="1636" thumb="y" alt="" rel="box[g]"} ## Click the __Create__ option. ++{img fileId="1637" thumb="y" alt="" rel="box[g]"} ## In __Name__ (under __General__), enter a name for the tracker, such as __New User Registration Form__. ++{img fileId="1638" thumb="y" alt="" rel="box[g]"} ## __Save__ the tracker. **To have the tracker's items visible to ''only'' the user, you must set special permissions on the tracker. This is optional and you can do this later if you want. **You do ''not'' have to apply __tiki_p_create__ to the tracker. #Add fields to the tracker. ##You must have at least one ((Tracker Fields info|field)) of __Type__ ''User selector'' and its __Auto-Assign__ field (under __Options for user selector__) populated with with __Creator__. ++This field will automatically contain the user's username. ++{img fileId="1639" thumb="y" alt="" rel="box[g]"} ++{img src=img/icons/information.png alt="Note"} __Important__: Be sure to note the __FieldID__ for this field. You will need it later. ##Add other fields to the tracker to collect the desired information (such as addresses, phone numbers, etc) ##__Save__ the fields. !!# Assign the tracker to the group "Registered". # From the Admin groups page (Settings menu->Groups), edit the __Registered__ group. +{img fileId="1640" thumb="y" alt="" rel="box[g]"} # In the __User Registration Tracker__ field, select the tracker that you created. +{img fileId="1641" thumb="y" alt="" rel="box[g]"} # The __User Registration Tracker__ section now has a second drop-down list of the fields in the tracker. # Select the User field that you created earlier with __Auto-Assign__ = __Creator__ (note that this may have been already pre-selected). +{img fileId="1642" thumb="y" alt="" rel="box[g]"} # In the __Group or User Tracker Registration Fields__ field, indicate the ID of each tracker field to include in the form that users must complete as part of the registration process. Multiple fields must be separated by a colon. +{img fileId="1643" thumb="y" alt="" rel="box[g]"} # __Save__ the group. __Note__: A user can choose at registration a group among a list of groups (the list is specified in "Admin > Login"), and set that each group has a different user tracker associated to it. This way, the tracker displayed at registration time would be the one assigned to the group selected by the new user at registration time. __Note Two__: As of Tiki 18 at least, if you have a user tracker assigned to the Registered group and you use "Choose Group" you need to replicate the tracker and field settings on each group you offer as a choice. The groups need to have "User Choice" set too. __Perms__: If you want the items to be seen only by his user, you must set special perm on the tracker, as tiki_p_admin_trackers for the admin group. Even if there is no tiki_p_create_tracker_items for the tracker, the user will be able to create his item and if (Item creator can modify his items) is set, he will be able to modify it. __Access to the user tracker item__: __Important__: It can be necessary in some case to set the group that has the tracker as the default group for the user. The user can see his user tracker, if the permissions are ok with: tiki-view_tracker_item.php?view=+user You can see the user tracker of another user , if the permissions are ok and if the item exists with: tiki-view_tracker_item.php?user=yyyyy&view=+user Note: a user can have many trackers items associated to him. Each tracker must have a field of type user selector and option creator(1). To be able to see the item associated to the user (if permissions are ok) you can use: tiki-view_tracker_item.php?group=xxx&user=yyyyy&view=+user - the group must have a user tracker tiki-view_tracker_item.php?trackerId=yyyyy&view=+user - the tracker must be a user tracker !!To let users edit their user tracker in a wiki page {CODE(caption="example (replace ids with your own)" wrap=1)}{TRACKER(trackerId="1", fields="2:3:4:5:7:8:9:10:11:27:17:28:19:12:22:21:18:20: 23:24:25:26", max="-1", view="user")}{TRACKER} {CODE} __Note:__ "Only one item per user or IP" tracker option must be checked at tiki-admin_trackers.php?trackerId=yyy. If you want nicer formatting of this page, you can use a ((Pretty Tracker)) !!To synchronize the realName user preference from fields in the tracker The realName user preference normally set in tiki-user_preference.php is used by Tiki to be shown in a variety of places, such as attribution for edits and so on. From Tiki 6 onwards, this realName user preference can be automatically updated whenever certain fields in the user tracker is updated. To set this up, set "User tracker IDs to sync prefs from:", since there may be more than one user tracker if there are different ones set for different groups (but most of the time there will be only one). Then, set Tracker field IDs to sync Real Name pref from:". You can update from multiple fields and set the priority of field sets to choose from. For example, if fieldId 10 is First Name, 11 is Last Name, and 12 is Preferred Name, then a setting of "12,10+11" will first check if the user has a preferred name set and use that if so, and if not, then it will use the First Name/Last Name combination with a space in between. !!Using Pretty Trackers to generate the Registration Tracker This is available from ((Tiki8)) (is available in Tiki 6 but may require some tweaking to work properly). See ((Pretty Trackers)). To set this up, turn on the feature "Use pretty trackers for registration form", and specify a wiki page template or .tpl file template to be used as the pretty tracker template under "Registration pretty tracker template:" If a wiki page is specified as template, you need to apply the permission ''tiki_p_use_as_template'' for ''Anonymous'' on the wiki page. In addition to regular ((Pretty Tracker)) fields to refer to fields in the User tracker, you have the following syntax that you will have to use in your pretty tracker template to place basic registration fields. {CODE()} {$register_login} {$register_email} {$register_pass} {$register_pass2} {$register_passcode} {$register_groupchoice} {CODE} In Tiki 8 you have to specify: {CODE()} {$register_antibot} {CODE} *register_pass2 refers to refers to the repeat password field. *register_passcode refers to the passcode that the user might have to enter to be able to register if that feature is enabled *register_groupchoice refers to the group selection field if that feature is enabled *if you have "Use email as login" feature enabled, register_login is the one you should use, and register_email is not needed. !!Username link to user tracker To have the user name link (when clicking on a username or realname) to go to the user tracker item instead of the Tiki user preferences. Go to Admin -> General -> Navigation; In the field "URL to go to when clicking on a username" : {CODE()}tiki-view_tracker_item.php?trackerId=1&view=+user&user=%user%{CODE} (trackerId= your user information tracker id) Be sure that your user information are set to "Public" by default. !!See Also * http://fr.tikiwiki.org/tiki-index.php?page=Formulaires%20utilisateurs%20et%20groupes *[User / Group / IP / Page - Selector Tracker Field] *((User Preference Field)) -=alias=- *(alias(User Trackers)) *(alias(User profile)) *(alias(User profiles)) *(alias(Registration Tracker)) *(alias(Registration Trackers))