Gossamer Forum
Home : Products : DBMan : Customization :

Using SSI in DBman

Quote Reply
Using SSI in DBman
I am trying to display a banner at the top and bottom of each page generated in the View Records output of DBman.

The banner rotator uses SSI to fetch the banner, but DBman ignores the command such as:

<!--#include virtual="/cgi-bin/banner.cgi" -->

How do I overcome this?

Please.....don't get to technical and tell me where I should place any sub routines.

Thanks
Quote Reply
Re: Using SSI in DBman In reply to
You need to read the Thread posted over in the DBMAN Installation Forum. There is a Thread where I wrote instructions about writing banner programs as sub-routines with DBMAN and then calling the banner sub-routine via the following code:

Code:
&insert_banner;

SSI does not work within cgi scripts.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 15, 1999).]
Quote Reply
Re: Using SSI in DBman In reply to
Dear Eliot

Thank you for your response, however, when I tried the subroutine:-

sub Insert_Banner {
# --------------------------------------------------------
open(FILE, "../cgi-bin/banner.cgi") or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
}
}

and inserted

|;
&Insert_Banner;
print qq|

DBman just printed out the CGI file text, line by line.

Any suggestions?

Regards

Julian
Quote Reply
Re: Using SSI in DBman In reply to
Please refer to the Thread in the DBMAN Installation Forum. The codes I provided were not tested, but the concept works with other types of SSI.

You can try changing the codes to the following:

Code:
sub Insert_Banner {
# --------------------------------------------------------
open(FILE, >/cgi-bin/banner.cgi) or die("Couldn't open the file.");
@lines = <FILE>;
close(FILE);
foreach $line (@lines) {
print $line;
return;
}
}

Hope this helps.

Regards,


------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Using SSI in DBman In reply to
Hey i might be on the wrong track but when I tried to use the include virtual ssi tag it wouldnt work at all. I instead used the
<!--#exec cgi="/cgi-bin/whatever.cgi" -->
it worked fine from then on. I was using it on a nt box.

Cheers hope it helped


------------------
Quote Reply
Re: Using SSI in DBman In reply to
Where did you use the SSI call? Within the html.pl file? SSI call within cgi scripts typically do not work.

Zero,

Please provide an example of where this has worked. If you are using template based system, then the SSI Call would work. However, with the standard html.pl file, it won't work, I believe. I've tried it and received CGI errors.

Wink - puzzled look.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Using SSI in DBman In reply to
I used pretty much the same thing as Eliot suggested in one of my scripts and it worked fine.

Mine was like this:

Code:
|;
print &insert_banner;
print qq|

I haven't used that in a while but I remember using WebAdverts and used that code.

Using an <!--exec definitely won't work in a CGI script unless it outputs shtml files.

------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: Using SSI in DBman In reply to
jdulberg,

You are partially correct. SSI Calls, like <!--#exec cgi="/cgi-bin/myfile.cgi"--> or <!--#include virtual="/asp/rotator.asp"--> only works in server side include specified files, like .shtml. However, you can use these types of SSI call statements in .asp files and you can configure Apache server as well as Netscape Enterprise Server to allow SSI call statements in .html files.

But the important thing to consider with DBMAN is that it does not produce static web pages, like LINKS does. So using the SSI Call statements will not work in DBMAN.

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us