our %SIZE = (smallthumb => 96,
medthumb => 144,
bigthumb => 228,
+ small => 480,
+ embed => 720,
view => 1200);
export qw{init};
my ($wd, $ht) = ($img->width, $img->height);
my $max = $wd > $ht ? $wd : $ht;
- if ($max <= $sz) { return "$IMGURL/$path"; }
+ if ($max <= $sz)
+ { return $m->interp->apply_escapes("$IMGURL/$path", "u"); }
my $sc = $sz/$max;
my $scaled = $img->create_scaled_image($sc*$wd, $sc*$ht);
$scaled->image_set_format($ty->imlibfmt);
$scaled->set_quality(90);
my $new = "$TMP/t$$-$ext";
- make_path $TMP;
+ make_path $TMP, { mode => 0771 };
$scaled->save($new);
- make_path $dir;
+ make_path $dir, { mode => 0771 };
rename $new, $thumb;
return $thumburl;
}
} else {
if ($item && $comment) { $item->comment($comment); }
my ($flags, $name, $c) =
- /^ (?: ([!]+) \s+)? # flags
+ /^ (?: ([-!]+) \s+)? # flags
(\S+) \s* # filename
(\S | \S.*\S )? # start of the comment
\s*
$/x;
my $indexp = $flags =~ /!/;
+ my $hidep = $flags =~ /-/;
$name = urldecode $name;
my $list;
$item = TrivGal::Item->new($name);
}
}
$comment = $c;
- push @$list, $item;
+ push @$list, $item unless $hidep;
}
}
if ($item && $comment) { $item->comment($comment); }