Re: [htdig] random banner ad's on header.html


Greg (greg@pix.za)
Tue, 11 May 1999 17:48:41 +0200


Hi There again,

Ok Thank you very much. I really do appreciate the input so far. It has helped
me tremendously.

I think I have a basic idea of what and how it's done, but please can you
forgive my inexperience and go one step further.

I have now modified the contrib htwrap script by John Grohol to include the
random banner generation with image, alt and url info. I then modified the
<color><param>0100,0100,0100</param>$ENV{'QUERY_STRING'} to include the variable $bannerad as follows:

<FontFamily><param>Courier New</param>"config=$config&restrict=$restrict&exclude=$exclude&words
=$squery&method=$method&format=$format&page=$page&bannera
d=$bannerad";

<FontFamily><param>Arial</param>This prints to the screen ok just before the script calls htsearch. I also
included a <color><param>0000,0000,0000</param>$bannerad reference in <color><param>0100,0100,0100</param>header.html and modified the necessary
html call to the new cgi with GET instead of POST. The search works great,
but the problem I have now is htsearch still doesn't seem to recognize the
variable for output in header.html. What am I missing or how do I pass the
variable to htsearch?

Your input is appreciated.

Thanks in advance

Greg<color><param>0000,0000,0000</param>

</color>>

> According to Greg:

> > I am battling to get the hang of the SSI in the results. Are there

> > sample scripts that can show a newbie how to setup a simple script to

> > call the htsearch. At present I run a simple random banner script that

> > is called by <<!--#exec cmd="banner.cgi"--> within the html document. I

> > would at all possible like to use this script as it contains all the

> > necessary images, URL and ALT tags. I am running Apache 1.3.4 on
Linux

> > machine. I would assume I could add to this script to call the

> > htsearch.

>

> Definitely one for the FAQ...

>

> 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.

> You'd also have to make sure this CGI script doesn't grab the POST data or

> get confused by the QUERY_STRING contents intended for htsearch.

>

> Your wrapper script can be written as a shell script, or in perl, C,

> C++, or whatever you feel comfortable using.

>

> An alternative approach is to have a cron job that periodically

> regenerates a different header.html or wrapper.html with the new banner

> ad, or changes a link to a different pregenerated header.html or

> wrapper.html file.

>

> --

> Gilles R. Detillieux E-mail: <<grdetil@scrc.umanitoba.ca>

> 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 htdig@htdig.org containing the

> single word "unsubscribe" in the SUBJECT of the message.

>

<nofill>
HandMade SoftWare
M-Web Garden Route South Africa
http://www.handmade.co.za
greg@handmade.co.za
Tel: +27(0)44 874-2586
Fax: +27(0)44 8742519
------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Tue May 11 1999 - 09:00:14 PDT