Re: [greenstone-users] Subcollections & Preferences

From Rene Schrama
DateMon, 28 Jun 2004 11:51:52 +0200
Subject Re: [greenstone-users] Subcollections & Preferences
Hi Katherine,

Thanks, it's working now. One more change was needed, see below
(old/new).
The history problem is probably caused by the OS/webserver difference
(Unix/Apache vs Windows/IIS). So be it, I'll just delete history.db or
make it read-only.

Rene


function updateqt (value) {
if (value != 0) location.href = location.href + "&qt=" +
value + getargs();
}

function updateqt (value) {
if (value != 0) {
href = location.href;
while (href.match(/&cc=[\w]+/)) href = href.replace(/&cc=[\w]+/,
"");
location.href = href + "&qt=" + value + getargs();
}
}


>>> Katherine Don <kjdon@cs.waikato.ac.nz> 25-06-2004 01:46:54 >>>
Hi Rene

You can edit the gsdl/macros/pref.dm file to get rid of that annoying
bug:

In javascript functions updatel(), updatev(), updatew(), add the line

while (href.match(/&cc=[\w]+/)) href = href.replace(/&cc=[\w]+/,
"");

just before the last line of each function:
location.href = href + getargs();

And this should fix it. Let me know if it doesn't.

As for question 2, I don't know. Search history uses the z arg (user
id)
as the key to look up previous history - I am not sure how that gets
set. But if you get a new z value each time you log on to the
collection, then you will have no search history by default because it

can't find the old stuff.
If you explicity want to clear the history, you can use
delete_all_history_info (const text_t &userid, const text_t
&gsdlhome);
from src/recpt/historydb.h
But I am not sure where you would want to call it from.

Cheers,
Katherine Don
Rene Schrama wrote:
> Hi,
>
> I am currently running a Greenstone 2.41 collection under Windows XP
> (local library) and the same collection under Windows 2000/IIS (web
> library). There are 2 subcollections, srmv1 and srmv2. Problem is
that,
> whenever I change a preference (any preference), the string
> "&cc=srmv1&cc=srmv2" is appended to the URL, making it bigger and
bigger
> until the browser finally stops responding. The online vesion can be
> found here:
>
> http://srm-cd.niwi.knaw.nl/
>
> Question number 2 is about the search history. I have seen several
> collections that seem to clear the history at logon (i.e. whenever I
> reopen the collection) but I can't figure out how this was done. Any
> ideas? (btw these collections were running under Unix/Apache)
>
> Rene
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>