our @ISA = qw(UCW::Gallery::Web);
my $theme_name = "plain";
-my $navw = 48;
-my $navh = 48;
-my $box_w = 130;
-my $box_h = 110;
-my $thumb_w = 114;
-my $thumb_h = 94;
sub theme_dir($) {
my ($self) = @_;
sub theme_head_extras($) {
my ($self) = @_;
- my $tdir = $self->theme_dir;
my $hsdir = $self->get('ThemeUrlPrefix') . "highslide";
return <<AMEN ;
-<link rel=stylesheet href='$tdir/style.css' type='text/css' media=all>
<script type="text/javascript" src="$hsdir/highslide-with-gallery.js"></script>
<script type="text/javascript" src="$hsdir/custom.js" charset="utf-8"></script>
<script type="text/javascript">
my ($self, $prev, $up, $next) = @_;
my $theme = $self->theme_dir;
print "<p class=parent>";
- print "<span class=back style='width: ${navw}px; height: ${navh}px'>";
- print "<a href='$prev'><img src='$theme/prev.png' width=${navw} height=${navh} alt='Back'></a>" if $prev ne "";
- print "</span>\n";
- printf "<span class=fwd style='width: ${navw}px; height: ${navh}px'>";
- printf "<a href='$next'><img src='$theme/next.png' width=${navw} height=${navh} alt='Forward'></a>" if $next ne "";
- print "</span>\n";
- printf "<a href='$up'><img src='$theme/back.png' width=${navw} height=${navh} alt='Up'></a>" if $up ne "";
+ print "<a href='$prev'><img class=back prev src='$theme/prev.png'></a>" if $prev ne "";
+ printf "<a href='$next'><img class=fwd src='$theme/next.png'></a>" if $next ne "";
+ printf "<a href='$up'><img class=up src='$theme/back.png'></a>" if $up ne "";
}
sub show_pre_thumbs($) {
sub show_thumb($) {
my ($self, $meta, $photo_id, $click_url) = @_;
- 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 $tm = $meta->{thumb}->{$tf}->{$photo_id} or die "No thumbnails for format $tf found!\n";
my $tw = $tm->{w};
my $th = $tm->{h};
print "<img src='$thumb' width=$tw height=$th alt='Photo'$tit></a>\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;
}