Version 2 (modified by sebastian, 6 years ago) (diff) |
---|
After taging and enrich your media with MetaData you would like how to select or find specific media selected by the MetaData. Follwoing page describes parameters for the media explorer.
The media explorer of phTagr has some top level sections followed by parameters to query only a subset of the media.
Top Levels
The top levels are immediatly followed by the URL of the media explorer.
- tag/tag[,tag2,...]
- Show all media with a specific tag
- category/category[,category2,...]
- Show all media of a specific category
- location/location[,location2,...]
- Show all media of a specific location
- date/YYYY[/MM[/DD]]
- Show media of a specific date. The date can be given in years or month or even a specifc date. date/2008 shows all media of the year 2008, while date/2008/05/11 shows media of 11th may of 2008
- view/
- General view which is used to build an own query with parameters. E.g. view/tags:night/sort:-date
- search/
- Shows the advanced search form
- user/user
- Shows only media of a specific user
Top Levels for Users
Following top level is only for users
- group/group:group name or group ID
- Select a specific group
Parameters
Parameters can be attached to the URL of the media explorer (and RSS, MediaRSS URL, too). All parameters are concatenated with a slash. E.g. media explorer URL/query/parameter1/parameter2/parameter3. Each parameter has a name and a value which is separated by a colon. Eg. name:value. A full example looks like view/tag:night/category:vacation/sort:-date.
Parameter exclusion
Some parameter do support exclusion. A excluded parameter has a minus (-) sign prefixed. For example tag:-night will exclude all media with tag night.
Required parameter
Some parameter do support to be required. A required parameter has a plus (+) sign prefixed. For example tag:+night will match all media with at least tag night.
Optional Parameter
By default all parameter are required and do not need to be prefixed with plus sign. However, if at least one parameter is explicitly marked as required all other parameter become optional (Only parameter which support required flag are optional. Other parameters are still required).
For example: view/tag:night/category:vacation/sort:newest is equivalent to view/tag:+night/category:+vacation/sort:newest. sort parameter does not support required flag. With view/tag:night/category:+vacation/sort:newest means that the media must have the the category vacation and can have the tag night. Media with most matches are shown first even if a media with less matches follows the sort order. In our example: A media B with category vacation and tag night is shown before a media A with only category vacation while media A is newer than media B.
Special Values
There are special values like any or none. Value any matches any assigned meta data of given parameter. Value none matches all media which have no assignments for given parameter.
Parameter List
- category:word|any|none
- Show media with category of word. Exclusion and required is supported.
- city:word|any|none
- Show media with city of word. Exclusion and required is supported.
- country:word|any|none
- Show media with country of word. Exclusion and required is supported.
- from:YYYY-MM-DD
- All media starting with given date. Eg. from:2009-03-26 shows all media at not older than 26th march of 2009
- geo:none|any
- Show media with no or any geo information
- location:word|any|none
- List of locations which the media should include. The location include tags from sublocation, city, state, and country. Exclusion and required is supported
- order:sort order
- Sort order. Possible values are: date (youngest first), -date (oldest first), random, newest, changes
- page:number
- Set the page number. Eg. page:2 shows the 2nd page
- show:number
- Page size. Eg. show:36 displays 36 media
- state:word|any|none
- Show media with state of word. Exclusion and required is supported.
- similar:word
- Show media with similar values of word. Similar includes values from tag, category, sublocation, city, state, and country.
- sublocation:word|any|none
- Show media with sub location of word. Exclusion and required is supported.
- tag:word|any|none
- Show media with tag of word. Exclusion and required is supported.
- to:YYYY-MM-DD
- All media until given date. Expample: to:2013-01-25 show all media until 25th January 2013.
Parameters for Users
Following parameters are only for phTagr users
- group:word|group ID
- Show only a specific group given by group name or group ID
- user:user name/user ID
- Show only media from a specific user given by user name or user ID
- visibility:private|group|user|public|any
- Level of visibility. any is default value. Example: visibility:public show all media which are public and only public visible. Media which can be seen by user or only through group assignments are not shown.
- type:image|video|any
- Select specific media type. any is default value.