From: Jon Langseth Date: Tue, 14 Dec 2010 12:58:42 +0000 (+0100) Subject: Three new features, three bugfixes. Version 0.4 code. X-Git-Tag: plsgen-0.4 X-Git-Url: https://git.defcon.no/?a=commitdiff_plain;ds=sidebyside;p=plsgen Three new features, three bugfixes. Version 0.4 code. --- diff --git a/README b/README index 7a9bf13..371151c 100644 --- a/README +++ b/README @@ -126,6 +126,15 @@ E.g.: Changelog ------------------------- +* 0.3 -> 0.4 +# DONE: Removed some default values in config, allowing empty options +# DONE: Added latest.php, a hybrid between index.php and rss.php .. +# DONE: Gathered all user-related data in php-files as variables on top. +# BUGFIX: Added missing alt-tags to img-tags generated +# BUGFIX: Shipped templates and config now give validating HTML +# BUGFIX: Prepped up index.php to validate aswell +# REMOVED: Will not use perlmagick et. al, removed TODO. + * 0.2 -> 0.3 # DONE: Config option for size of view/thumbnail # DONE: Config option to disable arrow-up navigation @@ -144,14 +153,13 @@ Changelog Todo-list ------------------------- # TODO: Stripping of image suffix for HTML file w/config option? +# TODO: Clear old generated files and meta on regen +# TODO: Image title from EXIF for a title-template-tag. +# TODO: Possibility for hide/show EXIF # TODO: Templating of EXIF # TODO: Priority/sorting of EXIF tags -# TODO: Possibility for hide/show EXIF -# TODO: Clear old generated files and meta on regen -# TODO: Use perlmagick et. al instead of convert/jhead.. # BUG: The naive handling of filenames breaks on special characters - Lisencing ------------------------- Copyright (c) 2010, Jon Langseth diff --git a/full.tpl b/full.tpl index 2be36e9..91eb5c4 100644 --- a/full.tpl +++ b/full.tpl @@ -1,11 +1,13 @@ - + + %{title} %{main_meta} %{navigation_script} + + - -
+

%{title}

@@ -44,7 +46,6 @@ Generated %{gallery_timestamp} %{navscript} -
diff --git a/index.php b/index.php index 4377154..15646fd 100644 --- a/index.php +++ b/index.php @@ -1,20 +1,9 @@ - -plsgen-generated photoalbum. - - - - - -
- -
- + + + +<?=$pagetitle?> + + + + + + +
+ +
+ + $value ) { echo "
"; echo ""; echo ""; echo "
$value
"; echo "
"; @@ -73,7 +86,7 @@ foreach ( $album as $key => $value ) {
-Photo gallery index by Jon Langseth, generated using index.php +plsgen : Perl Simple Gallery Generator
diff --git a/index.tpl b/index.tpl index 3bd8bdb..bfad7d7 100644 --- a/index.tpl +++ b/index.tpl @@ -1,8 +1,10 @@ - + + %{title} %{main_meta} %{navigation_script} + diff --git a/plsgen b/plsgen index 323e5c3..585ff8d 100755 --- a/plsgen +++ b/plsgen @@ -7,10 +7,7 @@ use threads; use threads::shared; use strict; -# DONE: Config option for size of view/thumbnail -# DONE: Config option to disable arrow-up navigation -# DONE: Config option to disable image rescaling ? -# DONE: Consider multithreading +# DONE: Removed some default values in config, allowing empty options # TODO: Stripping of image suffix for HTML file w/config option? # TODO: Templating of EXIF # TODO: Priority/sorting of EXIF tags @@ -142,8 +139,8 @@ for ( my $i = 1; $i <= $imagecount; $i++) else { $indexfile = "index" . $indexcount . ".html"; } my $navscript = gen_navscript( $previous, $next, $indexfile ); my $position = $i . " of " . $imagecount; - my $prev_text = ""; - my $next_text = ""; + my $prev_text = "Previous image"; + my $next_text = "Next image"; my $cur_index_text = "" . $idx_ret_text . ""; my $current_display = $current; $current_display = "view/" . $current unless $disable_rescale; @@ -221,7 +218,7 @@ for ( my $i = 1; $i <= $imagecount; $i++) close HTML; # - - Append image thumbnail code to current index content - $thumbs .= $thumb_pre . "" . $thumb_post; + $thumbs .= $thumb_pre . "View " . $current . "" . $thumb_post; if ( $i % ($rows*$columns) == 0 ) { $thumbs .= "
"; @@ -423,7 +420,7 @@ sub get_config CASE => 1, ERROR => \&cfg_error, GLOBAL => { - DEFAULT => "", + DEFAULT => "", ARGCOUNT => AppConfig::ARGCOUNT_ONE }, } @@ -462,21 +459,14 @@ sub get_config $cfg->disable_rescale(0); $cfg->define('thumb_pre'); - $cfg->thumb_pre("
"); $cfg->define('thumb_post'); - $cfg->thumb_post("
"); $cfg->define('comment_pre'); - $cfg->comment_pre("
"); $cfg->define('comment_post'); - $cfg->thumb_post("
"); $cfg->define('idx_prev_text'); - $cfg->idx_prev_text("← Back"); $cfg->define('idx_next_text'); - $cfg->idx_next_text("Next →"); $cfg->define('idx_ret_text'); - $cfg->idx_ret_text("To index"); $cfg->define('footer_tag'); $cfg->footer_tag('plsgen : Perl Simple Gallery Generator ' . $version); diff --git a/plsgen.cfg b/plsgen.cfg index 7436ef4..c1c418e 100644 --- a/plsgen.cfg +++ b/plsgen.cfg @@ -50,21 +50,25 @@ disable_rescale = 0 # HTML code to wrap each thumbnail with. The default allows simple # styling. If you wish to span this over multiple lines, use the # end-of-line continuation mark \ +# To get empty content, comment out, or simply don't include these thumb_pre =
thumb_post =
# HTML code to wrap comments with, for both index and image # display. The default allows simple styling. If you wish to span # this over multiple lines, use the end-of-line continuation mark \ +# To get empty content, comment out, or simply don't include these comment_pre =
comment_post =
# Text-strings that can easily be replaced with more complex HTML. +# To get empty content, comment out, or simply don't include these idx_prev_text = ← Back idx_next_text = Next → idx_ret_text = To index # The Album generator tag can be overridden. This is commented # out in the sample, but included as an example. +# This cannot be empty, but it can be set to a   ;) #footer_tag = plsgen : Perl Simple Gallery Generator diff --git a/rss.php b/rss.php index 21cfa0c..c4af866 100644 --- a/rss.php +++ b/rss.php @@ -1,9 +1,9 @@