<:= Trans('Album:') :> <:= Path('album_name') :>

#c// ################################################################### #c// Album Theme by George Hansper #c// ################################################################### #c// <: # Path setting - this is the path to the images $PATH = Theme_URL(); $CREDIT_FONT = "size='-2' color='#CCCCCC'"; $TITLE_FONT = "color='#CCCCCC'"; $link_color = "#FFFFFF"; $BODY = "bgcolor='#808080' link='$link_color' alink='$link_color' vlink='$link_color' text='#CCCCCC'"; @Photo_Border = ('white',5); #@Album_Border = ('#101080',5); #@Movie_Border = ( 'black',5); $INITIAL_ICON_SIZE=150; $START_TITLE = ""; $START_MAIN = ""; $START_CREDIT = ""; $SLIDESHOW = Option('slideshow'); $COLS=Option('columns'); # Borders my %Border = ( Photo => { L => { url => "$PATH/Photo_Border_L.gif", x => 25, y => 100 }, R => { url => "$PATH/Photo_Border_R.gif", x => 25, y => 100 }, TL => { url => "$PATH/Photo_Border_TL.gif", x => 25, y => 25 }, TR => { url => "$PATH/Photo_Border_TR.gif", x => 25, y => 25 }, BL => { url => "$PATH/Photo_Border_BL.gif", x => 25, y => 25 }, BR => { url => "$PATH/Photo_Border_BR.gif", x => 25, y => 25 }, T => { url => "$PATH/Photo_Border_T.gif", x => 125, y => 25 }, B => { url => "$PATH/Photo_Border_B.gif", x => 125, y => 25 } }, Album => { TL => { url => "$PATH/Album_Border_TL.png", x => 6, y => 6 }, T => { url => "$PATH/Album_Border_TL.png", x => 300, y => 6 }, TR => { url => "$PATH/Album_Border_TR.png", x => 25, y => 6 }, R => { url => "$PATH/Album_Border_R.png", x => 25, y => 300 }, BR => { url => "$PATH/Album_Border_BR.png", x => 25, y => 25 }, B => { url => "$PATH/Album_Border_B.png", x => 300, y => 25 }, BL => { url => "$PATH/Album_Border_BL.png", x => 6, y => 25 }, L => { url => "$PATH/Album_Border_TL.png", x => 6, y => 300 }, }, Movie => { TL => { url => "$PATH/Movie_Border_CNR.gif", x => 15, y => 5 }, TR => { url => "$PATH/Movie_Border_CNR.gif", x => 15, y => 5 }, BL => { url => "$PATH/Movie_Border_CNR.gif", x => 15, y => 5 }, BR => { url => "$PATH/Movie_Border_CNR.gif", x => 15, y => 5 }, L => { url => "$PATH/Movie_Border_L.gif", x => 15, y => 114 }, R => { url => "$PATH/Movie_Border_R.gif", x => 15, y => 114 }, T => { url => "$PATH/Movie_Border_CNR.gif", x => 15, y => 5 }, B => { url => "$PATH/Movie_Border_CNR.gif", x => 15, y => 5 } } ); # my %Border sub My_Border { my ($tag,$border) = @_; my $indent; my $html; $_ = $tag; m/^(\s*)/; $indent = $1; if ( @{$border} > 0 ) { # Simple border - Color+width only $html = $indent . "

\n"; $html .= $indent . "
\n"; $html .= $tag . "\n"; $html .= $indent . "
\n"; $html .= $indent . "

\n"; } else { # Fancy gif-based vorder $html = $indent . "

\n"; $html .= $indent . "
\n"; $html .= $indent . " \n"; $html .= $indent . " | \n"; $html .= $indent . " | \n"; $html .= $indent . "
\n"; $html .= $indent . "
\n"; $html .= $indent . " \n"; $html .= $indent . " | \n"; $html .= $tag . "\n"; $html .= $indent . " \n"; $html .= $indent . " | \n"; $html .= $indent . "
\n"; $html .= $indent . "
\n"; $html .= $indent . " \n"; $html .= $indent . " | \n"; $html .= $indent . " | \n"; $html .= $indent . "
\n"; $html .= $indent . "

\n"; } return $html; } sub img_with_border { my ($img) = @_; my $tag; my $border; my $href; if ( Get($img,'type') eq 'dirs' ) { if ( @Album_Border == 2 ) { $border = \@Album_Border; } else { $border = 'Album'; } $href = Get($img,'href','dir'); } elsif ( Get($img,'is_movie') ) { if ( @Movie_Border == 2 ) { $border = \@Movie_Border; } else { $border = 'Movie'; } $href = Get($img,'href','image'); } else { if ( @Photo_Border == 2 ) { $border = \@Photo_Border; } else { $border = 'Photo'; } $href = Get($img,'href','image'); } my $tag; $tag = "\t\t\t\t$href\n"; $tag .= "\t\t\t\t\t 0 && $thumb_y > 0 ) { if ( $thumb_y > $thumb_x ) { $height = "height=$INITIAL_ICON_SIZE"; $width = "width=" . $INITIAL_ICON_SIZE * $thumb_x / $thumb_y; } else { $width = "width=$INITIAL_ICON_SIZE"; $height = "height=" . $INITIAL_ICON_SIZE * $thumb_y / $thumb_x; } return("$width $height"); } else { return(""); } } ############################################################################ # Start HTML ############################################################################ :>// <: Meta() :> <:= $CSS :>
<:Body_Tag():> >

<:=$START_TITLE:> <: if ($Icon) { print Image_Ref($Icon,"align='middle'"); print "\n\t\t \n"; } else { print "\t\t".Trans('Album:')."\n"; } _:>// #c########################################################################### #c# Parent Albums (ie the path to this child album) #c########################################################################### <:= Parent_Albums(' : '); :>

Thumbnail size: <: my $thumb = First('pic'); my $thumb_x = Get($thumb,'thumb','x'); my $thumb_y = Get($thumb,'thumb','y'); my $icon_size = $thumb_x > $thumb_y ? $thumb_x : $thumb_y ; my $button; my $last_button=0; foreach $button ( sort(100, 120, 150, 200, 240, 300, 360, $icon_size, $INITIAL_ICON_SIZE ) ) { if( $button != $last_button && $button <= $icon_size ){ _:> onclick="setthumbsize(this)" <:=($button==$INITIAL_ICON_SIZE?"checked":""):> ><:=$button:> <: } $last_button=$button; } _:> <: $back=Back(); if ($back && $back ne "''" && $back ne "'0'") {_:>// <:=$START_TITLE:> > <:=($Back ? Image_Ref($Back,"align='middle'") : Trans('Up')):> <: }:>//

#c########################################################################### #c# Child Albums #c########################################################################### <: my $alb = First('dirs'); my @save; my $thumb_html; while ($alb) { push(@save,$alb); if ( @save == 1 ) { # This is the 1st album on the row print "\t
\n"; } # Output the album icons... my ($initial_width,$initial_height); if (Option('dir_thumbs')) { _:> <: if ( Get($alb,'thumb','x') > 0 ) { print img_with_border($alb); } if ( @save >= $COLS || Next($alb) eq undef ) { # If this is the last album on this row _:>
<: } # end @save >= $COLS ||... } # end if Option('dir_thumbs') # Output the album captions... if ( @save >= $COLS || Next($alb) eq undef ) { my $col; for($col=0; $col < $COLS; $col++) { if($save[$col] eq undef ) { _:> <: } else { _:> | <:=$START_MAIN:> <:= Image_Array( (-e Get($save[$col],'path').'/.htaccess') ? @Locked : @NotLocked) :> <:=Get($save[$col],'href','dir'):> <:=Pretty(Name($save[$col]),1,1):> <: my $cap = Caption($save[$col]); my $num_pics = Get($save[$col],'num_pics_str'); my $num_dirs = Get($save[$col],'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 for $col } if ( @save >= $COLS ) { # This is the last album on the row print "\t\n"; undef @save; } $alb = Next($alb); } # End child album loop # Bar after child albums if ( num('dirs') > 0 ) { _:>//

<: } _:>// #c########################################################################### #c# Header (Optional) #c########################################################################### <: if (isHeader()) { _:>
<:pHeader():>

<: } _:>// #c########################################################################### #c# Images (this album) #c########################################################################### <: my $img = First('pics'); my @save; my $border; while ($img) { push(@save,$img); if ( @save == 1 ) { # This is the 1st thumbnail on the row print "\t
\n"; } # Output the thumbnails... _:>// <:=img_with_border($img):>// <: if ( @save >= $COLS || Next($img) eq undef ) { # If this is the last thumbnail on this row _:>
<: } # end if ...% $COLS # Output the captions... if ( @save >= $COLS || Next($img) eq undef ) { my $col; for($col=0; $col < $COLS; $col++) { if($save[$col] eq undef ) { _:> <: } else { _:> <:=$START_MAIN:> <:=Get($save[$col],'href','image'):> <:=Pretty(Name($save[$col]),1,1):> <: if (my $cap = Caption($save[$col])) { _:> <:=$cap:>
<:=Get($save[$col],'full','x'):> x <:=Get($save[$col],'full','y'):> - <:=Get($save[$col],'full','filesize'):>bytes <: } :>
<: } } # end for $col } # end if ...% $COLS if ( @save >= $COLS ) { # This is the last thumbnail on the row print "\t
\n"; undef @save; } $img = Next($img); } _:>

#c########################################################################### #c# Footer (Optional) #c########################################################################### <: if (isFooter()) { _:>
<:pFooter():>

<: } _:> #c########################################################################### #c# Credit #c###########################################################################
><: Credit() :> on <:=scalar localtime:>