Skip to main content.
home | support | download

Back to List Archive

[swish-e] Swish-e.cgi TemplateHTMLTemplate and Multiple Categories

From: Dan Lobo <dan.lobo(at)not-real.cot.co.uk>
Date: Mon Apr 28 2008 - 15:41:24 GMT
Hi There,

I am trying to utilise the swish.cgi script with the TemplateHTMLtemplate that utilises multiple indexes.  The problem I seem to be having is that I can manage one or the other, but not both at the same time!!

My .swish.conf file looks like this:

    return {
        title           => 'Search the Swish-e list multiple 2',   # T2itle of your choice.
        #swish_binary    => '/usr/local/bin/swish-e',                   # Location of swish-e binary
        metanames       => [qw/swishdefault swishdocpath swishtitle/],
        display_props   => [qw/swishtitle swishlastmodified swishdocsize swishdocpath/],
        title_property  => 'swishdocpath',
        prepend_path    => 'http://www.cot.org.uk',
        use_libary      => 1, # enable use of the SWISH::API module
        swish_index  => [ '/var/www/vhosts/cot.org.uk/bin/swish-e/forum.index','/var/www/vhosts/cot.org.uk/bin/swish-e/members.index','/var/www/vhosts/cot.org.uk/bin/swish-e/public.index','/var/www/vhosts/cot.org.uk/bin/swish-e/specialist.index' ],
        metanames       => [qw/swishdefault swishdocpath swishtitle/],
        display_props   => [qw/swishtitle swishlastmodified swishdocsize swishdocpath/],
        title_property  => 'swishdocpath',
        prepend_path    => 'http://www.cot.org.uk',
select_indexes  => {
        method  => 'checkbox_group',
        labels  => [ 'Forum', 'Members', 'Public', 'Specialist' ],  # Must match up one-to-one to swish_index
        description => 'Select: ',
},
        name_labels => {
            swishdefault        => 'Search All',
            swishtitle          => 'Title',
            swishrank           => 'Rank',
            swishlastmodified   => 'Last Modified Date',
            swishdocpath        => 'Document Path',
            swishdocsize        => 'Document Size',
        },
};
This can be shown to be set up correctly here:

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

I have also managed to create a template that works, and bring the page into the site by editing the swish.cgi script directly and removing the x infront of it:

# uncommented to utilise template
       template => {
            package         => 'SWISH::TemplateHTMLTemplate',
            options         => {
                filename            => 'swish2.tmpl',
                path                => '/usr/local/share/swish-e',
                die_on_bad_params   => 0,
                loop_context_vars   => 1,
                cache               => 1,
            },
        },

This brings up the following page:

http://www.cot.org.uk/cgi-bin/swish5.cgi

This seems okay, apart from the fact that the multiple categories defined in the .swish.conf file now seem to have disappeared!

Please help me to enable multiple categories and to utilise TemplateHTMLTemplate at the same time!

Many thanks in advance for your help.

Kind regards, 

Dan Lobo
Web Developer
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 Tue Apr 29 06:35:07 2008