Loading...
 

SNiPTT

 Warning
This Profile Is Still Work In Progress !
See the development process page at dev.tiki.org

SNiPTT stands for Social Networking in Pretty Tiki Trackers. This profile is intended to help with building a Social Networking website based mainly on the powerful Tiki Trackers feature.


Global Preferences

YAML
instructions: SNiPTT Setup # page where admin is redirected after applying the profile preferences: # some mandatory prefs to make sure all will work for us (alphabetically sorted) error_reporting_adminonly: n # enable error reporting for all users (for debugging purposes) error_reporting_level: -1 feature_custom_center_column_header: {if $user}{wiki}[tiki-index.php|Home] | [tiki-index.php?page=User Profile|My Profile] | [tiki-user_preferences.php|Preferences] | [tiki-logout.php|Logout]{/wiki}{if $tiki_p_admin eq "y"}{wiki} | [tiki-admin.php?profile=SNiPTT&repository=&page=profiles&list=List|Re-apply the SNiPTT profile]{/wiki}{/if}{/if} # re-apply link - only for development purpose (will be removed from final) feature_fullscreen: y # it is useful to have Fullscreen mode available feature_mytiki: y feature_page_title: $profilerequest:Display page name as page title (y/n)$n$ feature_userPreferences: y feature_wiki_paragraph_formatting: y #avoid unnecessary line breaks (paragraphs are more semantic too) t_use_db: n # do not use db to store trackers files, otherwise it will not work to store profile picture (at least in Tiki 5.1) t_use_dir: $profilerequest:What dir to use to store profile pictures and other files$files$# what directory to use to store tracker files wikiplugin_jq: y wikiplugin_tr: y userTracker: y urlOnUsername: tiki-index.php?page=User+Profile&tr_user=%user%


Dependencies

This profile depends on and applies the following (mini) profile and its snippets in the following order:
YAML
dependencies: - $profiles.tiki.org:User_Tracker:user_tracker - $profiles.tiki.org:User_Tracker_profile_picture_field:user_profile_picture - $profiles.tiki.org:User_Tracker_real_name_field:real_name - $profiles.tiki.org:User_Tracker_nick_name_field:nick_name - $profiles.tiki.org:User_Tracker_welcome_name_field:welcome_name - $profiles.tiki.org:Colorbox_Ajax_Load:cbajaxload_alias

Trackers

YAML
preferences: feature_trackers: y


This profile applies the following trackers:

User Tracker

User Tracker mini-profile as dependency including extra additional fields as profile snippets (see above).

User Followers Tracker

YAML
objects: - type: tracker ref: user_followers_tracker data: name: User Followers description: Who follows whom default_status: open allow: [ creator_modification ] hide_list_empty_fields: y show: [creation_date, modification_date, list_modification_date ] sort_default_order: asc


Fields

YAML
objects: - type: tracker_field ref: user_login_name data: name: User Login Name tracker: $user_followers_tracker type: user flags: [ searchable, public, link, list, mandatory ] options: 1 order: 10 - type: tracker_field ref: user_follower_name data: name: Follower tracker: $user_followers_tracker type: user flags: [ searchable, public, link, list, mandatory ] order: 20


User Posts Tracker

YAML
preferences: feature_trackers: y objects: - type: tracker ref: user_posts_tracker data: name: User Posts description: User posts for "micro-blogging" purposes default_status: open allow: [comments, creator_modification] hide_list_empty_fields: y show: [creation_date, modification_date, list_modification_date ] sort_default_order: asc - type: tracker_field ref: user_post_username data: name: User Login Name tracker: $user_posts_tracker type: user flags: [searchable, public, link, list, mandatory] options: 1 - type: tracker_field ref: user_post_body data: name: Post Body tracker: $user_posts_tracker type: a flags: [searchable, public, mandatory] options: 0,80,4,1024,1024


Wiki Pages

The following wiki pages are applied:

The following wiki pages are applied as Pretty Tracker templates:

First lets make sure Wiki feature is on and set up other wiki related preferences used by this profile:
YAML
preferences: feature_wiki: y feature_wiki_argvariable: y # we are gonna use arg variables in our wiki page templates like {{foo}} (its value will be filled from URL param &foo=bar)


SNiPTT Setup Page

After applying the profile an admin is redirected to this setup page with further instructions:
YAML
objects: - type: wiki_page ref: sniptt_setup_wiki_page data: name: SNiPTT Setup content: wikicontent:SNiPTT_Setup


Edit User Post Page

This Wiki page and template will be used by Tracker wikiplugin to display a form to edit existing User Post:
YAML
objects: - type: wiki_page ref: edit_user_post_wiki_page data: name: Edit User Post content: wikicontent:SNiPTT_Edit_User_Post - type: wiki_page ref: edit_user_post_tpl_wiki_page data: name: Edit User Post template content: wikicontent:SNiPTT_Edit_User_Post_template


User Posts Page

Wiki page with posts by myself or by a specified user (when &tr_user=foo is present in URL):
YAML
objects: - type: wiki_page ref: user_posts_wiki_page data: name: User Posts content: wikicontent:SNiPTT_User_Posts - type: wiki_page ref: user_posts_tpl_wiki_page data: name: User Posts template content: wikicontent:SNiPTT_User_Posts_template


All User Posts Page

And an extra Wiki page to show posts from all users:
YAML
objects: - type: wiki_page ref: all_users_posts_wiki_page data: name: All Users Posts content: wikicontent:SNiPTT_All_Users_Posts


All User Followers Posts Page

And an extra Wiki page to show posts from all user's followers:
YAML
objects: - type: wiki_page ref: all_user_followers_posts_wiki_page data: name: All User Followers Posts content: wikicontent:SNiPTT_All_User_Followers_Posts - type: wiki_page ref: user_follower_posts_template_wiki_page data: name: User Follower Posts template content: wikicontent:SNiPTT_User_Follower_Posts_template


Edit User Profile Page

For editing part of the User Profile data:
YAML
objects: - type: wiki_page ref: edit_user_profile_wiki_page data: name: Edit User Profile content: wikicontent:SNiPTT_Edit_User_Profile - type: wiki_page ref: edit_user_profile_tpl_wiki_page data: name: Edit User Profile template content: wikicontent:SNiPTT_Edit_User_Profile_template


Edit Profile Picture Page

Edit Profile Picture page will load via Ajax to Pop-up box:
YAML
objects: - type: wiki_page data: name: Edit User Profile Picture content: wikicontent:SNiPTT_Edit_User_Profile_Picture


User Profile Page

Finally we apply this Wiki page to display the whole User Profile "home" page:
YAML
objects: - type: wiki_page ref: user_profile_wiki_page data: name: User Profile content: wikicontent:SNiPTT_User_Profile - type: wiki_page ref: user_profile_tpl_wiki_page data: name: User Profile template content: wikicontent:SNiPTT_User_Profile_template




Categories

YAML
preferences: feature_categories: y objects: - type: category ref: pretty_tracker_templates_category data: name: Pretty Tracker Templates description: For Wiki pages serving as templates for Tracker and TrackerList wikiplugins items: - [ wiki_page, User Profile template ] - [ wiki_page, User Posts template ] - [ wiki_page, User Follower Posts template ] - [ wiki_page, Edit User Profile template ] - [ wiki_page, Edit User Profile Picture template ] - [ wiki_page, Edit User Post template ] - type: category ref: sniptt_trackers_category data: name: User Trackers description: Trackers related to the SNiPTT profile items: - [ tracker, $user_followers_tracker ] - [ tracker, $user_posts_tracker ] - [ tracker, $profiles.tiki.org:User_Tracker:user_tracker ]


Permissions

YAML
permissions: Admins: description: Administrator and accounts managers allow: [ admin, trust_input ] Registered: description: Users logged into the system allow: [ ] deny: [ ] objects: - type: category id: $pretty_tracker_templates_category allow: [ use_as_template ] deny: [ view, edit ] - type: category id: $sniptt_trackers_category allow: [ create_tracker_items, view_trackers ] deny: [ modify_tracker_items ]


Users

Create some demo users. This seems to be somehow broken for Tiki =< 5.x :(
YAML
objects: - type: users data: name: $profilerequest:Test User 1 Login Name:$foo$ pass: $profilerequest:Password for User 1:$foofoo$ change: $profilerequest:Change password for User 1 after first login? (y/n):$n$ email: $profilerequest:User 1 Email (optional):$foo@foo.foo$ groups: [ $profilerequest:Groups User 1 should be assigned (more groups separate by comma):$Registered$ ] - type: users data: name: $profilerequest:Test User 2 Login Name:$bar$ pass: $profilerequest:Password for User 2:$barbar$ change: $profilerequest:Change password for User 2 after first login? (y/n):$n$ email: $profilerequest:User 2 Email (optional):$bar@bar.bar$ groups: [ $profilerequest:Groups User 2 should be assigned (more groups separate by comma):$Registered$ ]