version 1.25, 2003/02/18 21:17:00
|
version 1.27, 2003/03/14 02:26:12
|
Line 101 sub dynamicmeta {
|
Line 101 sub dynamicmeta {
|
# ------------------------------------- Try to make an alt tag if there is none |
# ------------------------------------- Try to make an alt tag if there is none |
|
|
sub alttag { |
sub alttag { |
my $src=shift; |
my ($base,$src)=@_; |
return 'None'; |
my $fullpath=&Apache::lonnet::hreflocation($base,$src); |
|
my $alttag=&Apache::lonnet::metadata($fullpath,'title').' '. |
|
&Apache::lonnet::metadata($fullpath,'subject').' '. |
|
&Apache::lonnet::metadata($fullpath,'abstract'); |
|
$alttag=~s/\s+/ /gs; |
|
$alttag=~s/\"//gs; |
|
$alttag=~s/\'//gs; |
|
$alttag=~s/\s+$//gs; |
|
$alttag=~s/^\s+//gs; |
|
if ($alttag) { return $alttag; } else |
|
{ return 'No information available'; } |
} |
} |
|
|
# -------------------------------------------------------------- Pretty display |
# -------------------------------------------------------------- Pretty display |
Line 370 $bodytag
|
Line 380 $bodytag
|
<form method="post"> |
<form method="post"> |
ENDEDIT |
ENDEDIT |
foreach ('author','title','subject','keywords','abstract','notes', |
foreach ('author','title','subject','keywords','abstract','notes', |
'copyright','language') { |
'copyright','customdistributionfile','language') { |
if ($ENV{'form.new_'.$_}) { |
if ($ENV{'form.new_'.$_}) { |
$Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_}; |
$Apache::lonpublisher::metadatafields{$_}=$ENV{'form.new_'.$_}; |
} |
} |