Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Webadvert on NT

Quote Reply
Webadvert on NT
OK, This is probably real simple but here goes:

I have Webadverts working if I call it from a browser. I made the changes from the FAQ to the site_html_templates.pl. I have included them below.
When I use <%banner%> in my cgi generated page, all that appears is the ad path. (d:\inetpub\scripts\ad\ads.pl).
%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,

site_title => $build_site_title,
css => $build_css_url,
banner => \&insertadvert,

);
***************
sub insertadvert {
#-- -------------------------------------------------------------------
#Sub routine for web adverts
my $ad= 'd:/inetpub/scripts/ad/ads.pl';
$ad=~s,Content-type:\stext/html,,;
return $ad;
}


Any help would be appreciated.
Quote Reply
Re: Webadvert on NT In reply to
You need to use backhash, like the following:

Code:
my $ad = `/absolute/path/to/ads.pl`;

NOT single quotation marks.

Or use the following HTML codes in your cgi generated pages (from the other WebAdverts FAQ, which is in the Resource Center):

Code:
<p align="center"><IFRAME SRC="http://mydomain/cgi-bin/ads/ads.pl?iframe" MARGINWIDTH="0" MARGINHEIGHT="0" HSPACE="0" VSPACE="0" FRAMEBORDER="0" SCROLLING="NO" WIDTH="468" HEIGHT="60">
<A HREF="http://mydomain/cgi-bin/ads/ads.pl?banner=NonSSI;page=01"><IMG SRC="http://mydomain/cgi-bin/ads/ads.pl?page=01"></A>
</IFRAME></p>

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Webadvert on NT In reply to
Thanks!
I think I will name my first born after you. She's 17 now but she'll get used to it.

Any ideas why the link works in IE but shows a broken link in NS?
Quote Reply
Re: Webadvert on NT In reply to
Also...
In IE I get a "Status: 301 Found Location: http://www.olsi.com" instead of the page...
Quote Reply
Re: Webadvert on NT In reply to
Well...which codes are you using? If the former, I do not. If the latter, I have tried the codes in MIE 4.0 and they work just fine. The problem could be is that the version of browser you are using does not support INFRAMES.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Webadvert on NT In reply to
Uh...IFRAMES are supported in Netscape. I have tested it in Netscape 4.0,4.5,4.7, and in MIE 4.0 and above.

Try the codes again.

BTW: You are still not using the backhashes in the first codes you tried! Use backhashes NOT single quotation marks.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Webadvert on NT In reply to
I'm using NS 4.7 and IE 5. Apparantly the iframe tag is not supported in netscape so I am going back to the <%banner%> tag. I changed my code to reflect the changes that you said and still nothing. You can see what happens by going to http://www.olsi.com/scripts/modify.cgi
Here is my modified sub routine.
sub insertadvert {
#-- -------------------------------------------------------------------
#Sub routine for web adverts
my $ad= '/d:/inetpub/scripts/ad/ads.pl';
$ad=~s,Content-type:\stext/html,,;
return $ad;
}
Quote Reply
Re: Webadvert on NT In reply to
Made the changes to the site_html_template and now I get "The filename, directory name, or volume label syntax is incorrect". I have checked and double checked and the path is correct. Any ideas. Code included below:

sub insertadvert {

# Sub routine for web adverts
my $ad = `/d:/inetpub/scripts/ad/ads.pl`;
$ad=~s,Content-type:\stext/html,,;
return $ad;
}
Quote Reply
Re: Webadvert on NT In reply to
Take out the backward \ before d:/

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------