Skip to main content.
home | support | download

Back to List Archive

[swish-e] Swish-e.cgi Template config

From: Dan Lobo <dan.lobo(at)not-real.cot.co.uk>
Date: Thu Apr 24 2008 - 09:03:31 GMT
Please help as I am currently getting a bit stuck while trying to test and implement a new template/design.

I am running swish-e 2.4.5. and it seems to run fine, running on Red Hat Linux.

I have managed to set up the CGI script and seems to work fine. you can view a test version(s) here:

http://cot.org.uk/cgi-bin/swish.cgi

http://cot.org.uk/cgi-bin/swish2.cgi

http://cot.org.uk/cgi-bin/swish3.cgi

I am trying to modify the first one so that it uses the Template system as I would like to include a header and footer so that it matches the main site look and feel as seen here:

http://cot.org.uk

As suggested in the swish-e.cgi comments, I would like to adjust the template:

  return = {
#        swish_binary    => '/usr/local/bin/swish-e',
#        swish_index     => '/usr/local/share/swish/index.swish-e',
#        title_property  => 'swishtitle',  # Not required, but recommended
#    };
#
#   But, that doesn't really show all the options.
#
#   You can modify the options below, or you can use a config file.  The config file
#   is .swishcgi.conf by default (read from the current directory) that must return
#   a hash reference.  For example, to create a config file that changes the default
#   title and index file name, plus uses Template::Toolkit to generate output
#   create a config file as:
#
#       # Example config file -- returns a hash reference
#       return {
#           title           => 'Search Our Site',
#           swish_index     => 'index.web',
#
#           template => {
#               package         => 'SWISH::TemplateToolkit',
#               file            => 'swish.tt',
#               options         => {
#                   INCLUDE_PATH    => '/home/user/swish-e/example',
#               },
#           },
#        };

Therefore I have set up the config file accordingly:

#Example config file -- returns a hash reference
       return {
           title           => 'Search Our Site',
           swish_index     => '/home/cot.org.uk/bin/swish-e/public.index',

           template => {
               package         => 'SWISH::TemplateToolkit',
               file            => 'swish.tt',
               options         => {
                   INCLUDE_PATH    => '/home/cot.org.uk/bin/swish-e/lib/swish-e/perl',
               },
           },
        };

The only bit I am not sure about is the include path!? What is this include path for?? I am guessing it is for the location of TemplateToolkit right?

Anyway, when I try to get the swish-e.cgi I get the following:

Software Error

Please check error log

Upon inspection of the log I get the following being reported:

[Wed Apr 23 11:12:13 2008] [error] [client 217.207.158.141] /var/www/vhosts/cot.org.uk/cgi-bin/swish.cgi Global symbol "%map_index" requires explicit package name at /usr/local/lib/swish-e/perl/SWISH/TemplateToolkit.pm line 138.
[Wed Apr 23 11:12:13 2008] [error] [client 217.207.158.141] Global symbol "%map_index" requires explicit package name at /usr/local/lib/swish-e/perl/SWISH/TemplateToolkit.pm line 140.
[Wed Apr 23 11:12:13 2008] [error] [client 217.207.158.141] Global symbol "%map_index" requires explicit package name at /usr/local/lib/swish-e/perl/SWISH/TemplateToolkit.pm line 140.
[Wed Apr 23 11:12:13 2008] [error] [client 217.207.158.141] Compilation failed in require at /var/www/vhosts/cot.org.uk/cgi-bin/swish.cgi line 851.
#

Please help as I am getting really frustrated with this now.

Kind regards, 

Dan Lobo
Web Developer
Cot.org.uk
Tel. 020 7450 2310
Daniel Lobo
Web Developer
College of Occupational Therapists
106-114 Borough High Street,
London SE1 1LB
Tel: 0207 450 2310
http://www.cot.org.uk



Daniel Lobo
Web Developer
College of Occupational Therapists
106-114 Borough High Street,
London SE1 1LB
Tel: 0207 450 2310
http://www.cot.org.uk


- ---------------------------------------------------------------
DISCLAIMER

This e-mail transmission, including any attachments, is strictly confidential and intended solely for the addressee. It may contain private and confidential information and, if you are not the intended recipient, any review, retransmission or other use of, or taking any action in reliance upon, this information is prohibited.
The views expressed in this e-mail are those of the originator and not necessarily the views of BAOT / COT
If you have received this e-mail in error, please contact the sender and delete the material from any computer.
BAOT / COT has taken steps to ensure that this e-mail and attachments are free from any virus. In keeping with good computing practice, the recipient should carry out their own virus checks.
Please note that this e-mail has been created in the knowledge that internet e-mail is not a 100% secure communication medium. We advise that you understand this lack of security and take any necessary measures when e-mailing us.
BAOT / COT reserves the right to read any e-mail or attachment entering or leaving its systems from any source without prior notice.


INFORMATION ABOUT BAOT / COT

BAOT:   The British Association of Occupational Therapists Limited is a company limited by guarantee and registered in England (Company number 392350).

COT:   The College of Occupational Therapists Limited is a company limited by shares and registered in England (Company number 1347374). The College is also a registered charity in England and Wales (Charity number 275119).

The registered office of both BAOT and COT is 106-114 Borough High Street, Southwark, London, SE1 1LB.

- ---------------------------------------------------------------

_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu Apr 24 05:02:23 2008