On Sat, Dec 03, 2005 at 02:40:07AM -0800, David Larkin wrote:
> > > my $advanced_form = $advanced_link;
>
> I want to do the same thing.
>
> But, if I change TempalteDefault.pm , won't that effect every search
> form of every application ?
>
> I'm building on my own machine where I have root access and can
> change the SWISH files, but later I will want to install on another
> machine with standard SWISH where other apps may be relying on a
> standard TempalteDefault.pm.
You can:
1) use your own copy of TemplateDefault. It's just a perl module
and perl uses the @INC array to find it.
2) copy TemplateDefault to a new module name and use that in your
swish config
3) use some variable an decide on what to do based on its value
4) make sure you write your links correctly to include the
settings so it says in advanced on non-advanced mode.
5) use search.cgi and customize everything they way you want.
> I guess I could copy TempalteDefault.pm to customTempalteDefault.pm,
> would I then need to change all occurences of
> "SWISH::TempalteDefault" with "SWISH::customTempalteDefault" ?
Should be just on place -- in the config file.
> Sorry, this is more of a perl query than a swish-e query , but could
> i keep customTempalteDefault.pm in a local directory, and if so how
> do I ensure it gets used ? do I just drop the "SWISSH::" prefix in
> swish.cgi ?
That's basic Perl. Read about the @INC array.
--
Bill Moseley
moseley@hank.org
Unsubscribe from or help with the swish-e list:
http://swish-e.org/Discussion/
Help with Swish-e:
http://swish-e.org/current/docs
swish-e@sunsite.berkeley.edu