Gossamer Forum
Home : Products : DBMan : Customization :

SSI w/i CGI for Banner Rotation

Quote Reply
SSI w/i CGI for Banner Rotation
I've searched the Forum to include Lois' excellent FAQ. Trying to encorporate a simple banner rotation of my alumni's webpage's into my site. In my sub html_page_top, I simply tried to add
Code:
...
<h3><font color="#FFFFFF"><u>Other Alumni Links</u></font></h3>
<p><a href="http://home.flash.net/~murgnam/contacts.htm">Contacts/Credits</a></p>
<p><a href="http://www.classmates.com/">Classmates!</a>

<a href="http://www.military-brats.com/">Military Brats Registry</a>

<a href="http://home.capu.net/~mcl/osb/osbmain.htm">Overseas Brats High

School Alumni

Organization</a></p>
</TD>|;
&insertadvert;
print qq|

<table border="1" cellpadding="1" cellspacing="1" align="center" valign="top" width="100%">
<TR><TD align=center>$html_title: $page_title</TD></TR></TABLE>
|;
}
but no such luck. Any clues?

JR
http://www.izmirhigh.com/...ocal/Database/db.cgi

Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
SSI calls will not work in cgi scripts in many servers (go ahead Dano if you want to disagree with me again)....Wink

Anyway...

Use the following codes in your html.pl file:

Code:

sub insertadvert {
#---------------------------------------------------------
# Insert Banner Ad

my $ad = `/path/to/cgi-bin/ads/ads.cgi`;
$ad =~s,Content-type:\stext/html,,;
return $ad;
}


Change /path/to/ to the complete absolute path where your ads.cgi file is located.

Then add the following codes where you want the banner to appear:

Code:

|;
&insertadvert;
print qq|


Hope this helps.

Regards,

Eliot

Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
Eliot,
Taking from yr reply, I edited my original post above and included
Code:
sub insertadvert {
#---------------------------------------------------------
# Insert Banner Ad
my $ad = `/www43/web/izmirh/cgi-local/ads/ads.cgi`;
$ad =~s,Content-type:\stext/html,,;
return $ad;
}
in my html.pl. Still no go.
JR

Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
You need to copy the EXACT codes I posted....It is NOT single quotes that you use, but ` characters! That is where you messed up. Wink

Look at your codes and my codes again...Copy and paste the EXACT codes, only making changes to the /path/to/ codes!

Good luck!

Regards,

Eliot

Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
Sorry 'bout the syntax ... but still no go.

Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
Try using print &insertadvert; RATHER than &insertadvert;.

Regards,

Eliot

Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
VOILA!!!

THANKS Eliot.

JR

Quote Reply
Post deleted by LoisC In reply to
Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
I use Webadvert;

sub insertadvert {
my $ad = '<CENTER><A HREF="/ad/cgi-bin/ads.cgi?advert=NonSSI&page=12"><IMG SRC="/ad/cgi-bin/ads.cgi?page=12"></A></CENTER><p>';
$ad =~s,Content-type:\stext/html,,;
return $ad;
}

Ad image show on but if i try search and the search result page not show the image :(

Regards,
Act.
I am new to cgi, Thank you for your help.
Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
That is because you are not using the correct codes posted above. You are basically using HTML codes rather than calling the ads.cgi script via the codes I posted above.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
:) :) :) It works.
Thank you Eliot.

Regards,
Act.
I am new to cgi, Thank you for your help.
Quote Reply
Re: SSI w/i CGI for Banner Rotation In reply to
Good and you're welcome.

Regards,

Eliot Lee