Rah's File Search
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.
A cup of coffee
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
- PHP 4.3.0+
- 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 />
- Now filters by all words, not any. Thank you ax.
- Now searches words individually. Thank you for notifying Marc.
- Searches are case-insensitive.
- Added title to searchable fields in addition to filename and description.
- 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
- Added: Now populates search_result_count.
- 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.
- Initial release.