Gilles Detillieux (firstname.lastname@example.org)
Mon, 15 Mar 1999 14:56:07 -0600 (CST)
According to Shantonu Sen:
> alternatively, you can have the header.html have the IMG tag point to a
> script instead of a static image. the script, in turn, would server up
> different images depending on when its called.
> i've had a lot of success with this for netscape, but IE doesnt seem to
> like that. i suppose you could put a "[works only with netscape
> navigator]", but this might not be the best solution for you.
Another problem with that approach is that with a banner ad, you usually
want not only the image to change, but also the URL that the <a href=...>
tag points to, so you need to change the HTML as well.
> you could also have header.html regenerated every minute with a different
> ad, but this might get a little dangerous on a highload site if the html
> file is constantly being rewritten.
> these might not be the best solutions, but they are alternatives.
This solution has a lot of merit. For rotating banners, you can pre-
generate all the various header.html files for each of the banner ads
you want to show, and a cron job can periodically change a link from
one file to the next in rotation. This shouldn't cause much of a load
on the server (probably less than a CGI script would).
> On Mon, 15 Mar 1999, Gilles Detillieux wrote:
> > According to Charlie Romero:
> > > Can anyone point me in the right direction to get htsearch working with
> > > either SSI or another cgi.
> > >
> > > I am basically trying to get rotating banners in the header.html and I have
> > > a great CGI that I would like to use. Normally I can call the cgi either by
> > > itself or using SSI but this doesn't appear to be an option with htsearch.
> > >
> > > Any suggestions?
> > This should maybe be added to the FAQ. It's come up a few times already.
> > While htsearch doesn't currently provide a means of doing SSI on its
> > output, or calling other CGI scripts, it does have the capability (since
> > 3.1.0b3) of using environment variables in templates.
> > The easiest way to get rotating banners in htsearch is to replace htsearch
> > with a wrapper script that sets an environment variable to the banner
> > content, or whatever dynamically generated content you want. Your script
> > can then call the real htsearch to do the work. You'd then need to
> > reference that environment variable in header.html (or wrapper.html if
> > that's what you're using), to indicate where the dynamic content should
> > be placed.
> > If the dynamic content is generated by a CGI script, your new wrapper
> > script which calls this CGI would then have to strip out the parts that
> > you don't want embedded in the output (headers, some tags) so that only
> > the relevant content gets put into the environment variable you want.
> > Your wrapper script can be written as a shell script, or in perl, C,
> > C++, or whatever you feel comfortable using.
-- Gilles R. Detillieux E-mail: <email@example.com> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil 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 firstname.lastname@example.org containing the single word "unsubscribe" in the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Wed Mar 17 1999 - 10:05:12 PST