Loading...
 

Plugin TrackerFilter




Introduction

Use this wiki plugin to give an interface to filter a tracker's items by field values.

It should be noted that, whilst it will take a bit more effort to become familiar with and an understanding of UNIFIED SEARCH is also needed, using the CUSTOMSEARCH plugin which utilises the LIST plugin capabilities, provides a much more feature rich set of capabilities.

Syntax

example
{TRACKERFILTER(trackerId=1, filters=1/d:2/r:3, fields=1:4:5)}This is the result{TRACKERFILTER}


Parameters

The plugin has a core set of parameters, but because it also shares all the parameters available from the TRACKERLIST plugin, these additional parameters can be added to customise the look of the result (except the filterfield, exactvalue and filtervalue - using these parameters will overwrite the core filter selection)

The core set of parameters are as follows:
  • trackerId: Id of the tracker
  • filters is the list of fields that can be filtered with the format of their display.
    The fields are identified by their numeric Ids. All the fields must belong to the same tracker. After tiki>=8, the status can be a filter and must be entered as status or Status (Filter example: 3/d:Status/d)
    The Id can be followed by the character / and one of this format:
    • d: drop down list of all the values occurring for the field: only one value can be selected
    • r: radio buttons of all the values occurring for the field: only one value can be selected
    • m: multiple choice in the drop down list of all the values occurring for the field( a multiple choice acts as an OR between the values of the choice)
    • c: checkbox (multiple choice) in the drop down list of all the values occurring for the field
    • t: text entry (tikiwiki >= 2.0): a text input where the user must enter a part of the text
      If the text contains % like a%. it will search all the values beginning with % (can also do %a or a%b%c) or a* or *a
    • T: text entry (tikiwiki >= 2.0): a text input where the user must enter an exact value of the field
    • i: text entry + initial (tikiwiki >=2.0): a list of initial that will directly filter on an initial. Note: if you use initial, not other field can be filtered
    • sqlsearch: advanced mysql search (tikiwiki >= 5.0): a list of fields where a mysql advanced search will be done - Note: the search is done field content per field content: It means if you query A B and A is in a field and B in another one you will not find the item. The syntax will be (1:2)/sqlsearch means 'do a advanced mysqlsearch on fields 1 and 2.
    • > or < or >= or <=: comparison (tw >=6.0): the field will be compared using the format as operator. Ex: filters="1/>=" will find all the items with the field 1 bigger (for a numeric) or after (for a date) the value the user will give
  • fields will show the fields displayed for the selected items
  • action : name of the submit button - default is "filter" (tw >= 1.9.8)
  • noflipflop: will not show the flipflop to hide and display the list of filters. (tw >=6.0)
  • export_action: (tikiwiki >= 6.0) if set to appropriate text e.g."Confirm CSV Download" this over-rides the normal trackerfilter approach and displays a button with the designated text that directly exports the set of fields specified as a CSV file. A filter to define a specific 'filter set' must be defined by using the filterfield, filtervalue/exactvalue parameters, formatted in the standard ways. Additional parameter options are (default|alternate):
    • export_itemid=y|n - includes the ItemId in the export
    • export_status=n|y - includes the status field in the export
    • export_modif=n|y - includes the modified date in the export
    • export_created=n|y - includes the creation date in the export
    • export_charset=UTF-8|ISO-8859-1 - defines the character set to be used for the export
  • mapButtons=y|n - Display Mapview and Listview buttons (from Tiki6, requires Google Maps feature)
  • url replace tracker item url with the url you input in the field. You can include the Item Id. This is very usefull combined with TrackerList and/or Pretty tracker to link the results of the tracker filter to another page (wiki or template) where the item will be displayed as single entity (using TrackerList plugin).
    Use Case : Search and display tracker item in wiki pages without any relation to the trackers usual design (buttons, pagination, etc)
    Set the plugin TrackerFilter in a wiki page to display and filter tracker item. Be sure it is working with the usual parameters and display items. Set the parameter Show Links to yes (showlinks="y") and in the parameter URL set the page that will be used to display the item once the item link is clicked with the following url="singleitem_tpl?itemId".
    Create a second wiki page named "singleitem_tpl". In this page set the plugin TrackerList with the Tracker Id parameter and set for Wiki Page (wiki="item_tpl").
    Create a third page named item_tpl that you are now free to design the way you want that will display the item fields.
    That way you can design all the way the page using wiki syntax and CSS and the user will never have the feeling he is looking at a tracker or at trackers items.

The full set of available parameters, the core TRACKERFILTER set and the additional ones from TRACKERLIST, are set out in the various TABS below:


Introduced in Tiki1. Required parameters are in bold.
Preferences required: feature_trackers, wikiplugin_trackerfilter
Parameters Accepted Values Description Default Since
(body of plugin) notice
trackerId digits Numeric value representing the tracker ID 1
tstotalformat Format for table totals (click here for patterns). Example: #,###.
ldelim Smarty left delimiter for Latex generation. Example:@{ { 2.0
rdelim Smarty right delimiter for Latex generation Example:}@ } 2.0
tpl Use content of the specified tpl file as template to display the item. Use {$f_fieldId} to display a field with ID fieldId. 2.0
urlafterdelete url Url to redirect to after delete 11.0
force_separate_compile (blank)
y
n
Compile each item separately instead of compiling the entire template. y 11.0
displaysheet (blank)
y
n
Display tracker as a spreadsheet (not used by default) n 6.0
list_mode (blank)
y
n
csv
Set output format. Yes (y) displays tracker list view with truncated values (default); No (n) displays in tracker item view; Comma Separated Values (csv) outputs without any HTML formatting. y 3.0
popup digits
separator: :
Colon-separated list of fields which will display in a tooltip on mouse over. Example: 6:7 2.0
sort (blank)
y
n
Display columns in the order listed in the fields parameter instead of by field ID (field ID order is used by default n 2.0
sortchoice text
separator: :
Add a dropdown of sorting choices. Separate each choice with a :. For each choice, use the format value|label. See sort_mode for value choices. Example with two sorting choices: sortchoice="created_desc|Newest first:lastModif_desc|Last modified first" 5.0
sort_mode created_asc, created_desc, lastModif_asc, lastModif_desc, f_fieldId_asc, f_filedId_desc (replacing fieldId with the field ID number, e.g. f_3_asc) Sort rows in ascending (_asc) or descending (_desc) order based on field ID, date created or date last modified 1
stickypopup (blank)
y
n
Choose whether the popup tooltip will stay displayed on mouse out (does not stay open by default) 2.0
export (blank)
y
n
Show an export button (not shown by default) n 3.0
fields digits
separator: :
Colon-separated list of field IDs for the fields to be displayed. Example: 2:4:5. The field order specified here determines the column order if the sort parameter is set to y. 1
force_compile (blank)
y
n
Force Smarty to recompile the templates for each tracker item when using a wiki page as a template. Default=n (best performance) n 6.0
editable digits
separator: :
Colon-separated list of fields for which inline editing will be enabled. 11.0
editableall (blank)
y
n
Allow all displayed fields to be editable y 11.0
tplwiki pagename Use content of the wiki page as template to display the item but with as little parsing on the content as with a tpl on disk. The page should have the permission tiki_p_use_as_template set, and should only be editable by trusted users such as other site admins 6.5 & 7.1
wiki pagename Use content of the wiki page as template to display the item. The page should have the permission tiki_p_use_as_template set, and should only be editable by trusted users such as other site admins 2.0
compute fieldId/operator, separated by : Sum or average all the values of a field and displays it at the bottom of the table. fieldId/sum:fieldId/avg 3.0



 Note

These parameters allow the results to be pre-filtered before the user sees them. To allow the user to filter, sort or paginate results, see the parameters under the tablesorter tab.

Introduced in Tiki1. Required parameters are in bold.
Preferences required: feature_trackers, wikiplugin_trackerfilter
Parameters Accepted Values Description Default Since
filters The list of fields that can be used as filters along with their formats. The field number and format are separated by a / and multiple fields are separated by :.Format choices are:
d - dropdown
r - radio buttons
m - multiple choice dropdown
c - checkbox
t - text with wild characters
T - exact text match
i - initials
sqlsearch - advanced search
>, ><, >>=, ><= - greater than, less than, greater than or equal, less than or equal.
Example: 2/d:4/r:5:(6:7)/sqlsearch
1
view_user Will display the items of the specified user 2.0
max int Maximum number of items to display or -1 for all items. Defaults to max records preference, if set. Pagination will not show if all items are shown by setting to -1. 1
offset int Offset of first item. Default is no offset. 0 6.0
periodQuantity int Numeric value to display only last tracker items created within a user defined time-frame. Used in conjunction with the next parameter "Period unit", this parameter indicates how many of those units are to be considered to define the time frame. Use in conjunction with max=-"1" to list all items (by default max is set to 10). 6.5, 7.x & 8.0
forceoffset (blank)
y
n
Fix offset to that specified. This will disallow pagination. n 8.0
periodType (blank)
c
m
Time period after creation or after modification 6.7, 7.x, 8.4 & 9.0
periodUnit (blank)
hour
day
week
month
Time unit used with "Period quantity" 6.5, 7.x & 8.0
status (blank)
o
p
c
op
oc
pc
opc
Only show items matching certain status filters (only items with open status shown by default) o 1
exactvalue any text
separator: :
Exact value (or multiple values) that correspond to filterfield.
Special search values to filter by:
categories(x) - tracker item is in category with ID x or one its descendants
notcategories(x) - tracker item is not in category with ID x or one of its descendants
preference(name) - match against the value of a Tiki preference
notpreference(name) - match if value does not equal a Tiki preference value
not(value) - match if the field does not equal "value"
field(x, itemid) - match field with ID x in item with ID itemid. field(x) can be used if the itemId URL parameter is set
notfield(x, itemid) - match if not equal to field with ID x in item with ID itemid field(x) can be used if the itemId URL parameter is set
The following comparisons can also be applied to date fields by using date phrases that PHP recognizes (see http://us.php.net/manual/en/function.strtotime.php ):
less(value) - match if less than "value"
greater(value) - match if greater than "value"
lessequal(value) - match if less than or equal to "value"
greaterequal(value) - match if greater than or equal to "value"
1
filterfield digits
separator: :
Colon-separated list of fields to allow filtering on. 1
filtervalue any text
separator: :
Filter value (or multiple values) that correspond to filterfield. For better performance, use exactvalue instead.
Special search values to match:
*value - text that ends in "value"
value* - text that begins with "value"
#user - the current user's login name
#group_default - the current user's default group
1
ignoreRequestItemId (blank)
y
n
Ignore the itemId url parameter when filtering list (not ignored by default) n 5.0
itemId digits
separator: :
Colon-separated list of item IDs to restrict the listing to 2.0, multiple since 3.0
view (blank)
page
user
ip
Display only the items of the following:
user - the current user
page - the current page name
ip - the current IP address
2.0
goIfOne (blank)
y
n
Display the item rather than list if only one item is found 1



Introduced in Tiki1.
Preferences required: feature_trackers, wikiplugin_trackerfilter
Parameters Accepted Values Description Default Since
action Label on the submit button. Default: Filter. Use a space character to omit the button (for use in datachannels etc) Filter 2.0
checkbox Adds a checkbox on each line to perform an action. Required elements are separated by /. Those elements are:
FieldId - the value of this field will be posted to the action
PostName - the name of the post
Title - the title of the submit button
Submit - the name of the submit button
ActionUrl - the file that will be called upon submit
Tpl - optional template inserted before the submit button and returned
SelectType - Leave empty for multiple select, or use dropdown or radio.
Format: checkbox="FieldId/PostName/Title/Submit/ActionUrl/Tpl/dropdown"
Example: checkbox="6/to/Email to selected/submit/messu-compose.php//dropdown"
1
moreurl url More link pointing to specified URL instead of default tracker item link tiki-view_tracker.php 2.0
displayList (blank)
y
n
Show the full list (before filtering) initially (filtered list shown by default) n 2.0
showlastmodif (blank)
y
n
Last modification date display is based on tracker settings unless overridden here 2.0
showlastmodifby (blank)
y
n
Last modified by user display is based on tracker settings unless overridden here 14.0
line (blank)
y
in
n
Displays all the filters on the same line (not shown on same line by default) n 2.0
mapButtons (blank)
y
n
Display Mapview and Listview buttons 6.0 - was googlemapButtons until 12.0
more (blank)
y
n
Show a 'more' button that links to the tracker item (not shown by default) n 2.0
noflipflop (blank)
y
n
The toggle button to show/hide filters will not be shown if set to Yes (y). Default is to show the toggle. n 6.0
showcloseitem (blank)
y
n
Show a close item option (not shown by default) n 8.0
showcreated (blank)
y
n
Creation date display is based on tracker settings unless overridden here 2.0
showdelete (blank)
y
n
Show a delete icon for each item (not shown by default) n 4.0
showdesc (blank)
y
n
Show the tracker's description (not shown by default) n 1
showrss (blank)
y
n
Show an RSS feed button (not shown by default) n 5.0
showfieldname (blank)
y
n
Use the field names as column titles (used by default) y 1
showinitials (blank)
y
n
Show an alphabetical index by first letter to assist in navigation (not shown by default) n 1
shownbitems (blank)
y
n
Show the number of items found (not shown by default) n 2.0
showitemrank (blank)
y
n
Show item ranks (not shown by default) n 4.0
showlinks (blank)
y
n
r
Show links to each tracker item (not shown by default). At least one field needs to be set as Public in order for this to work. n 1
showopenitem (blank)
y
n
Show an open item option (not shown by default) n 8.0
showpagination (blank)
y
n
Determines whether pagination will be shown (shown by default) y 4.0
showpenditem (blank)
y
n
Show a pending item option (not shown by default) n 8.0
showmap (blank)
y
n
Show Map of results (not shown by default) 12.0
showstatus (blank)
y
n
Show the status of the items (not shown by default) n 1
showtitle (blank)
y
n
Display the title of the tracker (not shown by default) n 1
showwatch (blank)
y
n
Show a watch button (not shown by default) 5.0
silent (blank)
y
n
Show nothing if no items found (the table header and a 'No records found' message is shown by default). 4.0
url url The link that will be on each main field when showlinks="y". Special values:
url="mypage?itemId" - will link to the item based on its item ID
url="mypage?tr_offset" - will link to the item based on its offset value
url="sefurl" - will link to the item using itemX (where X is the item ID) for when SEFURL is being used
vi_tpl - use to show the item without admin buttons and with a back button when using a template (Display > Section Format must be set to "Configured" in the tracker properties). Example: url="tiki-view_tracker_item.php?vi_tpl=wiki:PageName&itemId"
ei_tpl - similar to vi_tpl except that admin buttons are shown for users with proper permissions when "Restrict non admins to wiki page access only" is set in the tracker properties.
2.0, 3.0 for itemId, 11.0 for tr_offset, 14.0 for sefurl and vi_tpl



Introduced in Tiki1.
Preferences required: feature_trackers, wikiplugin_trackerfilter
Parameters Accepted Values Description Default Since
calendartitle text Enter a title to display a calendar title (not set by default) 6.0
calendarbeginmonth (blank)
y
n
Set whether calendar will begin at the beginning of the month (does by default). y 6.0
calendardelta (blank)
+month
-month
+bimester
-bimester
Set the calendar delta that will be shown (not set by default) 6.0
calendarpopup (blank)
y
n
Calendar items will popup, overrides the stickypopup parameter if turned off (default is to pop up). y 6.0
calendarviewmode (blank)
month
bimester
trimester
quarter
semester
year
Calendar view type time span (default is month) month 6.0
calendarviewnavbar (blank)
y
n
partial
Show calendar navigation bar (shown by default). y 6.0
calendarstickypopup (blank)
y
n
Calendar item popups will stay open if set to y (Yes). Not sticky by default n 6.0
calendarfielddate digits
separator: :
Used to display items in a calendar view. One fieldId if one date, or 2 fieldIds separated with : for start:end 6.0



Introduced in Tiki1.
Preferences required: feature_trackers, wikiplugin_trackerfilter
Parameters Accepted Values Description Default Since
export_action Label for an export button. Leave blank to show the usual "Filter" button instead. 6.0
export_charset Character set to be used if the Export CSV option is used UTF-8 11.1
export_created (blank)
y
n
Export the created date field if the Export CSV option is used n 11.1
export_modif (blank)
y
n
Export the modified date field if the Export CSV option is used n 11.1
export_status (blank)
y
n
Export the status field if the Export CSV option is used n 11.1





Additional note on parameters

  • Info on 'filters' parameter field formats:
    • d: drop down list of all the values occurring for the field: only one value can be selected
    • r: radio buttons of all the values occurring for the field: only one value can be selected
    • m: multiple choice in the drop down list of all the values occurring for the field( a multiple choice acts as an OR between the values of the choice)
    • c: checkbox (multiple choice) in the drop down list of all the values occurring for the field
    • t: text entry: a text input where the user must enter a part of the text
      If the text contains % like a%. it will search all the values beginning with % (can also do %a or a%b%c) or a* or *a
    • T: text entry: a text input where the user must enter an exact value of the field
    • i: text entry + initial: a list of initial that will directly filter on an initial. Note: if you use initial, not other field can be filtered
    • sqlsearch: advanced mysql search (Tiki5): a list of fields where a mysql advanced search will be done - Note: the search is done field content per field content: It means if you query A B and A is in a field and B in another one you will not find the item. The syntax will be (1:2)/sqlsearch means 'do a advanced mysqlsearch on fields 1 and 2.
    • > or < or >= or <=: comparison (Tiki6): the field will be compared using the format as operator. Ex: filters="1/>=" will find all the items with the field 1 bigger (for a numeric) or after (for a date) the value the user will give
  • Notes on the use of the export option:
    • if the export_action parameter is not empty then the basic functionality of the plugin is changed to allow designated fields and other parameters to be exported as a CSV file for ALL the tracker items with the substitution of the normal 'Filter' button by a custom button using the export_action text
    • the fields that are exported are those specified in the 'fields' parameter
    • other item values can be exported by setting the following parameters:
      • export_status is set to 'y' to show the status of the individual item in the CSV file (the default is 'n')
      • export_created is set to 'y' to show the item's creation date in the CSV file (the default is 'n')
      • export_modif is set to 'y' to show the item's modification date in the CSV file (the default is 'n')
      • export_charset can be set to the character set to be used in the export ie typically UTF-8 which is the default
    • Please note: if the export_action parameter is not empty then there is currently a problem with using the plugin editor, since for the export option there is no need to set the filters parameter - but for normal use this is a required parameter. This exception is allowed for in the main plugin code but at present the plugin editor does not recognise the exception and will not complete the 'Insert' until this parameter is entered. It is therefore recommended that edits to the trackerfilter plugin are carried direct in the main editor(s) when using the export option.
  • url replace tracker item url with the url you input in the field. You can include the Item Id. This is very useful combined with TrackerList and/or Pretty tracker to link the results of the tracker filter to another page (wiki or template) where the item will be displayed as single entity (using TrackerList plugin).
    Use Case : Search and display tracker item in wiki pages without any relation to the trackers usual design (buttons, pagination, etc)
    Set the plugin TrackerFilter in a wiki page to display and filter tracker item. Be sure it is working with the usual parameters and display items. Set the parameter Show Links to yes ( showlinks="y" ) and in the parameter URL set the page that will be used to display the item once the item link is clicked with the following url="singleitem_tpl?itemId" .
    Create a second wiki page named "singleitem_tpl". In this page set the plugin TrackerList with the Tracker Id parameter and set for Wiki Page ( wiki="item_tpl" ).
    Create a third page named item_tpl that you are now free to design the way you want that will display the item fields.
    That way you can design all the way the page using wiki syntax and CSS and the user will never have the feeling he is looking at a tracker or at trackers items.

Field types allowed

Field type since tiki version
category - e 6, and probably earlier
drop-down list - d 6, and probably earlier
email - m 6, and probably earlier
text field - t 6, and probably earlier
textarea - a 6, and probably earlier
numeric field - n 6, and probably earlier
country - y 6, and probably earlier
user 6, and probably earlier
group 6, and probably earlier
item list 9, only as text
item link 9, only as text
auto-increment 9
freetags 9


Note:
For a drop-down list, the values of the drop down list will be displayed, For the other field types, the values found in the database will be displayed.

Examples

It can be interesting to use the checkbox capacity of trackerlist to do some action on some filtered items:
{trackerfilter filters="82/d:84" fields="82:83" checkbox="85/to/Email to checked/send/soho-send_message.php/soho-send_message.tpl"}


You can also get directly connected to the message box
{trackerfilter filters="82/m:84" fields="82:83" checkbox="85/to/Email to checked/xxx/messu-compose.php"}


Imagine a tracker
trackerfilter3

A search page like this
{trackerfilter trackerId="1" filters="5:6:9:8/d:(2:1:3)/sqlsearch" showlinks="y" fields="5:2:1" wiki="tracker ideas"}

The page will look like
trackerfilter1


and when you click on filter you will have something like this
trackerfilter2

doc.tiki.org


Bootstrap

AdminGuide

UserGuide

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 (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
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 8.x
Draw 7.x
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, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
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 (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC


Tiki Newsletter

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