version 1.158, 2011/10/30 22:19:15
|
version 1.159, 2011/11/07 18:21:17
|
Line 1058 sub print_rolecolors {
|
Line 1058 sub print_rolecolors {
|
sub display_color_options { |
sub display_color_options { |
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs, |
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs, |
$images,$bgs,$links,$alt_text,$rowtotal,$logintext) = @_; |
$images,$bgs,$links,$alt_text,$rowtotal,$logintext) = @_; |
|
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
my $css_class = $itemcount%2?' class="LC_odd_row"':''; |
my $css_class = $itemcount%2?' class="LC_odd_row"':''; |
my $datatable = '<tr'.$css_class.'>'. |
my $datatable = '<tr'.$css_class.'>'. |
'<td>'.$choices->{'font'}.'</td>'; |
'<td>'.$choices->{'font'}.'</td>'; |
Line 1135 sub display_color_options {
|
Line 1136 sub display_color_options {
|
$showfile = $imgfile; |
$showfile = $imgfile; |
my $imgdir = $1; |
my $imgdir = $1; |
my $filename = $2; |
my $filename = $2; |
if (-e "/home/httpd/html/$imgdir/tn-".$filename) { |
if (-e "$londocroot/$imgdir/tn-".$filename) { |
$showfile = "/$imgdir/tn-".$filename; |
$showfile = "/$imgdir/tn-".$filename; |
} else { |
} else { |
my $input = "/home/httpd/html".$imgfile; |
my $input = $londocroot.$imgfile; |
my $output = '/home/httpd/html/'.$imgdir.'/tn-'.$filename; |
my $output = "$londocroot/$imgdir/tn-".$filename; |
if (!-e $output) { |
if (!-e $output) { |
my ($width,$height) = &thumb_dimensions(); |
my ($width,$height) = &thumb_dimensions(); |
my ($fullwidth,$fullheight) = &check_dimensions($input); |
my ($fullwidth,$fullheight) = &check_dimensions($input); |
Line 1147 sub display_color_options {
|
Line 1148 sub display_color_options {
|
if ($fullwidth > $width && $fullheight > $height) { |
if ($fullwidth > $width && $fullheight > $height) { |
my $size = $width.'x'.$height; |
my $size = $width.'x'.$height; |
system("convert -sample $size $input $output"); |
system("convert -sample $size $input $output"); |
$showfile = '/'.$imgdir.'/tn-'.$filename; |
$showfile = "/$imgdir/tn-".$filename; |
} |
} |
} |
} |
} |
} |