Re: htdig: Inserting banner ads into my header.html and

Rodger Zeisler (
Fri, 8 Jan 1999 17:53:09 -0600

The envirnoment variable in a perl script worked great. My only problem was
that the WebAdverts script use page= parameter to mean something different
then htsearch's use of page=. I wasn't actually using the page= parameter
in WebAdverts so I changed the parameter to xpage= and everything else
worked fine.

Thanks for your quick response to my problem.

Rodger Zeisler
Everest Software Corp. - - Helping You
Manage Software
InfoServer LLC - - The Journal For Strategic
Outsourcing Information
Work 972.980.0013 x738
Home 972.390.0206

----- Original Message -----
From: Gilles Detillieux <>
To: <>
Cc: <>; <>
Sent: Friday, January 08, 1999 9:18 AM
Subject: Re: htdig: Inserting banner ads into my header.html and

>According to Jerry Preeper:
>> Yes, I'm pretty sure you can call a perl script from a C program, at
>> I am calling another c program from htdig to display banner ads on the
>> pages on one of my sites. It's been a while since I had all the code
>> modified to put this all together, but what we did was create a variable
>> that you could place on the header.html file like
>> wherever you want the banner ad to appear - much like the other variables
>> that you want to appear on these pages.
>> Then you need to modify and Display.h , but I'm not sure what
>> else we might have modified right off the top of my head (like I said,
>> been a while since we put this together). In Display.h we added an int
>> a char function in the Methods are that are in . These
>> execute the banner ad program and write the results to a temp file
>> somewhere. Then when the page is read, it simply reads the temp file
>> This way the execution of the program allows the statistics tracking on
>> displays and such, and any clicking of the banners will get recorded as
>> they normally would.
>> The biggest thing was setting up the file locking as I recall and making
>> sure that when the next page is called with more results, it rotates the
>> banner there and doesn't keep calling the same temp file.
>The latest versions (3.1.0b3 & b4) support use of environment variables
>in header.html, so here's a trick you could use that wouldn't require
>modifying the C++ code at all. Just replace cgi-bin/htsearch with a
>shell script or Perl script that sets the environment variable BANNERAD
>to the contents you want embedded in the header, and place a reference to
>$(BANNERAD) in header.html, where you want the ad. Then, your script can
>call the real htsearch program to do the work. I think that should do
>the trick!
>Gilles R. Detillieux E-mail: <>
>Spinal Cord Research Centre WWW:
>Dept. Physiology, U. of Manitoba Phone: (204)789-3766
>Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930

To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the body of the message.

This archive was generated by hypermail 2.0b3 on Sun Jan 10 1999 - 16:36:30 PST