Loading...
 
Skip to main content

History: User_Trackers

Source of version: 72 (current)

Copy to clipboard
            A User tracker is a powerful and flexible feature which can be tricky to setup. This profile helps in this task.

The profile has a few common fields (First name, Last name, Address, etc) that can hold the data from users. Some fields can be shown, for instance, in the registration form, and some others can eventually be filled in a later stage. 

Please see doc: [https://doc.tiki.org/User+tracker|User tracker]

::{img src="http://tiki.org/display542" link="http://profiles.tiki.org/User_Trackers" alt="User_Trackers" desc="User_Trackers Profile" align="center" imalign="center" width="550"}::

!!Features 
{CODE(caption=>YAML,wrap=>1)}
preferences:
 allowRegister: y  # Allow users to create new accounts
 feature_mytiki: y
 feature_userPreferences: y
 feature_trackers: y
 userTracker: y
 trackerfield_userpreference: y
 user_trackersync_trackers: [ $user_tracker ]
 user_trackersync_realname: $profileobject:user_name$
 validateUsers: n # This is slowing us down as we build the profile
 wikiplugin_fade: y # for demonstration purposes in a static text field
 wikiplugin_tabs: y # for demonstration purposes in a static text field
{CODE}

!!User tracker definition
{CODE(caption=>YAML,wrap=>1)}
objects:
 -
  type: tracker
  ref: user_tracker
  data:
   name: Users
   description: Information about users
   default_status: open
   show: [ creation_date, modification_date, list_modification_date ]
   allow: [ creator_modification, one_item_per_user]
 -
  type: tracker_field
  ref: login
  data:
   name: login
   tracker: $user_tracker
   type: user
   flags: [ searchable, public, list, mandatory, link ]
   order: 10
   options: 1
 -
  type: tracker_field
  ref: user_name
  data:
   name: Name
   tracker: $user_tracker
   options: 
     type: realName
   type: preference
   flags: [ public, mandatory ]
   order: 20 
 -
  type: tracker_field
  ref: user_business_name
  data:
   name: Business Name
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 30 
 -
  type: tracker_field
  ref: user_short_description
  data:
   name: Short Description
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 40 
 -
  type: tracker_field
  ref: user_long_description
  data:
   name: Long Description
   tracker: $user_tracker
   type: text_area
   flags: [ public ]
   order: 50 
 -
  type: tracker_field
  ref: user_profession
  data:
   name: Profession
   tracker: $user_tracker
   type: text_area
   flags: [ public ]
   order: 60 
 -
  type: tracker_field
  ref: user_products
  data:
   name: Products
   tracker: $user_tracker
   type: text_area
   flags: [ public ]
   order: 70 
 -
  type: tracker_field
  ref: user_services
  data:
   name: Services
   tracker: $user_tracker
   type: text_area
   flags: [ public ]
   order: 80 
 -
  type: tracker_field
  ref: user_bio
  data:
   name: Bio
   tracker: $user_tracker
   type: text_area
   flags: [ public ]
   order: 90 
 -
  type: tracker_field
  ref: user_comments
  data:
   name: Comments
   tracker: $user_tracker
   type: text_area
   flags: [ public ]
   order: 100 
 -
  type: tracker_field
  ref: user_street_address
  data:
   name: Street Address
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 110 
 -
  type: tracker_field
  ref: user_city
  data:
   name: City
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 120 
 -
  type: tracker_field
  ref: user_state
  data:
   name: State
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 130 
 -
  type: tracker_field
  ref: user_zip_code
  data:
   name: Zip Code
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 140 
 -
  type: tracker_field
  ref: user_country
  data:
   name: Country
   tracker: $user_tracker
   type: country
   flags: [ public ]
   order: 150
 -
  type: tracker_field
  ref: user_email
  data:
   name: Email
   tracker: $user_tracker
   options: 
     type: email
   type: preference
   flags: [ public ]
   order: 160 
 -
  type: tracker_field
  ref: user_website
  data:
   name: Website
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 170 
 -
  type: tracker_field
  ref: user_primary_phone
  data:
   name: Primary Phone
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 180 
 -
  type: tracker_field
  ref: user_secondary_phone
  data:
   name: Secondary Phone
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 190 
 -
  type: tracker_field
  ref: user_facebook
  data:
   name: Facebook page
   tracker: $user_tracker
   type: text_field
   flags: [ searchable, public, list ]
   order: 200
 -
  type: tracker_field
  ref: user_skypeid
  data:
   name: SkypeID
   tracker: $user_tracker
   type: text_field
   flags: [ public ]
   order: 21
 - 
  type: tracker_field
  ref: user_customNote
  data: 
   name: Note
   tracker: $user_tracker
   options: 
    wikiparse: 1
    max: 30
   type: static
   flags: [ public ]
   order: 5
   description: |
     {TABS(name="Custom info" tabs="Read this first|Feedback" toggle="y" inside_pretty="n")}
     (:exclaim:) Take into consideration the latest changes in our site / organization. %%% %%%
     {FADE(label="Read  more", icon="y", bootstrap="y")}
     * Some more information about this topic comes here...
     * Some more information about this topic comes here...
     * Some more information about this topic comes here...
     {FADE}
     /////
     You can provide some feedback by means of ... ~~red:[[change me]~~.
     {TABS}    
   descparsed: y
 - 
   type: tracker_field
   ref: user_contactAddressInformation
   data: 
    name: Contact Address Information
    permname: address
    tracker: $user_tracker
    options: 
     level: 2
     toggle: o
    type: header
    order: 25
    flags: 
     - public
 - 
   type: tracker_field
   ref: user_onlineContactInformation
   data: 
    name: Online Contact Information
    permname: onlineContactInformation
    tracker: $user_tracker
    options: 
     level: 2
     toggle: o
    type: header
    order: 155
    flags: 
     - public
{CODE}



!!Todo
*Make sure "Only one item per user or IP" is assigned in tracker

!!Adding module
This is a box on the side which permits quick access to one's user tracker.

{CODE(caption=>YAML)}
objects:
 -
  type: module
  data:
   name: usergroup_tracker
   position: right
   order: 1
   groups: [ Registered ]
{CODE}

!!Group
This part is an attempt to correspond the Registered group to the newly created user_tracker but it's not working. __fixed in 3.1?__

{CODE(caption=>YAML,wrap=>1)}
permissions:
 Registered:
  description: users of the web site
  user_tracker: $user_tracker   
  user_tracker_field: $login
  registration_fields: [ $profileobject:user_customNote$, $profileobject:user_name$, $profileobject:user_contactAddressInformation$, $profileobject:user_primary_phone$, $profileobject:user_street_address$, $profileobject:user_city$, $profileobject:user_state$, $profileobject:user_zip_code$, $profileobject:user_country$, $profileobject:user_onlineContactInformation$, $profileobject:user_website$, $profileobject:user_skypeid$, $profileobject:user_comments$]
{CODE}


!!Add post-install instructions

This will include: ((User_Trackers_include_wiki_page)) with post-install instructions

{CODE(caption=>YAML)}
instructions: User_Trackers
preferences:
  enable: [ feature_wiki ]
objects:
  -
    type: wiki_page
    ref: User_Trackers_include_wiki_page
    data:
      name: User_Trackers 
      description: What needs to be done
      lang: en
      content: wikicontent:User_Trackers_include_wiki_page
{CODE}


!!Todo
*Make my profile wiki page with ~np~ {TRACKER(trackerId=>1, showmandatory=>y view=user)} {TRACKER} ~/np~


Give tiki_p_create_tracker_items to Registered so they may use this page, and avoid the need to first need to go to tiki-view_tracker_item.php?view=+user