Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2011-02-23 17:26:58

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_file_search

Released version 0.4 of rah_file_search. Changelog:

  • Added: grand_total attribute. Gives an option to omit updation of search_result_count. Allows <txp:article /> tags to take care of the counting.
  • Changed: defaults search_result_count to 0 (zero).

More info and downloads

Offline

#22 2011-02-23 17:49:31

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 959
Website

Re: rah_file_search

Out of curiosity – is there a delay before updates show in rah_plugin_installer?

v0.3 showed up fine earlier today; v0.4 didn’t – even after hitting the check for updates a couple of times.

Not an issue – I just updated using c/p. But made me curious. :)

Offline

#23 2011-02-23 18:04:02

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 959
Website

Re: rah_file_search

ax wrote:

Yes, but only if you specify the section in the search tag like this <txp:search_input section="References">. Otherwise, you get a list of articles and then you have to tinker with the URL, as Gocum suggested, to display the file list. I prefer the first method :))

I have it on the default section of a site, and it searches all files, without the section being set, and returns (only) a list of download links. I’m using the example in the docs.

I haven’t tried it in other contexts (in a section for example), so perhaps that’s the issue?

My stumbling block is that it appears to search the actual file name only and not the the title or categories. Plus it doesn’t seem to work with wet_haystack.

Most of the site’s files are multiple words separated by underscores.

For example, the file name is practice_test. As long as you input practice, or test, or “practice_test”, you get the right results.

But if you type in “Practice Test” you’re out of luck.

fwiw

Offline

#24 2011-02-23 18:57:32

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_file_search

maverick wrote:

I have it on the default section of a site, and it searches all files, without the section being set, and returns (only) a list of download links. I’m using the example in the docs.

As it’s supposed to do.

I haven’t tried it in other contexts (in a section for example), so perhaps that’s the issue?

No.

My stumbling block is that it appears to search the actual file name only and not the the title or categories. Plus it doesn’t seem to work with wet_haystack.

Yes. Designed as such.

Offline

#25 2011-02-23 19:09:23

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 959
Website

Re: rah_file_search

Gocom wrote:

As it’s supposed to do.

I thought so. I was contrasting my experience with Ax’s in hopes it might help him figure a way to use the plugin_in w/out asking his readers to alter the url.

Yes. Designed as such.

I suspected that was the case.

This site I’m working on is the first one with a number of files to use your plugin (my last site with lots of files to download was long before you released this). So it’s the first time I’m really figuring it out.

This site is for a teacher. She has downloads for the kids. The limitation of searching only file names may mean it’s not the right fit for this use case. Perhpas a custom google search instead. But just to check – is there a place in the code I could easily alter it to check the file title instead of the file name>

Thanks

Mike

Offline

#26 2011-02-23 19:26:44

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_file_search

An another update released. Version 0.5 changes:

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

More info and downloads

Offline

#27 2011-02-23 19:36:59

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 959
Website

Re: rah_file_search

Works perfect!

Thanks Jukka!

Offline

#28 2011-02-23 23:14:18

ax
Member
From: Germany
Registered: 2009-08-19
Posts: 144

Re: rah_file_search

maverick wrote:

Works perfect!

Thanks Jukka!

Yes, it works perfectly for me too (in a section). Thanks, Jukka!

The only issue that I still have is that it cannot be used to upgrade rah_link_search to 0.5 when you do %s/file/link/g in the source file, because I would really need both plugins. Obviously, it is more complicated than that?

Offline

#29 2011-03-23 23:53:45

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 581
Website

Re: rah_file_search

Jukka, thanks for this plugin. I’m getting mixed results though, and thought I’d ask for help:

For a file named “Red Sports Sedan 2010,” The search term “red” will return this file. But the search terms “red sports” or “red sedan” won’t return anything.

Relevant part of default page template:

<h2>File Results</h2>
<txp:rah_file_search limit="12" form="file_search_results" />

Form “file_search_results”:

<h3 class="entry-title"><a href="<txp:file_download_link />" title="Download <txp:file_download_name /> now"><txp:file_download_name title="1" /></a> </h3>
<p class="entry-summary">Filename: <txp:file_download_name />  [<txp:file_download_size />]<br />
Category: "<txp:file_download_category title="1" />"<br />
<txp:file_download_description />
</p>

Form “search”:

<div class="moduletable">
<txp:search_input match="any" form="search_form" />
</div>

Form “search_form”:

<form action="<txp:site_url />" method="post">
	<div class="search">
		<input name="q" id="mod_search_searchword" maxlength="40" alt="Search" class="inputbox" type="text" size="20" value="Search..."  onblur="if(this.value=='') this.value='Search...';" onfocus="if(this.value=='Search...') this.value='';" />
	</div>
</form>

Offline

#30 2011-03-24 02:18:42

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: rah_file_search

maruchan wrote:

For a file named “Red Sports Sedan 2010,” The search term “red” will return this file. But the search terms “red sports” or “red sedan” won’t return anything.

Nothing wrong with the form or anything. It just is that the plugin doesn’t match individual words — currently. Might change in the future ;)

Offline

Board footer

Powered by FluxBB