Gossamer Forum
Home : Products : Links 2.0 : Customization :

WebAdverts Error

Quote Reply
WebAdverts Error
Well I went through all the messages and stuff that I could find to install webadverts and I was for a short time excited. There it was, 1 of the 2 banners that I was using to test. But my elation was short lived. 3 problems that I need help with. To let you know, I am using the IFrame/Img method. Problem#1--The other banner never shows. I have all the settings identical as the 1st banner but, it never shows up. Problem#2--When I click on this banner, a message comes up that states "Status: 301 Found Location: <the url of the website>" Problem#3---In Netscape the banner shows as a boken image. Any help would be appreciated---thanks

Kurt Johnston - Team Manager/WebMaster
The Speed-O-Maniacs Jr. Drag Racing Team
http://speedomaniacs.com
EMail: Kurt@speedomaniacs.com
FAX: 603-297-4655

Quote Reply
Re: WebAdverts Error In reply to
 
Quote:
The other banner never shows. I have all the settings identical as the 1st banner but, it never shows up.

If you have more than one banner in your pages, then you need to set the second one to page=002. The multiple banners on the same page cannot be set "identically".

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: WebAdverts Error In reply to
I think I may have found a clue to this problem. In the Webadverts Documentation it states:

INCLUDING BANNERS IN CGI OUTPUT:
Since you can't include SSI tags in CGI output, you'll have to use
one of two alternative methods if you want banners to appear on your
dynamically-generated pages.
First, of course, you can simply have your CGI script include in its
output HTML a link and IMG tag similar to the following:
<A HREF="ads.pl?advert=NonSSI&page=XX"><IMG SRC="ads.pl?page=XX"></A>
The "XX"s should be replaced with unique "page" numbers, of course, as
discussed earlier; the simplest way to accomplish this is to have your
CGI script generate a random number to be inserted. That way, you can
ensure that each page created by your script will generate a uniquebanner call.
The second option is to "include" WebAdverts in your other CGI script.
To do this, simply "require" your ads.pl script at the appropriate point
in your script. (The "require" line will serve, essentially, as a
"print" statement.) You'll also need to define two extra variables, as
shown in the example below. (The $ADVNoPrint variable is an addition
necessary in this case to suppress the printing of the "content type"
line; the $ADVQuery null definition will ensure there are no conflicts
between WebAdverts and any QUERY_STRING info your other script may use.)
-------------------------------------------
print "<P>Stuff to appear above the banner.\n"; print "<CENTER><P>\n";
$ADVNoPrint = 1; $ADVQuery = ""; require "/full/path/to/ads.pl";
print "</CENTER>\n"; print "<P>Stuff to appear below the banner.\n";
-------------------------------------------
Note again that the call to WebAdverts will effectively act as a
"print" statement. You will *not* be able, without alteration of
the WebAdverts script, to place the banner code in a variable for
later usage, or otherwise "manipulate" the WebAdverts output.

Can anyone help me in integrating this into Links?

Thanks,
Kurt Johnston - Team Manager/WebMaster
The Speed-O-Maniacs Jr. Drag Racing Team
http://speedomaniacs.com
EMail: Kurt@speedomaniacs.com
FAX: 603-297-4655

Quote Reply
Re: WebAdverts Error In reply to
This is the best way to work with Webadverts.
Put the code in all of your templates, it runns verry good.


<SCRIPT LANGUAGE="JavaScript"><!--
// Define These Two Variables!
var url = "http://www.foo.com/ads.pl";
var alt = "ALT Text Goes Here";
// Leave The Rest of the Code Alone!
random = parseInt(Math.random()*1000)
banner = '<A HREF="' + url + '?banner=NonSSI;'
banner += 'page=' + random + '" TARGET="_blank">';
banner += '<IMG SRC="' + url + '?'
banner += 'page=' + random + '"'
banner += ' ALT="' + alt + '" BORDER=0></A>'
document.write(banner)
// -->
</SCRIPT>

For questions about Webadverts look at
http://awsd.com/scripts/faqs/webadverts.shtml

Greetings from Germany
Christian
Quote Reply
Re: WebAdverts Error In reply to
It is now possible to display raw HTML ads via a simple JavaScript tag using a modified version of ads_display.pl I've put together. (for WebAdverts version 2.15)

You can get more details at the WebAdverts forum in this message:
http://awsd.com/...dex.cgi?review=40108

This also allows you to have multiple banners on the same page without all those gobs of JavaScript, just one statement (plus the IFRAME code for backup).

Kurt, the Status: 301 Found Location: problem may be because you're on an NT platform and the server is sending the header information as text. I have heard that server administrator must make changes to correct this. I not sure because all my hosts are UNIX based.

Plus you may have a WebAdverts set up problem.

Dan O.

Corrected URL: Sept.24, 2000
Quote Reply
Re: WebAdverts Error In reply to
Christian,

When I use your Javascript methos, I get broken links in eithe NS or IE. I am waiting for the info from DanO to see what gives.

Thanks,

Kurt
Quote Reply
Re: WebAdverts Error In reply to
Kurt -

I found this small script to call ssi in cgi scripts. It works great and will allow you to use keywords. Just download at http://www.chatologica.com/...tml-rotator-1.0k.zip

try it. it is very simple.

Jerry

[This message has been edited by Jerry (edited April 11, 2000).]
Quote Reply
Re: WebAdverts Error<br> In reply to
hmmmm, this link is gone/missing:

http://awsd.com/scripts/forum/webadverts/index.cgi?review=40108

I wonder if this has been solved in the newest version of webadverts?

Quote Reply
Re: WebAdverts Error<br> In reply to
To use SSI in cgi pages use this:


in site_html.pl above 1;

Add:

sub adcallone {

require "/path/to/ads/directory/ads_display.pl";
$adverts_dir = "/path/to/ads/data";
$display_cgi = "http://www.yourdomain.com/path/to/ads/files/ads_filename.pl";
$advertzone = "zonename";
$ADVUseLocking = 1;
$ADVLogIP = 0;
$DefaultBanner = "";
$ADVNoPrint = 1;
$ADVQuery = "";
&ADVsetup;
}



Change adcallone to a suitable name for this advertisement call, e.g.; searchads

Change filename to the ads_*.pl file you wish to use, e.g.; ads_search.pl

Change zonename to the targeting Zone Name you've put on your ads, e.g.; searching

You can repeat this process over several different target zones, simply update the references to filemane and zonename and make sure you create a new ads_filename.pl file to go with it.


Now we need to insert the advertisement within the page itself.

We'll use the search results page as an example, but you can apply this principle to any of the on-the-fly generated pages simply by adding more 'subs' to the end of the file and using the call routine below.

Find sub site_html_search_results

Move down the code to where you want to display the advertisement and place the following call routine:


~;
}
&adcallone;
{print qq~


Update adcallone to the name you specified in the first part of these instructions. Save and upload site_html.pl and rebuild your directory.

NOTE: On occasion I have had to add and extra } to the end of the file (not sure why) and you may need to do this if you get an error reported when trying to rebuild your site.



From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: WebAdverts Error<br> In reply to
thanks Paul for the post, I looked for a while on the BBS over there, it's a little difficult to navigate -- I appreciate your help!!

Quote Reply
Re: WebAdverts Error In reply to
The original post has moved to the WebAdverts' archive forum. You can now find it at:
http://awsd.com/...dex.cgi?review=40108

Dan O.