<:=Trans('Image:') :> <:=Name(This_Image) :>

#c// ################################################################### #c// Album Theme by David Ljung Madison #c// Design by Dave Simmer of DaveWeb.com, modified by Dave Madison #c// -- Auto generated by simmer_theme v3.10 #c// -- From: http://MarginalHacks.com/Hacks/album/ #c// ################################################################### #c// <: # Version requirements if (Version_Num() < 3.10) { print STDERR "\n[THEME ERROR] This theme requires album v3.10\n"; exit(-1); } # Path setting - this is the path to the images $PATH = Theme_URL(); $CSS = ""; $BODY=""; $START_TITLE = ""; $START_MAIN = ""; $START_CREDIT = ""; $END_FONT = ""; $SLIDESHOW = Option('slideshow'); # Icons/graphics sub Bar { my ($colspan) = @_; return unless @Bar_M; :>

<: foreach my $bar ( \@Bar_L, \@Bar_ML, \@Bar_M, \@Bar_MR, \@Bar_R ) { next unless @$bar; my $width = $bar->[1] =~ /100%/ ? "" : " width='$bar->[1]'"; print "\t\t\t\t\t\t\t"; print Image_Array(@$bar); print "\n"; } :>

<: } # Overlays push(@Overlays, ["$PATH/Overlay.1.png", 147, 115]); push(@Overlays, ["$PATH/Overlay.2.png", 147, 115]); push(@Overlays, ["$PATH/Overlay.3.png", 147, 115]); push(@Overlays, ["$PATH/Overlay.4.png", 147, 115]); push(@Overlays, ["$PATH/Overlay.5.png", 147, 115]); push(@Overlays, ["$PATH/Overlay.6.png", 147, 115]); # Come up with a 'distance' of ratio/size closeness sub OverlayErr { my ($x,$y,$overlay) = @_; my $ox = $overlay->[1]; my $oy = $overlay->[2]; my $err = abs($x-$ox)/$x; $err += abs($y-$oy)/$y; $err += abs(($x/$y)-($ox/$oy))/($x/$y); $err; } srand(time^$$); sub PickOverlay { my ($img, $type) = @_; my $x = Get($img,$type,'x'); return unless $x; my $y = Get($img,$type,'y'); # Find the lowest error my $besterr = undef; foreach my $overlay ( @Overlays ) { my $err = OverlayErr($x,$y,$overlay); next if defined $besterr && $besterr<$err; $besterr = $err; } # Now find a list of overlays that are close to that error $besterr *= 1.05; # Err or within 5% <- HEURISTIC! my @best = grep { OverlayErr($x,$y,$_) <= $besterr; } @Overlays; # Pick one randomly and apply it Overlay($img,$type,'full', $best[int(rand($#best+1))]); } # Thumbnail border @Bord_L = ("$PATH/Bord_L.png", 7, 12); @Bord_R = ("$PATH/Bord_R.png", 7, 12); @Bord_TL = ("$PATH/Bord_TL.png", 7, 7); @Bord_TR = ("$PATH/Bord_TR.png", 7, 7); @Bord_BL = ("$PATH/Bord_BL.png", 7, 7); @Bord_BR = ("$PATH/Bord_BR.png", 7, 7); @Bord_T = ("$PATH/Bord_T.png", 12, 7); @Bord_B = ("$PATH/Bord_B.png", 12, 7); @Border = (\@Bord_TL,\@Bord_T,\@Bord_TR,\@Bord_RT,\@Bord_R,\@Bord_RB,\@Bord_BR,\@Bord_B,\@Bord_BL,\@Bord_LB,\@Bord_L,\@Bord_LT) unless @Border; :>// #c// #c// ################################################################### #c// Everything beyond here is the same for every DaveWeb theme.. #c// ###################################################################
<: Meta() :> <:= $CSS :> <: if ($SLIDESHOW) { :> <: unless ($CSS) { :>
<: } :>
<: } :>
<:Body_Tag():> > <:=Image_Array("$PATH/Null.gif",1,10):>

<: if ($Icon) { print Image_Ref($Icon,"align='middle'"); print "\n \n"; } _:> <:=$START_TITLE:> <:= Parent_Albums(':'); :> <:=$END_FONT:> <: if ($SLIDESHOW) { :> | <: } :> | ><:print $Back ? Image_Ref($Back) : "${START_TITLE}".Trans('Back')."$END_FONT"; :>
<: Bar($SLIDESHOW ? 3 : 2) :>

#c// #c// Prev/caption/next #c//
<: if (my $prev = Prev(This_Image, $opt->{image_loop})) { _:> <:=$START_MAIN:> <:=Get($prev,'href','image_page','image_page'):> <:= $Prev ? "".Image_Ref($Prev)."" : "(".Trans('Prev').") "; :> <:=Pretty(Name($prev),1):> <:=$END_FONT:> <: } _:> | <:=$START_TITLE:> <:=Get(This_Image,'href','image'):> <:=Pretty(Name(This_Image),1,1):><:=$END_FONT:> <:=$START_MAIN:> <:=Caption(This_Image):><:=$END_FONT:> | <: if (my $next = Next(This_Image, $opt->{image_loop})) { _:> <:=$START_MAIN:> <:=Get($next,'href','image_page','image_page'):> <:= "".Image_Ref($Next)."" if $Next :> <:=Pretty(Name($next),1):> <:= " (".Trans('Next').")" unless $Next; :> <:=$END_FONT:> <: } _:>

#c// #c// The image #c//
<: PickOverlay(This_Image, 'full') if @Overlays :> <: Border(This_Image,'full','image', @Border) :>
<:=Image_Array("$PATH/Null.gif",20,20):>
<: Bar(1) :>
<:=$START_CREDIT:><: Credit() :> on <:=scalar localtime:><:=$END_FONT:>