[greenstone-users] sortmeta

From Katherine Don
DateMon Mar 10 10:26:15 2008
Subject [greenstone-users] sortmeta
In-Reply-To (20080307105440-24367-qmail-f5mail-236-222-rediffmail-com)
Hi Shashi

1. In your format statement for the list you want to change (classifiers
and search lists probably), change [srclink] to
<a
href="/gsdl/collect/[collection]/index/assoc/[archivedir]/doc.pdf"
target="_blank">
The target bit opens up the link in a new window.
If you have other non-pdf documents in the collection you will need to
put this inside an If expression. see
http://wiki.greenstone.org/wiki/index.php/How_to_format_the_output of your_collection
for more details.

2. I have added in a reverse sort option to import.pl which will be
available in the next release. In the meantime, before importing a
collection that you want sorted in reverse, edit
gsdl/perllib/arcinfo.pm and change the two lines:

@sorted_order = sort {$a->[ORDER_SORT_INDEX] cmp $b->[ORDER_SORT_INDEX]}
@$order;

change the $a to $b, and $b to $a, so they become

@sorted_order = sort {$b->[ORDER_SORT_INDEX] cmp $a->[ORDER_SORT_INDEX]}
@$order;

If you really need the option to be added properly, I could send you the
files I have modified. However, I am working from the latest version of
the source code, and there is no guarantee that they will work with
2.75. I don't know what's changed since then, if anything, and I don't
have time to look at it.
But it may be that it works, or you can look at the files and work out
what to change. so I can send them to you if needed.

Cheers,
Katherine Don

S Shashi Nath wrote:

>
> Hi list,
>
> I am using gsdl 2.75 on windows platform and have two queries :
>
> 1. How do I open all pdf links (i.e. srclink) in new window?
>
> 2. How do I reverse sort with the -sortmeta option? or is it just one way?
>
> Thanks in advance.
>
> Shashi
>
>
>