Re: [greenstone-users] the trouble with DateList

From Katherine Don
DateWed, 16 Feb 2005 10:36:15 +1300
Subject Re: [greenstone-users] the trouble with DateList
In-Reply-To (42078E26-7070607-gmx-net)
Hi jens

Thanks for all the info. DateList is a special classifier, and works
well for what its designed to do, but tends to go very wrong if its used
for something slightly different :-(

We'll add the problems that you have noted below to our TODO list, and
hopefully will be able to fix some of them.

BTW, a reverse_sort option has been added to DateList and will be
available in the next release.

Katherine Don

jens wille wrote:
> well, here's what i figured out regarding DateList...
> jens wille wrote:
>>>In addition, the list should be sorted descending, with the
>>>most recent date on top. I guess a look at the manual would
>>>tell me how to control the number of items shown on the list,
>>>but if you can answer that faster, I'd be much obliged :-)
>>afaik, there is no option for reverse sorting.
> i added an "newestfirst" option to DateList - and this works (at
> least when used in combination with -nogroup).
>>apart from that, i don't think AZCompactList is what you're
>>looking for: even if it works (without the "empty" records ;-)
>>you get single entries for _every_ date (dd-mm-yyyy); while you
>>more likely want an hierarchical access (year -> month -> day),
>>don't you?
>>i tried to modify the DateList classifier to do exactly this, but
>>i'm afraid there's more to it than just giving $date an
>>appropriate value ("yyyymmdd" instead of seconds since the
>>epoch). this just doesn't work when displaying the resulting
>>DateList - probably there are yet more components involved (which
> as seems to me there are some "weird" things going on with DateList:
> 1. if you have more than one DateList they get mixed up, because
> cgiargdm isn't properly transferred between these classifiers.
> 2. i think this has to do with another point: the dm argument is
> included only in the button href. so in case you use -buttonname
> whithout a proper button (which i did, after modifying DateList to
> accept the -buttonname option as other classifiers do) there will be
> no cgiargdm, which makes greenstone use the default value (or the
> last one used). i didn't try it with a custom image button though.
> 3. when displaying the DateList classifier the receptionist grabs
> the date metadata (denoted by dm) on the fly, expecting it to be in
> yyyymmdd format. so lastmodified will be displayed as something like
> "1106 _textmonth53_" which is impossible to control by format
> statements or even javascript.
> and because i can't control the dm arg either (there isn't even a
> macro for this - it's all in the receptionist code) i don't see any
> "easy" solution to this problem :-(
> there's more competence in demand i'm afraid...
> best regards
> jens
> _______________________________________________
> greenstone-users mailing list