Loading...
 
Skip to main content

History: User_Tracker_avatar_field

Source of version: 4

Copy to clipboard
            Optional ''Avatar'' field for https://profiles.tiki.org/User_Tracker
This field is trying to simulate an avatar type field (which does not exist yet in Tiki as of version 17.x) using the static type field and it displays the avatar icon for the user item in the wiki parsed description of the field.
It requires one TPL wiki page (see below).

{CODE(caption="YAML" colors="yaml")}
preferences: # enable / disable some preferences this field depends on
 trackerfield_static: y
 wikiplugin_avatar: y
objects:
 -
  type: tracker_field
  ref: avatar_icon # unique profile object reference name
  data:
   name: $profilerequest:Name for the "Avatar" field:$Avatar$ # request user input before applying the profile
   description: |
    {trackerlist
    trackerId="$profileobject:User_Tracker:user_tracker$"
    fields="$profileobject:User_Tracker:user_name$"
    max="1" list_mode="csv" showpagination="n"
    wiki="$profileobject:avatar_field_page_template$"}
   tracker: $User_Tracker:user_tracker # parent profile reference
   type: static # field type
   flags: # can be: list, mandatory, public, searchable
    - public
   options:
    wikiparse: 1
   visible: # e.g. creator_editable
   visby: 
    - #Admins
 -
  type: wiki_page
  ref: avatar_field_page_template
  data:
   name: Avatar TPL
   content: wikicontent:User_Tracker_avatar_field_page_template
permissions:
 Registered:
  objects:
   -
    type: wiki_page
    id: Avatar TPL
    allow: 
     - use_as_template
{CODE}

        

History

Information Version
Thu 03 of Aug, 2017 09:16 GMT-0000 luciash d' being ๐Ÿง™ missing pref 8
Fri 28 of Jul, 2017 18:19 GMT-0000 luciash d' being ๐Ÿง™ another try 7
Fri 28 of Jul, 2017 15:16 GMT-0000 luciash d' being ๐Ÿง™ trying to fix for Tiki 17 6
Thu 20 of Jul, 2017 11:39 GMT-0000 luciash d' being ๐Ÿง™ use tplwiki instead of wiki as the template resource to parse the HTML like in Smarty template 5
Thu 20 of Jul, 2017 10:10 GMT-0000 luciash d' being ๐Ÿง™ do not show pagination in tracker item edit mode 4
Thu 20 of Jul, 2017 09:31 GMT-0000 luciash d' being ๐Ÿง™ "objects" cannot be twice there 3
Thu 20 of Jul, 2017 09:25 GMT-0000 luciash d' being ๐Ÿง™ Code Plugin modified by editor. 2
Thu 20 of Jul, 2017 09:16 GMT-0000 luciash d' being ๐Ÿง™ new field for User Tracker 1