Simple public file search; combines the power of an article and a file_download_list. Searches matching results from files’ descriptions and filenames, and retunes the results as nicely formatted list.
List of features
- Customize search results with Textpattern file forms and various attributes.
- A simple tag,
<txp:rah_file_search />. The tag shows search results.
- The search works with the standard core search. Core conditionals and forms can work too, including
- Textpattern 4.2.0 or newer.
Installation and usage
The general behavior stands: paste the plugin code to the plugin installer textarea and run the automatic setup. Then just activate the plugin and you are ready to use new tags that plugin includes like others.
For usage, basically use
<txp:rah_file_search /> to display the search results. Works kinda identically as
The tag is
<txp:rah_file_search /> and it has the same attributes as
<txp:file_download_list /> (and one additional). See file_download_list for the list of attributes. In addition to, the tag has:
Omit setting result count. If the attribute is set to
"0" (zero), search_result_count won’t be updated with the number of results. This attribute could be helpful if rah_file_search is used in conjunction with article tags, as article tags won’t update the count once it’s already set.
Outputs search form and results (if any).
<txp:search_input /> <txp:rah_file_search />
Version 0.7 – 2011/03/24
- Now filters by all words, not any. Thank you ax.
Version 0.6 – 2011/03/24
- Now searches words individually. Thank you for notifying Marc.
- Searches are case-insensitive.
Version 0.5 – 2011/02/23
- Added title to searchable fields in addition to filename and description.
Version 0.4 – 2011/02/23
- Added: option to omit updating search_result_count. If
grand_totalattribute is set to
0, the count wont be set.
- Changed: defaults search_result_count to
Version 0.3 – 2011/02/23
- Added: Now populates search_result_count.
Version 0.2 – 2011/02/22
- Now only causes one extra query; uses
- Now accepts all the same attributes as file_download_list tag.
- Now suppresses “Page template doesn’t contain article tag.” notice when on search context.
- Now uses uses same type of matching pattern as Textpattern.
- From now on requires Textpattern version 4.2.0 or newer.
Version 0.1 – 2008/11/30
- Initial release.