Skip to main content.
home | support | download

Back to List Archive

Re: modifying swish.cgi output

From: J Robinson <jrobinson852(at)not-real.yahoo.com>
Date: Sat Mar 15 2003 - 13:49:17 GMT
Hello Bill,

Will these changes be wrapped into a dev build? I
imagine that wanting just a simple text search box  is
not that unusual.

Thanks as always
jrobinson

--- Bill Moseley <moseley@hank.org> wrote:
> On Fri, 14 Mar 2003, J Robinson wrote:
> 
> > Hello All:
> > 
> > I'm looking at swish.cgi (from the current dev
> version
> > of swish-e) and I'm wondering what's the
> > best way to have it supply a simple "search" box -
> I
> > don't want any of the extra "limit search to",
> "sort
> > by", or "select date range" features presented on
> the
> > page.
> > 
> > Is there a 'best practices'-type way to have the
> > output from swish.cgi have a single search
> textfield
> > and "Search" button, followed by the Results for
> that
> > search?
> 
> Kind of.  Here's a config file that disables those
> features.
> They could also be commented out in the config of
> the swish.cgi script.
> 
> moseley@bumby:~/swish-e/example$ cat .swishcgi.conf 
> return {
>  metanames => undef,
>  date_ranges => undef,
>  sorts => undef,
> };
> 
> But you will also need this change in the script,
> though:
> 
> 
> Index: swish.cgi
>
===================================================================
> RCS file:
> /cvsroot/swishe/swish-e/example/swish.cgi,v
> retrieving revision 1.38
> diff -u -r1.38 swish.cgi
> --- swish.cgi   7 Mar 2003 23:23:23 -0000       1.38
> +++ swish.cgi   14 Mar 2003 20:41:34 -0000
> @@ -1279,7 +1279,7 @@
>  
>      my $metaname = $q->param('metaname') ||
> 'swishdefault';
>  
> -    return unless $self->is_valid_config_option(
> $self->config('metanames'), 'Bad MetaName provided',
> $metaname );
> +    return unless $self->is_valid_config_option(
> $self->config('metanames') || 'swishdefault', 'Bad
> MetaName provided', $metaname );
>  
>      # save the metaname so we know what field to
> highlight
>      # Note that this might be a fake metaname
> 
> 
> -- 
> Bill Moseley moseley@hank.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
Received on Sat Mar 15 13:52:58 2003