rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: Eric "Bozo" Winter on February 17, 2010, 03:20:50 PM

Title: How to search "from current directory" by default in Advanced Search?
Post by: Eric "Bozo" Winter on February 17, 2010, 03:20:50 PM
People,

I have a foldertree with a lot of subfolders, for each user one.
When a user searches for files, every time the entire foldertree is searched.
This is because the default settings in Advanced Search is "from top directory".
And users generally don't check options because they're busy getting work done.
I like to change this to "from current directory" by default.

How can I configure this?

Bozo
Title: Re: How to search "from current directory" by default in Advanced Search?
Post by: r][m on February 17, 2010, 04:58:35 PM
Depends on what template and HFS version your using.
In 2.3 build 254 this is what I use. It searches folder you are in
and folders inside that one.
Code: [Select]
[search]
<form method="get">
<input type="input" value="" name="search" size="20"/>
<img src="/images/~img44.gif">
<input type="submit" value="Search" />
</form>
You might test Menu > Virtual File System > Enable Recursive Listing, if
you need to search only the folder your in, but changing Recursive Listing
might effect something else you'd want to use.
Edit:
Liked Rejetto's solution posted below, better so I've changed mine like above.
Title: Re: How to search "from current directory" by default in Advanced Search?
Post by: rejetto on February 18, 2010, 12:22:40 PM
i guess he's using rawr template.
i agree about that being a bad default option.

you can change this by editing the template.
search for: <form action="/"
and replace with: <form
in other words, remove: action="/"