Re: PDA query - please read

From George Buchanan
DateThu, 15 Aug 2002 13:30:03 +0100
Subject Re: PDA query - please read
In-Reply-To (008201c2443f$ecc61c70$6d809e89-cs-uct-ac-za)
Dynal Patel wrote:
>
> Hello
>
[SNIP]

> Second question:
>
> I want to define a global cgi parameter called mode, that will allow me to
> select different html code in the macro files. Currently the html generated
> by greenstone is only suitable for desktop browsers. Any ideas on how I
> would go about doing this? What I want is something similiar to what one can
> do one the preferences page, but I want this cgiarguement to be set when
> someone accesses the site. So if the user is using a normal browser it will
> be set to normal and if the user is using Pocket I.E it will be set to PDA.
> I'm sure this is possible but I'm not sure how to go about it.
>
There is more than one way to skin a cat; one could use the browser's
headers to determine which macro files to load, which would be robust
if you don't use fastcgi to stop "library" being loaded every time, or
properly placed would do just the job at the right point in the code
regardless of fastcgi or not.

An alternative would be to knock up a second executable which looked
at an alternative gsdlsite.cfg file, with a different set of
collections;
of course, that seems messier, but if you are on Unix/Linux and do a
symbolic link to everything but the macro directory, you can then do
all your own macros for that executable.

I'd go for the first option - a little coding but should work fine once
it's been done. However, if Pocket IE spoofs it's HTTP headers, you
may need to resort to something a bit more clever.

--
George Buchanan
Research Fellow, Digital Libraries
Middlesex University, London, UK