Plugin Tracker | |
Overview | |
Use this wiki plugin to create a form for inputting an item into a tracker. You can specify what fields will be included in the form. Since Tiki6, this plugin can also be used as a simple way to create custom forms which output the result as pre-formatted wiki pages instead of tracker items. |
Parameters | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Introduced in Tiki 1. Required parameters are in bold .Go to the source code Preferences required: feature_trackers, wikiplugin_tracker
Note The overwrite parameter is only to overwrite tracker items (not wiki pages) - not useful when discarditem="y" Note 2 When using outputwiki as template you cannot use Smarty syntax programmatically because the resulting output is static wiki page (not computed against an existing Tracker Item like with Pretty Trackers and TrackerLists) - you can use only {$f_XX} to indicate the fields values or Argument variables.
|
Administration | |
Warning This plugin can not be used on a cached wiki page.
|
Examples | |
{TRACKER(trackerId="1" fields="1:3:4" action="Send")} Thanks for your contribution! {TRACKER}
|
How to pre-fill some fields | |
In some situation you want to go to a TRACKER page (in our example named SubmitOrder) where fields are automatically pre-filled. In this case you can use an URL like this:
When in the page SubmitOrder, you click on Save, and the field 1 will be filled with the value Tip:
You could also use the url parameter "prefills" with the corresponding "values". See more information here:
|
How to fill an item in more than one step | |
If you want to fill some fields of an item in a page and to fill some other ones in another page, you need to use the param url with the itemId option.
{tracker trackerId="1" fields="1:2:3" url="Page2?itemId"} Page2 {tracker trackerId="1" fields="4:5:6" url="Page3?itemId"} Page3 - the final one that will display the currently submitted itemId: {trackerlist trackerId="1" fields="1:2:3:4:5:6"}
{TABS(tabs="First Tab|Second Tab|Third Tab")} {tracker trackerId="1" fields="1:2:3" action="Next" url="pageName?cookietab=2&itemId"} ///// {tracker trackerId="1" fields="4:5:6" action="Next" url="pageName?cookietab=3&itemId"} ///// {TRACKER(trackerId="1" fields="7:8:9" action="Save")}Saved!{TRACKER} {TABS}
|
How to put multiple tracker plugins into a single transaction? | |
New in Tiki15
The registration and the tracker records of |
How to write a template to display the form elements on the wiki page where the plugin is saved | |
As mentioned, in a template, use the It is also possible to insert the ItemId itself, which is useful to create new wiki pages with tracker plugins inside. To do this you'll have to add an Auto-Increment Field to your tracker, with the appropriate options to auto-fill it with the itemId. This new field content (itemId value) can then be inserted in the template with the syntax seen above. Since Tiki 15.1, wiki page templates can be (optionally) used for email notifications using the "wiki:page name tpl" format instead of Mind: |
How to go from TRACKERLIST to TRACKER on this item | |
{trackerlist trackerId="1" fields="1:2:3:4:5:6" url="Page1?itemId"}
|
How to send email to a recipient when new tracker item is created | |
You can use the parameter Important From Tiki15 onwards, you need to have:
|
Basic plugin usage | |
single recipient, single template {TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient@domain.com|templatename.tpl")}{TRACKER}
{TRACKER(trackerId="15" action="Send" email="|createdBy|")} Thank you for submitting an issue. We will come back to you as soon as possible. What do you want to do now: ((Issue Tracker|submit another issue)) or ((HomePage|browse the website))? {TRACKER}
{TRACKER(trackerId="15" action="Send" email="info@example.com|createdBy|mytemplate.tpl")} Thank you for submitting an issue. We will come back to you as soon as possible. What do you want to do now: ((Issue Tracker|submit another issue)) or ((HomePage|browse the website))? {TRACKER}
{TRACKER(trackerId="15" action="Send" email="info@example.com|createdBy|mytemplate.tpl,mytemplate_subject.tpl")} Thank you for submitting an issue. We will come back to you as soon as possible. What do you want to do now: ((Issue Tracker|submit another issue)) or ((HomePage|browse the website))? {TRACKER}
|
Advanced plugin usage | |
{TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient_1@domain.com,recipient_2@domain.com,recipient_3@domain.com|templatename.tpl")}{TRACKER}
multiple recipients, multiple templates {TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient_1@domain.com,recipient_2@domain.com,recipient_3@domain.com|templatename_a.tpl,templatename_b.tpl,templatename_c.tpl")}{TRACKER}
creator plus second recipient, two different body templates and two different subjects {TRACKER(trackerId="15" action="Send" email="info@example.com|admin@mysite.com,createdBy|admin-template.tpl,creator-template.tpl,admin-template_subject.tpl,creator-template_subject.tpl")} Thank you for submitting an issue. We well come back to you as soon as possible. What do you want to do now: ((Issue Tracker|submit another issue)) or ((HomePage|browse the website))? {redirect page="Test-Tracker-Creator-Email"} {TRACKER}
Wiki page {TRACKER(trackerId="15" action="Send" email="info@exemple.com|12|mytemplate.tpl" wiki="Template page")}Thank you!{TRACKER}
{TR()}Name{TR}: {$f_11} {TR()}Email address{TR}: {$f_12}
|
Templates (to create the email subject and email body) | |
Each template needs two files, one for the subject one for the body. All the templates must be in the templates/mail directory or (since Tiki15.1) in wiki pages and specified as "wiki:page name tpl" (you have to include the "tpl" exact word in the name without a dot, and place it, for instance, at the end). Email body and subject naming conventionsThe naming of these files needs to be slightly different depending on whether you use template files on disk or wiki pages as templates. Template files on diskIf you want to use smarty template files on disk:
{TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient@domain.com|mytemplate.tpl")}{TRACKER}
Wiki pages as Smarty templatesIf you want to use wiki pages as smarty templates:
{TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient@domain.com|wiki:page name tpl")}{TRACKER}
Subject templateHello, the {tr}item{/tr} "{$f_name}" {tr}was modified at{/tr} {$server_name} in {$mail_trackerName}
Body template{tr}Hello,{/tr} {tr}Title:{/tr} {$f_name} {tr}Description:{/tr} {$f_description} {tr}View the tracker item at:{/tr} {$mail_machine_raw}/tiki-view_tracker_item.php?itemId={$mail_itemId}
Template - variable listNot all wiki variables work (pretty tracker syntax won’t work).
|
Related pages | |
See also:
|