Extends Textpattern's article search to file downloads
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.textile
manifest.xml
rah_file_search.php

README.textile

rah_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.

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 <txp:if_search />.

Requirements

  • 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 <txp:article />.

Attributes

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:

grand_total
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.
Default: grand_total="1" Example: "0".

Example

Outputs search form and results (if any).

<txp:search_input />
<txp:rah_file_search />

Changelog

Version 0.7 – 2011/03/24

Version 0.6 – 2011/03/24

Version 0.5 – 2011/02/23

  • Added title to searchable fields in addition to filename and description.

Version 0.4 – 2011/02/23

Version 0.3 – 2011/02/23

Version 0.2 – 2011/02/22

  • Now only causes one extra query; uses file_download_list() instead file_download().
  • 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.