#c// ################################################################### #c// Album Theme by George Hansper #c// ################################################################### #c// <: # Path setting - this is the path to the images $PATH = Theme_URL(); @Photo_Border = ('white',5); #@Album_Border = ('#101080',5); #@Movie_Border = ( 'black',5); $INITIAL_ICON_SIZE=150; $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 .= $indent . "
\n"; $html .= $tag . "\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 .= $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"; } 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_page'); } else { if ( @Photo_Border == 2 ) { $border = \@Photo_Border; } else { $border = 'Photo'; } $href = Get($img,'href','image_page'); } my $tag; $tag = "$href\n"; $tag .= "\t\t\t\t 0 && $thumb_y+0 > 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(""); } } _:>// #c// ################################################################### <:=Trans('Image:'):> <:=Name(This_Image) :> <: Meta() :> > #c// ######################### #c// Header/parents #c// #########################
<:= Parent_Albums(':') :> #c # Previous image <:=Get( Prev(This_Image, Option('image_loop')) ,'href','image_page'):> < Prev <:=Name(This_Image) :> #c # Next image <:=Get( Next(This_Image, Option('image_loop')) ,'href','image_page'):> Next > ><:=Trans('Index'):>
#c// ######################### #c// The image and caption #c// #########################
<: if ( Get($img,'is_movie') ) { if ( @Movie_Border == 2 ) { $border = \@Movie_Border; } else { $border = 'Movie'; } } else { if ( @Photo_Border == 2 ) { $border = \@Photo_Border; } else { $border = 'Photo'; } } my $tag; $tag = "\t" . Get(This_Image,'href','image') . "\n"; $tag .= "\t\t\t\t\t<". Get(This_Image,'full','tag') ." src=" . Get(This_Image,'URL','image_page','image_src'); $tag .= " alt='" . Name(This_Image) . "' "; if ( Get(This_Image,'is_movie') ) { $tag .= " width=" . Get(This_Image,'full','x') . " height=" . Get(This_Image,'full','y'); } $tag .= " style='border:0'"; $tag .= " " . This_Image->{intag}; $tag .= " >\n"; $tag .= "\t\t\t\t\n"; print My_Border($tag,$border); _:>//
<:=Name(This_Image):>
<:=Caption(This_Image) :>

<:=Get(This_Image,'full','x'):> x <:=Get(This_Image,'full','y'):> - <:=Get(This_Image,'full','filesize'):>bytes

#c// ######################### #c// Prev/next thumbnails #c// ######################### <: my ($img,$Prev_2,$Prev_1,$Next_1,$Next_2); $Prev_1 = Prev(This_Image, Option('image_loop')); $Prev_2 = Prev($Prev_1, Option('image_loop')); $Next_1 = Next(This_Image, Option('image_loop')); $Next_2 = Next($Next_1, Option('image_loop')); _:>
<: if ($Prev_2) { _:> <:=Get($Prev_2,'href','image_page'):> << <:=Trans('Prev'):> -2 <: } _:> <: if ($Prev_1) { _:> <:=Get($Prev_1,'href','image_page'):> < <:=Trans('Prev'):> <: } _:> <:=Trans('This image'):> <: if ($Next_1) { _:> <:=Get($Next_1,'href','image_page'):> <:=Trans('Next'):> > <: } _:> <: if ($Next_2) { _:> <:=Get($Next_2,'href','image_page'):> <:=Trans('Next'):> +2 >> <: } _:>
<: if ($Prev_2) { _:> <:=img_with_border($Prev_2):> <: } _:> <: if ($Prev_1) { _:> <:=img_with_border($Prev_1):> <: } _:> width=<:=Get(This_Image,'thumb','x')*0.6 :> height=<:=Get(This_Image,'thumb','y')*0.6 :> > <: if ($Next_1) { _:> <:=img_with_border($Next_1):> <: } _:> <: if ($Next_2) { _:> <:=img_with_border($Next_2):> <: } _:>
<: if ($Prev_2) { _:> <:=Caption($Prev_2):>
<:=Get($Prev_2,'full','x'):> x <:=Get($Prev_2,'full','y'):> - <:=Get($Prev_2,'full','filesize'):>bytes <: } _:>
<: if ($Prev_1) { _:> <:=Caption($Prev_1):>
<:=Get($Prev_1,'full','x'):> x <:=Get($Prev_1,'full','y'):> - <:=Get($Prev_1,'full','filesize'):>bytes <: } _:>
<: if ($Next_1) { _:> <:=Caption($Next_1):>
<:=Get($Next_1,'full','x'):> x <:=Get($Next_1,'full','y'):> - <:=Get($Next_1,'full','filesize'):>bytes <: } _:>
<: if ($Next_2) { _:> <:=Caption($Next_2):>
<:=Get($Next_2,'full','x'):> x <:=Get($Next_2,'full','y'):> - <:=Get($Next_2,'full','filesize'):>bytes <: } _:>
#c// ######################### #c// Footer #c// #########################
<: Credit() :> on <:=scalar localtime:>