FilterDiscussion 1.6.2

FilterDiscussion - A plugin that dynamically creates custom filtered discussion list based on URL parameters.

The plugin filters the discussion list based on the value of the fields in the discussions database. The filtered view is flexible as the filters are specified via URL parameters using flexible syntax. For example, filtering by the CategoryID field is equivalent to display discussions for a particular category. Multiple fields are supported and the list of fields is specified in the administration dashboard.

Combination field names can be specified to create refined filters. If the Discussion table in the database has been extended with additional fields, then these can be used as well. For example, the PrefixDiscussion plugin adds a field called "Prefix", so it is possible to filter with the "Prefix=" parameter. Example: /discussions/filterdiscussion&Prefix=EQ:Video

The title of the resulting filtered screen can also be specified via the &!msg= parameter. Some html tags can be specified (at your risk).
Example: /discussions/filterdiscussion&Prefix=EQ:Video&!msg=

Named filters can be globally saved via the plugin settings through the admin dashboard. Saved filters provide the ability to apply filters
without exposing to the end user the actual parameters being used.
For example, assume a saved filter named "AlertedVideos" is defined as "&Prefix=EQ:Video&Alert=NN&!msg=Videos of interest"
To invoke that view the following url is needed "/discussions/filterdiscussion&!filter=AlertedVideos
(The above example assumed that both PrefixDiscussion and DicsussionAlert plugins are installed
-- they add the Prefix and Alert fields to the discussion table).

There are three types of use cases for this plugin:
1. For administrators - to check on content without having to go to the SQL database
2. For developers - to link to filtered views from web pages (e.g. The userid field in a discussion can link to a filtered view that shows discussions by that userid)
3. For administrators - to add menu options for specialized views

Special permission must be set to allow users to use the plugin. After enabling the plugin see "Roles & Permission" in the admin dashboard.

Note: You may have other plugins that use URL parameters and you will need to define them in the "ignore list" on
the dashboard setting for FilterDiscussion plugin so that it will ignore them and won't throw an error for undefined parameter.

Change log:
Version 1.2 - Added ignore list (ignored url parameters that may be used by other plugins/applications)
Version 1.3 - Added saved filters (to use a named parameter to invoke multiple filters while hiding the filters from the user)
Version 1.4 - Restructured internal functions, out of arrary index bug fix, increased number of defined filters
Version 1.5 - Added relative date filtering for discussion date columns (for example, DateInserted=d>:-7 filters on discussions created in the last seven days)
Version 1.6 - Support for Vanilla 2.6.
- Support for using {$userid} in the value field to refer to one's own userid number. Example: /discussions/filterdiscussion?InsertUserID=EQ:{$Userid}
- Support for using {$category} in the column name and then the caegory name in the value to mean "EQ:caegory-number-corresponding-to-the-name".
example: /discussions/filterdiscussion?InsertUserID=EQ:{$Userid}&{category}=General
- Support for including {username} and {category} in the !msg title (if this is the last parameter)
example: /discussions/filterdiscussion?InsertUserID=EQ:{$Userid}&{category}=General&!msg={category}