--- loncom/interface/lonsearchcat.pm 2001/03/22 14:16:21 1.73
+++ loncom/interface/lonsearchcat.pm 2001/03/27 02:32:44 1.78
@@ -229,9 +229,9 @@ LASTREVISIONDATEEND
# ------------------------------------------- Compute customized metadata field
$scrout.=<
Example: grandmother=75 OR grandfather=85
@@ -239,6 +239,17 @@ CUSTOMMETADATA
$scrout.=&simpletextfield('custommetadata',$ENV{'form.custommetadata'});
$scrout.=' initial users of this system do not need to worry about this option';
+ $scrout.=<
+CUSTOMSHOW
+$scrout.=&simpletextfield('customshow',$ENV{'form.customshow'});
+$scrout.=' initial users of this system do not need to worry about this option';
+
# ---------------------------------------------------------------- Print screen
$r->print(<
\n";
+ }
foreach my $result (@results) {
my @fields=map
{&Apache::lonnet::unescape($_)}
@@ -690,17 +716,20 @@ END
if ($viewselect eq 'Detailed Citation View') {
$compiledresult.=&detailed_citation_view(@fields,
- $hostname,$httphost);
+ $hostname,$httphost,
+ $extrashow);
}
elsif ($viewselect eq 'Summary View') {
- $compiledresult.=&summary_view(@fields,$hostname,$httphost);
+ $compiledresult.=&summary_view(@fields,$hostname,$httphost,
+ $extrashow);
}
elsif ($viewselect eq 'Fielded Format') {
$compiledresult.=&fielded_format_view(@fields,$hostname,
- $httphost);
+ $httphost,$extrashow);
}
elsif ($viewselect eq 'XML/SGML') {
- $compiledresult.=&xml_sgml_view(@fields,$hostname,$httphost);
+ $compiledresult.=&xml_sgml_view(@fields,$hostname,$httphost,
+ $extrashow);
}
}
@@ -793,8 +822,9 @@ sub build_custommetadata_query {
$q->prepare($logic_statement);
my $matchexp=${$q}{'-parse'}{'-build'}{'matchstring'};
# quick fix to change literal into xml tag-matching
+ # will eventually have to write a separate builder module
my $oldmatchexp=$matchexp;
- $matchexp=~s/\(\?[\:\=]([^\)]*)\\\=([^\)]*)\)/\(\?\:\\\<$1\\\>\[\^\\\<\]\*$2\[\^\\\<\]\*\\\<\\\/$1\\\>)/g;
+ $matchexp=~s/(\w+)\\\=(\w+)/\\\<$1\\\>\[\^\\\<\]\*$2\[\^\\\<\]\*\\\<\\\/$1\\\>/g;
return $matchexp;
}
@@ -832,7 +862,7 @@ sub detailed_citation_view {
my ($title,$author,$subject,$url,$keywords,$version,
$notes,$shortabstract,$mime,$lang,
$creationdate,$lastrevisiondate,$owner,$copyright,
- $hostname,$httphost)=@_;
+ $hostname,$httphost,$extrashow)=@_;
my $result=<$title
@@ -845,6 +875,9 @@ sub detailed_citation_view {
MIME Type: $mimetag{$mime}
Language: $language{$lang}
Copyright/Distribution: $cprtag{$copyright}
+
$shortabstract
END @@ -856,12 +889,13 @@ sub summary_view { my ($title,$author,$subject,$url,$keywords,$version, $notes,$shortabstract,$mime,$lang, $creationdate,$lastrevisiondate,$owner,$copyright, - $hostname,$httphost)=@_; + $hostname,$httphost,$extrashow)=@_; my $result=<