[Koha-cvs] CVS: koha/opac opac-detail.pl,1.20,1.21
Waylon Robertson
genjimoto at users.sourceforge.net
Sat Jun 25 07:22:02 CEST 2005
Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16290
Modified Files:
opac-detail.pl
Log Message:
Added code to support search options sidebar ref to http://katipo.co.nz/gallery/koha2-4/search_ideas_details_001
Index: opac-detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-detail.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** opac-detail.pl 20 Jun 2005 14:33:32 -0000 1.20
--- opac-detail.pl 25 Jun 2005 05:22:00 -0000 1.21
***************
*** 33,40 ****
$dat->{'count'}=@items;
!
$dat->{'additional'}=$addauthor->[0]->{'author'};
for (my $i = 1; $i < $authorcount; $i++) {
$dat->{'additional'} .= " ; " . $addauthor->[$i]->{'author'};
} # for
--- 33,43 ----
$dat->{'count'}=@items;
! my @author;
$dat->{'additional'}=$addauthor->[0]->{'author'};
for (my $i = 1; $i < $authorcount; $i++) {
$dat->{'additional'} .= " ; " . $addauthor->[$i]->{'author'};
+ my %authorpush;
+ $authorpush{author} =$addauthor->[$i]->{'author'};
+ push @author, \%authorpush
} # for
***************
*** 61,64 ****
--- 64,90 ----
my @results = ($dat,);
+ my @title;
+
+
+ foreach my $word (split(" ", $dat->{'title'})){
+ unless (length($word) == 4){
+ $word =~s/\%//g
+ }
+ unless (C4::Context->stopwords->{uc($word)} or length($word)==1) {
+ my %titlepush;
+ $titlepush{title} =$word;
+ push @title, \%titlepush;
+ }#it's NOT a stopword => use it. Otherwise, ignore
+ }
+ foreach my $word (split(" ", $dat->{'author'})){
+ unless (length($word) == 4){
+ $word =~s/\%//g
+ }
+ unless (C4::Context->stopwords->{uc($word)} or length($word)==1) {
+ my %authorpush;
+ $authorpush{author}=$word;
+ push @author, \%authorpush;
+ }#it's NOT a stopword => use it. Otherwise, ignore
+ }
my $resultsarray=\@results;
***************
*** 66,69 ****
--- 92,98 ----
my $webarray=\@webbiblioitems;
my $sitearray=\@websites;
+ my $titlewords=\@title;
+ my $authorwords=\@author;
+
#coping with subscriptions
***************
*** 89,92 ****
--- 118,123 ----
suggestion => C4::Context->preference("suggestion"),
virtualshelves => C4::Context->preference("virtualshelves"),
+ titlewords => $titlewords,
+ authorwords => $authorwords,
);
## Amazon.com stuff
***************
*** 121,127 ****
=cut
output_html_with_http_headers $query, $cookie, $template->output;
-
- #output_html_with_http_headers $query, $cookie, $template->output;
-
- output_html_with_http_headers $query, $cookie, $template->output;
-
--- 152,153 ----
More information about the Koha-cvs
mailing list