Loading...
 
Translation of this page is incomplete.

TrackerFilter 플러그인


Tiki 1.9.5 에서 소개됨

목적

일부 필드를 필터링하여 트래커 항목을 필터할 수 있는 인터페이스를 제공

문법

예제
Copy to clipboard
{TRACKERFILTER(trackerId=1, filters=1/d:2/r:3, fields=1:4:5)}This is the result{TRACKERFILTER}


매개변수:

  • trackerId: 트래커의 Id
  • filters 는 표시되는 서식으로 필터될 수 있는 필드의 목록.
    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 filter (tw >= 1.9.8)
  • all the params of the tracker TRACKERLIST can be added to customize the look of the result (except the filterfield, exactvalue and filtervalue - that will overwrite the filter selection) Some are interesting:
    • goIfOne: go directly to the item display (tiki-view_tracker_item.php) if only one item is found (tikiwiki >= 1.9.8)
    • displayList: y or n to display the full list of items before the first filtering (default: n that displays only the filter the first time)
    • editable: indicate which fields (numeric,colon separated) should be editable from the list of displayed items in the results table. (tiki >= 11.0)
    • editableall: y or N. When enabled (y), all displayed fields (as indicated in the fields param will be used as the list of editable fields. (tiki >= 11.0)
    • line: y or n to display all the filters on the same line (default n)
  • 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
  • googlemapButtons=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.



플러그인 데이터는 결과의 상단에 표기될 것입니다 (tikiwiki >=1.9.8)

예제
Copy to clipboard
{TRACKERFILTER(filters=1/d:2/r:3:(4:5)/sqlsearch, fields=1:4:5, showtitle=n, showlinks=y, showdesc=n, showinitials=n, showstatus=n, status=opc, sort_mode=f_1_asc)}{TRACKERFILTER}


It can be interesting to use the checkbox capacity of trackerlist to do some action on some filtered items

{CODE(caption=>example,wrap=>1)}
{TRACKERFILTER(filters=82/d:84, fields=82:83, checkbox=85/to/Email to checked/send/soho-send_message.php/soho-send_message.tpl)}
{CODE}

You can also get directly connected to the message box

example
Copy to clipboard
{TRACKERFILTER(filters=82/m:84, fields=82:83, checkbox=85/to/Email to checked/xxx/messu-compose.php) /}

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.

Description

Imagine a tracker

trackerfilter3

A search page like this

Copy to clipboard
{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


more

  • a checkbox value is 'y' or 'n' in tw >=2.0 (some bugs were around before tw<2 that insert checkbox values as yes, no, on, or empty- please clean your database if problem)

List Slides