my $navh = 48;
my $box_w = 130;
my $box_h = 110;
-my $thumb_w = 114;
-my $thumb_h = 94;
sub theme_dir($) {
my ($self) = @_;
my $theme = $self->theme_dir;
my $m = $meta->{photo}->{$photo_id};
my $annot = UCW::CGI::html_escape($m->{title});
- my $tf = $self->{thumb_fmt};
+ my $tf = $self->get('ThumbFormats')->[0];
+ my ($thumb_w, $thumb_h) = $self->{gal}->thumb_fmt_to_size($tf);
my $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n";
my $tw = $tm->{w};
my $th = $tm->{h};
print "</div></div>\n\n";
}
-sub attach($$) {
+sub run($$) {
my ($class, $gal) = @_;
my $self = $class->SUPER::attach($gal);
- $self->{thumb_fmt} = $gal->require_thumbnails($thumb_w, $thumb_h);
+ $self->dispatch();
return $self;
}