Skip to main content.
home | support | download

Back to List Archive

[swish-e] Passing Parameters through Swish-e to use in additional hyperlinks/forms

From: Richard Byrne MRCVS Partner <richard(at)>
Date: Tue Dec 16 2008 - 10:02:36 GMT
Dear Peter

Thank you very much  - I simply cloned the default module being 
used as per your instructions and inserted a little snippet of html code in 
the sub show_result section such:-
 return <<EOF;
<a href="$this_result->{swishdocpath_href}">$title</a> 
<small>-- rank: <b>$this_result->{swishrank}</b></small></dt>
<form name="form1" method="post" action="/cgi-bin/">
<input name="File" type="hidden" id="File" value="$this_result->
E-mail this file to ...
<input name="Email" size="60" type=text value="";>
<small> (insert full email address of recipient)</small>
<input type="submit" name="Submit" 


However I have one more request please.

We start the program that runs swish from a Unix shell script and pass the 
search parameters from this script. As you can see from the snippet above we 
have to enter the email address into the 'html form' created in swish before 
we can email the indexed PDF to the recipient - we know broadly what is in 
the file so don't need to read it.

Is there any way of including 1 or more 'dummy / user defined parameters' in 
the swish-e shell script that are simply passed through the swish program ( 
and ignored by it ) but are 'recoverable' and usable in the form snippet so 
that one would not have to manually reenter the email address etc manually  -
 you would just simply click on the Send button

<form name="form1" method="post" action="/cgi-bin/">
<input name="File" type="hidden" id="File" value="$this_result->
<input name="Email" type"hidden" id="Email" value="$this_result->
E-mail this file to $this_result->{dummy_param_passedthroswish_emailaddress}

Other parameters that would be useful to pass through would be for example 
client_name , user_name, unix_user_name, pdf_printer_name.

Thank you


On Sun, 14 Dec 2008 20:15:37 -0600, Peter Karman wrote
> Richard Byrne MRCVS Partner wrote on 12/13/08 10:21 AM:
> > Dear Sir
> > 
> > We are using Swish-e Version 2.4.3 to index hundreds of PDFs documents 
on a 
> > server. I would very much like to have an additional hyperlink or even 
> > form that is generated for each document and appears on the web page in 
> > search list when the search is run. The idea is that the user can simply 
> > click this link to do something to the document rather than simply 
> > it  for example send it directly to a PDF printer
> are you using swish.cgi ? read this:
> http://swish-
> -- 
> Peter Karman  .  .  peter(at)
> _______________________________________________
> Users mailing list

Users mailing list
Received on Tue Dec 16 04:59:37 2008