Loading...
 
Skip to main content

History: Data Channels

Comparing version 7 with version 14

Lines: 3-17Lines: 3-203
 Data channels create a named pipe to run ((profiles)) from user space. One channel per line. Each line is comma delimited and contain channel name, domain, profile, allowed groups. Data channels create a named pipe to run ((profiles)) from user space. One channel per line. Each line is comma delimited and contain channel name, domain, profile, allowed groups.
-You use them with ((PluginDataChannel)). Starting in ((Tiki6)), a payment parameter can be added and thus, the data channel will only be run when the payment is done. +You use them with ((PluginDataChannel)). Starting in ((Tiki6)), a ((payment)) parameter can be added and thus, the data channel will only be run when the payment is done.
 Please see: Please see:
-http://profiles.tikiwiki.org/Data+Channels +http://profiles.tiki.org/Data+Channels
-A good example is http://profiles.tikiwiki.org/Project_Management +A good example is http://profiles.tiki.org/Project_Management
 +!!# Usage with trackerfilter/trackerlists
 +The idea of it is to let you set up a trackerfilter/trackerlist with checkboxes, let the user select the ones they want, and then run a datachannel (profile) on each item.
 +Example:
 +-=Test page=-
 +!!!# Tracker list multi select tester
 +{CODE(wrap=>1)}
 +{trackerfilter filters="2/d:3/d:4/d" noflipflop="y" trackerId="1" fields="2:3:4:5" other_filters="1" checkbox="0/itemId" wiki="tracker checkbox test tpl"}
 +---
 +{DATACHANNEL(channel="test_channel" emptyCache="none")}
 +itemId,external=input[name='itemId[]']:checked
 +surname,external=input[name^='surname[']
 +forename,external=input[name^='forename[']
 +{DATACHANNEL}
 +{CODE}
 +-=Pretty tracker template: tracker checkbox test tpl =-
 +!!!# tracker checkbox test tpl
 +{CODE(wrap="1")}
 +{if $checkbox}
 +{$item.field_values[$checkbox.ix].value|escape}
 +<input type="{$checkbox.type}" name="{$checkbox.name}[]" value="{if $checkbox.ix > -1}{$item.field_values[$checkbox.ix].value|escape}{else}{$item.itemId}{/if}" />{/if} __{$f_2} {$f_3} {$f_4}:__ {$f_5}
 +<input type="hidden" name="surname[{$item.itemId}]" value="{$f_3}" />
 +<input type="hidden" name="forename[{$item.itemId}]" value="{$f_4}" />
 +{CODE}
 +-=Note=-
 +You need is_html enabled and HTMLPurify off at the moment (as of August 2010) for the hidden inputs to work in this example. Could be replaced by {HTML} or some other plugins probably.
 +!!# Example usage with hidden fields and Tracker plugin
 +I show this example because external fields only seem to work with tracker fields of type text, not drop-downs.
 +Tracker number and field numbers need to be adapted to your Tiki site.
 +This data channel will show how to create a tracker item and a group and a wiki page which shows the tracker item.
 +!!!#Create Tracker 2
 +!!!!Fields
 +*Field 5 (Town) is of type "text" (this would also work with the ''external'' data channel field syntax)
 +*Field 6 (Country) is of type "Country selector", which looks like a Drop-down
 +*Field 7 (Continent) is of type "Drop-down"
 +{FADE(label="Gory details of fields extraction" icon="y")}{CODE(wrap="1")}[FIELD5]
 +fieldId = 5
 +name = Town
 +permName = town
 +position = 10
 +type = t
 +options =
 +isMain = y
 +isTblVisible = y
 +isSearchable = n
 +isPublic = y
 +isHidden = n
 +sMandatory = y
 +description =
 +descriptionIsParsed = n
 +[FIELD6]
 +fieldId = 6
 +name = Country
 +permName = country
 +position = 20
 +type = y
 +options =
 +isMain = n
 +isTblVisible = n
 +isSearchable = n
 +isPublic = y
 +isHidden = n
 +sMandatory = n
 +description =
 +descriptionIsParsed = n
 +[FIELD7]
 +fieldId = 7
 +name = Continent
 +permName = continent
 +position = 30
 +type = d
 +options = Europe,Africa,Asia,America
 +isMain = n
 +isTblVisible = n
 +isSearchable = n
 +isPublic = y
 +isHidden = n
 +sMandatory = n
 +description =
 +descriptionIsParsed = n
 +{CODE}{FADE}
 +!!!#Create data channel
 +Create Data channel in ''Admin'' → ''Admin Home'' → ''Profiles'' → ''Advanced''
 +^New_Town,tiki://local,template_Add_New_Town,Admins^
 +This creates a data channel which only admins can use.
 +!!!# The page which calls the data channel
 +This contains the Tracker plugin, the datachannels plugin and the JQ plugin which binds them together
 +{CODE(caption="Create New Town" wrap="1")}-=Create New Town=-
 +{tracker trackerId="2" fields="5:6:7" showtitle="n" formtag="n"}
 +{DATACHANNEL(channel="New_Town" buttonLabel="Create" class="channel" debug="y" )}
 +Town,hidden=
 +Country,hidden=
 +Continent,hidden=
 +{DATACHANNEL}
 +{JQ()}
 +// On reporte les changements
 +$("input[name='ins_5']").bind('change', function() {
 + valeur=$(this).val(); // This is the syntax for text fields
 + $("input[name='Town']").val(valeur);
 +});
 +$("select[name='ins_6']").bind('change', function() {
 + valeur=$(this).find("option:selected").val(); // This is the syntax for drop-down fields
 + $("input[name='Country']").val(valeur);
 +});
 +$("select[name='ins_7']").bind('change', function() {
 + valeur=$(this).find("option:selected").val(); // This is the syntax for drop-down fields
 + $("input[name='Continent']").val(valeur);
 +});
 +{JQ}{CODE}
 +The JQ plugin will need approval
 +''View details'' → ''Approve''
 +!!!# The page which contains the data channel code
 +{CODE(caption="template_Add_New_Town" wrap="1")}This is the template for the data channel
 +{CODE(caption="YAML" wrap="1" colors="yaml")}
 +mappings: #Rename variable for permissions (aka groups)
 + varNameTown: $profilerequest:Town$Unnamed Town$
 +permissions: #Creates a group named after the Town name, with options
 + varNameTown:
 + autojoin: n
 + description: $profilerequest:Continent$ $ - $profilerequest:Country$ $ #The group description uses other variables
 + objects:
 + -
 + type: group
 + id: varNameTown
 + allow: #Permissions of group varNameTown
 + - group_view
 + - group_view_members
 + - group_add_member
 + - group_remove_member
 + - group_join
 +objects:
 + -
 + type: tracker_item # Create the tracker item
 + ref: town_file_id # This is how we reference the tracker item from within the wiki page
 + data:
 + tracker: 2
 + status: open
 + values:
 + - [ 5, $profilerequest:Town$Unnamed Town$ ]
 + - [ 6, $profilerequest:Country$ $ ]
 + - [ 7, $profilerequest:Continent$ $ ]
 + -
 + type: wiki_page # Create a page
 + data:
 + name: Town $profilerequest:Town$Unnamed Town$
 + content: wikicontent:template_Town_Page # the content of the page is defined it this template
 + mode: create
 + wiki_authors_style: none
 +{CODE}{CODE}
 +!!# The page which contains the template for the wiki page which is created with the data channel
 +This is just to illustrate the use of references.
 +{CODE(caption="template_Town_Page" wrap="1")}-=Town $profilerequest:Town$Unnamed Town$=-
 +Blah blah
 +{trackerlist trackerId="2" itemId="$profileobject:town_file_id$"}
 +More text{CODE}
 -=alias=- -=alias=-
-* (alias(data channel))

*
(alias(datachannel))
+(alias(data channel)) | (alias(datachannel)) | (alias(DataChannels))

History

Advanced
Information Version
drsassafras
Mass search and replace
14
Current
drsassafras Mass search and replace 13
Jean-Marc Libs 12
Jean-Marc Libs 11
Marc Laporte 10
Jonny Bradley Code Plugin modified by editor. 9
Marc Laporte 7
Marc Laporte 6
Marc Laporte 5
Marc Laporte 4
Marc Laporte 3
Marc Laporte 2
Marc Laporte 1

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki