--- loncom/interface/lonsearchcat.pm 2001/03/22 14:03:55 1.70
+++ loncom/interface/lonsearchcat.pm 2001/03/26 21:24:12 1.77
@@ -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,7 +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
- $matchexp=~s/\(\?\:([^\)]*)\\\=([^\)]*)\)/\(\?\:\<$1\>\[\^\\\<\]\*$2\[\^\\\<\]\*\<\/$1\>)/g;
+ # will eventually have to write a separate builder module
+ my $oldmatchexp=$matchexp;
+ $matchexp=~s/(\w+)\\\=(\w+)/\\\<$1\\\>\[\^\\\<\]\*$2\[\^\\\<\]\*\\\<\\\/$1\\\>/g;
return $matchexp;
}
@@ -831,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
@@ -844,6 +875,7 @@ sub detailed_citation_view {
MIME Type: $mimetag{$mime}
Language: $language{$lang}
Copyright/Distribution: $cprtag{$copyright}
+$extrashow
$shortabstract