--- mkgallery.pl Sun Mar 16 00:07:00 2003 +++ mkgallery.pl.mod Sun Jun 13 12:02:56 2004 @@ -270,6 +270,7 @@ $param->{ROWS} = \@rows; $param->{TITLE} = $P{title}; $param->{COLUMNS_NR} = $P{cols}; + $param->{GAL_TOTAL} = scalar@galleries; if ( -f "$template_dir/$P{template}/meta.tmpl" && open IMG, ">$P{img_dir}/index.html" ) { my $tmpl = HTML::Template->new(filename => "$template_dir/$P{template}/meta.tmpl", @@ -360,6 +361,7 @@ $param->{SLIDESHOW_URL} = "sl_$image.html"; $param->{SLIDESHOW_TIMEOUT} = $P{slide_delay}; $param->{TITLE} = "$P{title}: $image_cap"; + $param->{TITLE_SHORT} = "$P{title}"; $d = $img->[$prev_idx]->{THUMB}; $d =~ s/^th_(.*)\.jpg/$1/; @@ -385,6 +387,28 @@ $param->{IMG_SCALED_PATH} = "../scaled/sc_$image_uri.jpg", $param->{IMG_PATH} = "../$image_uri.jpg", + $param->{META_URL} = ( $P{metalink} ) ? "../../index.html" : 0; + if( $img_idx > 0 ) { + $d = $img->[0]->{THUMB}; + $d =~ s/^th_(.*)\.jpg/$1/; + $d_html = encode_entities($d); + $d_uri = encode_entities(uri_escape($d)); + $param->{FIRST_URL} = "$d_uri.html"; + } + else { + $param->{FIRST_URL} = 0; + } + if( $img_idx < $#{$img} ) { + $d = $img->[$#{$img}]->{THUMB}; + $d =~ s/^th_(.*)\.jpg/$1/; + $d_html = encode_entities($d); + $d_uri = encode_entities(uri_escape($d)); + $param->{LAST_URL} = "$d_uri.html"; + } + else { + $param->{LAST_URL} = 0; + } + $tmpl->param ( $param ); @@ -488,6 +512,9 @@ } push @rows, { COLUMNS => \@row }; $param->{ROWS} = \@rows; + + $param->{FIRST_URL} = ( $this == 0 ) ? 0 : "index_0.html"; + $param->{LAST_URL} = ( $this == $total ) ? 0 : "index_$total.html"; if ( -f "$template_dir/$P{template}/index.tmpl" && open IND, ">$P{img_dir}/html/index_$this.html" ) { my $tmpl = HTML::Template->new(filename => "$template_dir/$P{template}/index.tmpl", --- doc/templates.html Sat Mar 15 23:53:43 2003 +++ doc/templates.html.mod Sun Jun 13 12:12:47 2004 @@ -212,8 +212,25 @@