1. Implementation
The following tracker definitions contain the minimal fields required for a database of offers, and a database of demands, which can be linked through users. In addition, there will be a group tracker for registered users, collecting some extra information from users (like interests for exchanging things, topics they would like to learn from or teach others about). This group tracker will be shown at registration time.
It would be very nice also the change that the user can click on certain check-boxes at registration time (i.e., fields of the group tracker at registration time) in order to let them monitor from the very beginning some general users forum, or community news blog, community newsletter, calendar, etc. I (Xavi) wonder whether this is (or will soon be) possible through the group watch or a_l_e_r_t features or by other means.
In order to use this profile with this set of data below (to populate it properly), you need beforehand to create two users in your tiki site: user1 and user2. This is due to the fact that the profiles system isn't able to create users in tiki (at least, so far by the Feb'09).
YAML
preferences:
enable: [ feature_trackers, feature_wiki, wikiplugin_trackerlist, wikiplugin_trackerfilter, feature_categories ]
1.1. Categories
List of topics of items offered, or demanded, to be shown as types of offers, and/or types of demands.
YAML
objects:
-
type: category
ref: categories_of_items
data:
name: Categories of items
description: Types of offers and demands, from all goods, knowledge, and services.
-
type: category
ref: c01_goods
data:
name: Goods
parent: $categories_of_items
-
type: category
ref: second_hand
data:
name: Second Hand
parent: $c01_goods
items:
- [ tracker_item, $offers:offer_002 ]
- [ tracker_item, $demands:demand_001 ]
- [ tracker_item, $demands:demand_002 ]
-
type: category
ref: computer_science
data:
name: Computer Science
parent: $c01_goods
-
type: category
ref: multimedia
data:
name: Multimedia
parent: $c01_goods
-
type: category
ref: other_goods
data:
name: Others
parent: $c01_goods
items:
- [ tracker_item, $offers:offer_002 ]
-
type: category
ref: c02_services
data:
name: Services
parent: $categories_of_items
-
type: category
ref: hair_cuts
data:
name: Hair cuts
parent: $c02_services
-
type: category
ref: ironing
data:
name: ironing
parent: $c02_services
-
type: category
ref: computer_fixing
data:
name: Computer fixing
parent: $c02_services
-
type: category
ref: translations
data:
name: Translations
parent: $c02_services
-
type: category
ref: other_services
data:
name: Others
parent: $c02_services
-
type: category
ref: c03_knowledge
data:
name: Knowledge
parent: $categories_of_items
-
type: category
ref: courses
data:
name: Courses
parent: $c03_knowledge
-
type: category
ref: drawing
data:
name: Drawing
parent:$c03_knowledge
-
type: category
ref: gnu_linux
data:
name: GNU/Linux
parent:$c03_knowledge
-
type: category
ref: video_edition
data:
name: Video Edition
parent:$c03_knowledge
1.2. Offers
The tracker fields are left to a minimum. More fields can be added for specific details about offers and demands.
YAML
objects:
-
type: tracker
ref: offers
data:
name: Offers
description: Offers of goods, knowledge, and services.
-
type: tracker_field
ref: offers_title
data:
name: Title
tracker: $offers
type: text_field
flags: [ searchable, public, list, mandatory, link ]
order: 10
-
type: tracker_field
ref: categories_of_offers
data:
name: Categories
tracker: $offers
type: category
options: $profileobject:categories_of_items$
flags: [ searchable, public, mandatory ]
order: 20
-
type: tracker_field
ref: offers_user
data:
name: User
tracker: $offers
type: user_selector
flags: [ link, searchable, public, editable_by_admins, mandatory ]
order: 30
-
type: tracker_field
ref: demands_of_same_user
data:
name: Demands from this user
tracker: $offers
type: item_list
options: $profileobject:demands$,$profileobject:demands_user$,$profileobject:offers_user$,$profileobject:demands_title$,1
flags: [ public, list, mandatory, link ]
order: 40
1.3. Demands
YAML
objects:
-
type: tracker
ref: demands
data:
name: Demands
description: Demands of goods, knowledge, and services.
-
type: tracker_field
ref: demands_title
data:
name: Title
tracker: $demands
type: text_field
flags: [ searchable, public, list, mandatory, link ]
order: 10
-
type: tracker_field
ref: categories_of_demands
data:
name: Categories
tracker: $demands
type: category
options: $profileobject:categories_of_items$
flags: [ searchable, public, mandatory ]
order: 20
-
type: tracker_field
ref: demands_user
data:
name: User
tracker: $demands
type: user_selector
flags: [ link, searchable, public, editable_by_admins, mandatory ]
order: 30
-
type: tracker_field
ref: offers_of_same_user
data:
name: Offers of the same person
tracker: $demands
type: item_list
options: $profileobject:offers$,$profileobject:offers_user$,$profileobject:demands_user$,$profileobject:offers_title$,1
flags: [ public, list, mandatory, link ]
order: 40
1.4. People
YAML
objects:
-
type: tracker
ref: people
data:
name: People
description: People registered
allow: [ attachments ]
default_status: open
-
type: tracker_field
ref: people_name
data:
name: Name
tracker: $people
type: text_field
flags: [ public, list, mandatory, link ]
order: 10
-
type: tracker_field
ref: people_interests
data:
name: Short Description
description: Very short description of interests from each person.
tracker: $people
type: text_area
flags: [ public ]
order: 60
-
2. Sample Data
2.1. Offers
YAML
objects:
-
type: tracker_item
ref: offer_001
data:
tracker: $offers
status: open
values:
- [ $offers_title, "Plant" ]
- [ $categories_of_items, $c01_goods ]
- [ $offers_user, $profilerequest:Name of User 1$user1$ ]
- [ $offers_of_same_user, "" ]
-
type: tracker_item
ref: offers_002
data:
tracker: $offers
status: open
values:
- [ $offers_title, "TW T-Shirt" ]
- [ $categories_of_items, $second_hand ]
- [ $offers_user, $profilerequest:Name of User 2$user2$ ]
- [ $offers_of_same_user, "" ]
2.2. Demands
YAML
objects:
-
type: tracker_item
ref: demand_001
data:
tracker: $demands
status: open
values:
- [ $demands_title, "Heater" ]
- [ $categories_of_items, $c01_goods ]
- [ $demands_user, $profilerequest:Name of User 1$user1$ ]
- [ $demands_of_same_user, "" ]
-
type: tracker_item
ref: demand_002
data:
tracker: $demands
status: open
values:
- [ $demands_title, "Customized T-Shirt" ]
- [ $categories_of_items, $second_hand ]
- [ $demands_user, $profilerequest:Name of User 2$user2$ ]
- [ $demands_of_same_user, "" ]
2.3. Add wiki pages with the trackerlist and trackerfilter
YAML
preferences:
enable: [ feature_wiki ]
objects:
-
type: wiki_page
ref: offers_page
data:
name: Offers
description: Offers of goods, knowledge and services
lang: en
content: wikicontent:Profile_Exchange_Market_Offers
-
type: wiki_page
ref: demands_page
data:
name: Demands
description: Demands of goods, knowledge and services
lang: en
content: wikicontent:Profile_Exchange_Market_Demands
2.4. Permissions
YAML
permissions:
Admins:
allow: [ admin_trackers ]
Anonymous:
allow: [ view, wiki_view_history ]
objects:
-
type: tracker
id: $offers
allow: [ view_trackers, view_trackers_open ]
-
type: tracker
id: $demands
allow: [ view_trackers, view_trackers_open ]
-
type: tracker
id: $people
allow: [ view_trackers, view_trackers_open ]