Gossamer Forum
Quote Reply
SSI
I have modyfied the script a bit so I can make a search without any aditional html. I whant to use this on my "whats new" page so I can past in a search of the 10 last items. I have tested to write it in the "location" in Netscape and it works fine but when I whant to use it with SSI it don't work. It say: [an error occurred while processing this directive] where the SSI chould bee.
It compile the SSI so that work but...

This is what I write:<!--#exec cgi="/cgi-guzzzt/cgisearch/db.cgi?view_new=1&uid=default&ID=*&sb=0&mh=10" -->

I have tested with and without &html_print_headers;

I know the it must be hard to answer but if you have an ide what it can bee...
Quote Reply
Re: SSI In reply to
Hi GuzZzt

Have you already search for "what´s new" in the forum?

Maybe this answer by JPD will help

http://www.gossamer-threads.com/scripts/forum/resources/Forum5/HTML/000272.html

Cheers
-JO

Quote Reply
Re: SSI In reply to
It was allmost that I need but I allso whan't too add a total nomber of items on the site and I have fixed that too..but it is something wrong with the SSI
This works fine but it is wrong...
<!--#exec cgi="/cgi-bin/cgisearch/db.cgi" -->
This don't work but I whan't that...
<!--#exec cgi="/cgi-bin/cgisearch/db.cgi?view_new=1&uid=default&ID=*&sb=0&mh=10" -->

Quote Reply
Re: SSI In reply to
I have done sone search on the net by my own and now I have small problem that whould solve everything if you can help me with it...

The problem is that you can't have a query in the URL so I need a cgiscript that I can deplicate to everything that I whant it to. I need it too run db.cgi?bla bla bla... The query must be in the CGIscrip and then I duplicate it.
Quote Reply
Re: SSI In reply to
I'm no CGI veteran, but after thinking about it a bit, I realized that I use a survey script called surveysays.cgi that does close to what you want.

surveysays.cgi by itself is a regular non-SSI CGI script that requires a query in the URL and variables to be set to run. But what the author did is to have a mini cgi script called poll1.cgi, that essentially just passes variables handcoded and calls a subroutine from the main cgi. In poll1.cgi, you set the variables you want to pass to surveysays.cgi. Similarly, if you decide on a new survey, change the variables in poll1.cgi and save it as poll2.cgi.

This way, browser sees
<!-- exec cgi=poll1.cgi --> and executes it.

Inside poll1.cgi is the following
require "surveysays.cgi";
pass other variables that surveysays.cgi needs.
For your example,
$view_new='1';
$uid='default';
$ID='*';
$sb='0';
$mh='10';

&SurveySays; - I guess you substitute with the correct listing (search) routine name from db.cgi here.
exit;

If you want I can email you the survey script, you might be able to figure it out better if you see it in action yourself.

khayu