#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//
<:
# Path setting - this is the path to the images
$PATH = Theme_URL();
# Font/color settings for the document
$TITLE_FONT = "size='5' color='#452245' face='Times New Roman,Georgia,Times'";
$MAIN_FONT = "face='Times New Roman,Georgia,Times'";
$CREDIT_FONT = "size='-1' face='Verdana' color='#452245'";
$BODY = "background='$PATH/bkgrnd.gif' link='#452245' alink='#452245' vlink='#452245' text='#452245'";
$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";
} :>
|
<:
}
# Thumbnail border
@Over_TL = ("$PATH/Over_TL.png", 120, 73);
@Over_T = ("$PATH/Over_T.png", 2, 73);
@Over_TR = ("$PATH/Over_TR.png", 2, 73);
@Over_R = ("$PATH/Over_R.png", 2, 2);
@Over_BR = ("$PATH/Over_BR.png", 2, 2);
@Over_B = ("$PATH/Over_B.png", 2, 2);
@Over_BL = ("$PATH/Over_BL.png", 120, 2);
@Over_L = ("$PATH/Over_L.png", 120, 2);
@Border = (\@Over_TL,\@Over_T,\@Over_TR,\@Over_R,\@Over_BR,\@Over_B,\@Over_BL,\@Over_L) unless @Border;
# Overlay padding
push(@Over_T, 14);
push(@Over_B, 2);
push(@Over_L, 32);
push(@Over_R, 2);
:>//
#c//
#c// ###################################################################
#c// Everything beyond here is the same for every DaveWeb theme..
#c// ###################################################################
<:
# Shorthand for column info specified by -columns
$Dir_Thumbs = Option('dir_thumbs');
$Cols = Option('columns');
$Col_Perc = int(100/$Cols)."%";
:>//
<: Meta() :>
<:= Trans('Album:') :> <:= Path('album_name') :>
<:= $CSS :>
<:Body_Tag():>>
| <:=Image_Array("$PATH/Null.gif",11,10):> |
<:=$START_TITLE:>
<: if ($Icon) {
print Image_Ref($Icon,"align='middle'");
print "\n \n";
} else {
print "".Trans('Album:')."\n";
} _:>
<:= Parent_Albums(':'); :>
<:=$END_FONT:> |
|
<: if ($Dir_Thumbs && isHeader()) { _:>
<:=$START_MAIN:>
<:pHeader():>
<:=$END_FONT:>
|
<: } _:>
<: Bar($Cols) :>
| <:=Image_Array("$PATH/Null.gif",20,10):> |
#c// Are there more albums below this one?
<:
my $alb = First('dirs');
if ($alb) { _:>
<: if (!$Dir_Thumbs) { :>
<:=$START_TITLE:>
<:= $More ? Image_Ref($More) : "".Trans('More albums:')."" :>
<:=$END_FONT:>
<:=$START_MAIN:>
<: } elsif ($More) { :>
|
<:=Image_Ref($More):>
|
<: } :>
#c//
#c// Loop on all the albums
<: my @save;
while ($alb) {
if ($Dir_Thumbs) {
_:>
<: PickOverlay($alb, 'thumb') if @Overlays :>
<: Border($alb, 'thumb','dir', @Border) if Get($alb,'thumb','x') :>
<: push(@save,$alb); :>
|
<: if (New_Row($alb,$Cols,$More?1:0) || !Next($alb)) { _:>
<: foreach my $save ( @save ) { _:>
<:= " | \n" unless !$More || Get($save,'num') :>
<:=$START_MAIN:>
<:= Image_Array( (-e Get($save,'path').'/.htaccess') ? @Locked : @NotLocked) :>
<:=Get($save,'href','dir'):>
<:=Pretty(Name($save),1,1):>
<: my $cap = Caption($save);
my $num_pics = Get($save,'num_pics_str');
my $num_dirs = Get($save,'num_dirs_str');
if ($cap || $num_pics || $num_dirs) { _:>
<:=$cap if $cap:>
<:=" " if $cap && ($num_pics || $num_dirs):>
<:=$num_dirs:>
<:=", " if $num_pics && $num_dirs:>
<:=$num_pics:>
<: } :>
<:=$END_FONT:>
|
<:
} # end foreach $save
undef @save;
if (New_Row($alb,$Cols,$More?1:0)) { _:>
<:
} # end new row
} # end printing of $save
# end if $Dir_Thumbs
} else {
print Image_Array( (-e Get($alb,'path').'/.htaccess') ? @Locked : @NotLocked);
print Get($alb,'href','dir');
print Pretty(Name($alb),1,1), "";
my $cap = Caption($alb);
my $num_pics = Get($alb,'num_pics_str');
my $num_dirs = Get($alb,'num_dirs_str');
if ($cap || $num_pics || $num_dirs) { _:>
<:=$cap if $cap:>
<:=": " if $cap && ($num_pics || $num_dirs):>
<:=$num_dirs:>
<:=", " if $num_pics && $num_dirs:>
<:=$num_pics:>
<: }
print " \n";
} # end not $Dir_Thumbs
$alb = Next($alb);
} # End child album loop
_:>
<: if (!$Dir_Thumbs) { :>
<:=$END_FONT:>
<:=$START_MAIN:>
<:pHeader():>
<:=$END_FONT:>
|
<: }
:>//
|
#c// Bar after child albums
<: Bar($Cols) :>
#c//
#c// End if albums
<: } :>
#c//
#c// The images
<:
my $img = First('pics');
if ($img) { _:>//
<: my @save;
while ($img) {
_:>
|
<: PickOverlay($img, 'thumb') if @Overlays :>
<: Border($img,'thumb','image', @Border) if Get($img,'thumb','x') :>
<: push(@save,$img); :>
|
<: if (New_Row($img,$Cols) || !Next($img)) { _:>
<: foreach my $save ( @save ) { _:>
<:=$START_MAIN:>
<:=Get($save,'href','image'):>
<:=Pretty(Name($save),1,1):>
<: if (my $cap = Caption($save)) { _:>
<:=$cap:>
<: } :>
<:=$END_FONT:>
|
<:
}
undef @save;
if (New_Row($img,$Cols)) { _:>
| <:=Image_Array("$PATH/Null.gif",20,20):> |
<:
}
}
$img = Next($img);
} # End child album loop
_:>
| <:=Image_Array("$PATH/Null.gif",20,20):> |
<: Bar($Cols) :>
<:}:>//
<: if (isFooter()) { _:>
<:pFooter():>
|
<: Bar($Cols) :>
<: } _:>
|
<:=$START_CREDIT:><: Credit() :> on <:=scalar localtime:><:=$END_FONT:>
|