Loading...
Use
Create
Develop
FAQ
Troubleshooting
History: Data Channels
View page
Source of version: 18
(current)
__Prerequisite:__ ((Profile Developer Documentation)) Data channels are "named pipes" which allow one or more profiles to be run at the command of some user or external event. They can be used to: * Allow external applications to feed data into tiki * Create forms to execute complex actions in tiki * Can be called from a wiki plugin. Data channel profiles use the ((User Input)) syntax to transmit information from the request to the profile. Used locally, data channels can be a way to call a set of profiles which all refer to the same user name or some other variables. !Defining a Data Channel Channels are defined in Admin>Profiles>Advanced tab, using a textbox. Here you will name a wiki page that contains the YAML code for the channel. The format of the textbox is comma delimited, one channel per line. See ((Administration Interface)). {CODE(caption=>Sample configuration)} svn_commit, tiki://local, SvnCommit, Subversion, Admins create_workspace, tiki://local, WorkspaceConfiguration, ProjectLeads, Admins {CODE} The parameters, comma separated, are * A unique name composed of alphanumeric characters and underscores * A profile domain, usually __tiki://local__ to use local pages as profiles * A wiki pagename where the YAML is. * One or more groups allowed to execute the channel The above sample creates two channels. One that will receive commit messages from subversion and save them using the profile located in the local wiki page called ''SvnCommit''. The channel can only be used by administrators for test purposes and users in Subversion (which likely contains a single system user with credentials stored in the SVN plugin). The second one creates a base workspace and is accessible by normal users. A custom form (using the ((doc:PluginDataChannel)) ) will be required to use it. ^__Caution:__ Channels ''can'' use remote profiles, but it is not advisable - you can do a lot of damage if someone has changed the profile since you last looked at it. Unless the remote tiki installation is in a controlled environment, like an intranet configuration repository, __remote channels are not recommended__.^ !Editing the Data Channel Once you have defined the data channel, go to the specified wiki pages and include one or more blocks of YAML code (using the ((doc:pluginCODE))). From here on, it works the same as all other profiles. See ((Object References)) for how the profiles share a variable. !Calling Data Channels You can call a data channel either from a plugin, or via 'yourdomain.com/tiki-channel.php'. The request uses a simple HTTP request to perform the desired task. The file can execute multiple channels simultaneously and will verify that the user can execute them all before executing any of them. Basic authentication will be used for anonymous users if any of the channels require groups other than Anonymous to handle machine requests. Root keys on GET or POST request: * __return_uri__: Optional URI to return to when processed for end users * __channels__: Mandatory array containing the channels to process. Each element of the array contains: ** __channel_name__: Mandatory name of the channel to process ** ''Arbitrary keys'': Will be sent to the installer as user input {CODE(caption="Sample POST request", wrap="1")} channels[0][channel_name]=svn_commit&channels[0][version]=16345&channels[0][message]=Sample+Message&channels[1][channel_name]=svn_file_modification&channels[1][version]=16345&channels[1][file]=test.php&channels[2][channel_name]=svn_file_modification&channels[2][version]=16345&channels[1][file]=test2.php&return_uri=/success.php {CODE} !Example Suppose you want to create a wiki page but ask the user for the name of the page via a data channel. __Step 1:__ Define a data channel on your local install in Admin>Profiles>Advanced. Here it is called simply ''test''. Paste the following in the data channels window. {CODE()} test, tiki://local, DataChannelTest, Admins {CODE} ^__Tip:__ Watch your capitalization. Data Channels are case sensitive.^ __Step 2:__ Create the profile (YAML) for the data channel in the wiki page DataChannelTest. Create the page and paste the following, (including the CODE plugin). {CODE()} {CODE(caption=>YAML)} objects: - type: wiki_page data: name: $profilerequest:page_name$My Personal Page$ content: xxxxx {CODE} {CODE} __Step 3:__ Create a wiki page with the plugin to summon the data channel. {CODE()} {DATACHANNEL(channel=test)} page_name,Give a Page Name {DATACHANNEL} {CODE} * the result ::{img attId=31}:: !Related http://blog.lphuberdeau.com/wordpress/2009/01/25/adding-collaboration-and-durability-to-code-reviews/ !Other Examples of uses ((Project_Management)) ! Needed profiles * A site owner would like that all users that register can create their own image galleries, one public and one private. * A company would like to deploy a timesheet for each employee. ** Employees can only see their own timesheet. ** Supervisors can see all the timesheets of employees in their group.
Menu
Featured profiles
Profiles in Wizard
Profiles Todos
Handlers
Profiles Tester
Admin
of this site
Current Profiles
Tiki version
21.x
24.x
26.x
27.x
28.x
Deprecated
25.x
state
Not fully functional yet
alpha
beta
release
type
Available in the Profiles Wizard (12+)
Featured profiles
Full profile (out of the box & ready to go)
Learning profile (to show off feature)
Long tail
Mini-profile (can be included in other)
Profile-snippet (optional but needs another "parent" profile)
Security
Tests
Latest Changes
Hide Fixed Top Nav Bar on Scroll 19
Easy_GeoBlog
test_profile_change
Test_all_tracker_field_types_profile
Profiles_in_Wizard
Random_header_images_14
Hide Fixed Top Nav Bar on Scroll 19
How to Create Profiles
Test_All_Plugins
JonnyBs_Luxury_Tiki_Setup
Collaborative_Multilingual_Terminology
Profile_Test_all_Modules_Test_all_Modules_page
...more
Like almost all *.tiki.org sites, you can log in with your login from
https://tiki.org
(register over there)
Search
Find
Most Popular Tags
admin
agenda
alias
antibot
antibot captcha
app
archive
articles
banning
batch
blogs
calculations
calendars
cart
categories
cluster
codemirror
comments
computation
contact us
datachannel
debug
debug console
dropdown with other
error messages
features
file galleries
forums
geo
geocms
geolocation
group homepages
group watches
header
i18n
images
item link
items list
jquery
languages
location
map
maps
maths
menu
menupage
multilingual
ol3
ol5
openlayers
paypal
plugin
plugin alias
plugin datachannel
plugin fade
plugin tabs
plugin trackerlist
pretty trackers
print
project management
r
r project
realnames
rss
static
static text
statistics
stats
structures
syntax highlighter
tablesorter
template
trackers
user watches
visualization
watches
webservice
wiki
wiki argument variables
wiki structures
Tiki Newsletter
Subscribe to the Tiki newsletter.
Don't miss major announcements and other news!