From 384200797d6d52ee308776595427bc698a5c7fe3 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Thu, 27 May 2004 00:40:34 +0000 Subject: [PATCH] Fix mess with titles --- www/WebMagick/Makefile | 2 +- www/WebMagick/files/patch-aa | 103 +++++++++++++---------------------- 2 files changed, 40 insertions(+), 65 deletions(-) diff --git a/www/WebMagick/Makefile b/www/WebMagick/Makefile index b5d2d1b8e69f..05f3acd456bb 100644 --- a/www/WebMagick/Makefile +++ b/www/WebMagick/Makefile @@ -7,7 +7,7 @@ PORTNAME= WebMagick PORTVERSION= 2.03p3 -PORTREVISION= 10 +PORTREVISION= 11 PORTEPOCH= 1 CATEGORIES= www graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} diff --git a/www/WebMagick/files/patch-aa b/www/WebMagick/files/patch-aa index 37bd7ff92351..3c13477c691c 100644 --- a/www/WebMagick/files/patch-aa +++ b/www/WebMagick/files/patch-aa @@ -2,15 +2,15 @@ Index: webmagick.in =================================================================== RCS file: /cvsroot/webmagick/WebMagick/webmagick.in,v retrieving revision 1.117 -retrieving revision 1.136 -diff -u -r1.117 -r1.136 +retrieving revision 1.137 +diff -u -r1.117 -r1.137 --- webmagick.in 23 Oct 2002 16:14:47 -0000 1.117 -+++ webmagick.in 26 May 2004 23:28:43 -0000 1.136 ++++ webmagick.in 27 May 2004 00:25:52 -0000 1.137 @@ -1,6 +1,6 @@ #! @PERL@ # -# $Id: webmagick.in,v 1.117 2002/10/23 16:14:47 clindell Exp $ -+# $Id: webmagick.in,v 1.136 2004/05/26 23:28:43 ache Exp $ ++# $Id: webmagick.in,v 1.137 2004/05/27 00:25:52 ache Exp $ # # You are looking at the main PERL script for WebMagick, a package to # intelligently create HTML and JavaScript index files and imagemaps @@ -137,10 +137,11 @@ diff -u -r1.117 -r1.136 $opt_pichtmlext = '.html'; # Use .shtml for SSI +$opt_pichtmllink = ''; # Where to link pic $opt_pichtmlnav = 0; # Write navigation into pic's HTML +-$opt_pichtmlputtitle = 1; # Write picture title above it +$opt_pichtmlupfirst = 1; # Put up button before next/prev +$opt_edgelinksindex = 0; # End links link back to index - $opt_pichtmlputtitle = 1; # Write picture title above it -+$opt_pichtmltitletop = 1; # Put picture title at top ++$opt_pichtmlputtitle = 1; # Write picture title ++$opt_pichtmltitletop = 1; # Put picture title at top $opt_pichtmltarget = ''; $opt_pichtmltitleend = '

'; # End tags for picture title $opt_pichtmltitlestart = '

'; # Start tags for picture title @@ -883,7 +884,7 @@ diff -u -r1.117 -r1.136 print( PICHTML " \n" ) if( "$opt_metaauthor" ne '' ); print( PICHTML " \n" ) -@@ -2469,32 +2593,32 @@ +@@ -2469,32 +2593,19 @@ print( PICHTML "\n" ); print( PICHTML ""); + print ( PICHTML "

"); # Must be visible at each page, if no frames if (!$opt_frames) { -@@ -2507,7 +2631,7 @@ +@@ -2507,7 +2618,7 @@ } # up @@ -941,7 +934,7 @@ diff -u -r1.117 -r1.136 if ($opt_frames) { print ( PICHTML "
"); + print ( PICHTML "
"); ++ } ++ ++ if ($opt_pichtmlputtitle && $opt_pichtmltitletop) { ++ print ( PICHTML "${opt_pichtmltitlestart}${altlabel}${opt_pichtmltitleend}"); } - if ( $pic =~ /\.(jpg|jpeg?|gif|xbm|png)$/i ) { - print( PICHTML "\"\"" ); -+ #BRAD added to put picture title at top -+ if ($opt_pichtmlputtitle && $opt_pichtmltitletop) { -+ print ( PICHTML "${opt_pichtmltitlestart}"); -+ if (defined( $imageCaptions{$pic})) { -+ print( PICHTML "$imageCaptions{$pic}"); -+ } elsif (defined( $imageLabels{$pic})) { -+ print( PICHTML "$imageLabels{$pic}"); -+ } else { -+ print( PICHTML "$pic"); -+ } -+ print ( PICHTML "${opt_pichtmltitleend}"); -+ } -+ + if ($pic =~ /\.(jpg|jpeg?|gif|xbm|png)$/i) { + print( PICHTML "
") + if ($opt_pichtmllink ne ''); @@ -1053,21 +1037,12 @@ diff -u -r1.117 -r1.136 + print( PICHTML "", escapehtml($pic), " ", fsize($pic), "" ); + } + -+ #BRAD added to put picture title at bottom + if ($opt_pichtmlputtitle && !$opt_pichtmltitletop) { -+ print ( PICHTML "${opt_pichtmltitlestart}"); -+ if (defined( $imageCaptions{$pic})) { -+ print( PICHTML "$imageCaptions{$pic}"); -+ } elsif (defined( $imageLabels{$pic})) { -+ print( PICHTML "$imageLabels{$pic}"); -+ } else { -+ print( PICHTML "$pic"); -+ } -+ print ( PICHTML "${opt_pichtmltitleend}"); ++ print ( PICHTML "${opt_pichtmltitlestart}${altlabel}${opt_pichtmltitleend}"); } print( PICHTML "$opt_pichtmlbottom\n") if ("$opt_pichtmlbottom" ne ''); -@@ -2590,7 +2781,7 @@ +@@ -2590,7 +2750,7 @@ print INDEX ""; } @@ -1076,7 +1051,7 @@ diff -u -r1.117 -r1.136 if ($opt_pichtml) { print (INDEX ""); -@@ -2601,17 +2792,34 @@ +@@ -2601,17 +2761,34 @@ # TODO: make sure the thumbnails are created, and get some image sizes # TODO: save the labels in a new array, maybe same with sizes if ( $thumbImageSizes{$pic}) { @@ -1116,7 +1091,7 @@ diff -u -r1.117 -r1.136 } # if ($opt_tables) } # for each picture -@@ -2622,6 +2830,13 @@ +@@ -2622,6 +2799,13 @@ { print INDEX ""; } @@ -1130,7 +1105,7 @@ diff -u -r1.117 -r1.136 print (INDEX "\n") } else {print( INDEX "\n" );} } -@@ -2630,6 +2845,9 @@ +@@ -2630,6 +2814,9 @@ # Print Copyright info on non-blank pages. if( $numimages > 0 ) { @@ -1140,7 +1115,7 @@ diff -u -r1.117 -r1.136 if( "${opt_address}" ne '' ) { print( INDEX "

${opt_address}
\n" ); } -@@ -2642,13 +2860,17 @@ +@@ -2642,13 +2829,17 @@ # If anonymous, don't show copyright and address info if( ! $opt_anonymous ) { print( INDEX "
\n${opt_msg_produced_by} " ); @@ -1160,7 +1135,7 @@ diff -u -r1.117 -r1.136 } print( INDEX "\n" ); -@@ -2674,13 +2896,12 @@ +@@ -2674,13 +2865,12 @@ open( JSINDEX, ">$fileNames{'jsPageIndex'}") || die("$0: Failed to open file $fileNames{'jsPageIndex'} for output\n$@\n"); @@ -1178,7 +1153,7 @@ diff -u -r1.117 -r1.136 print( JSINDEX " top.drawWindows();\n"); print( JSINDEX "\n"); print( JSINDEX "\n"); -@@ -3465,6 +3686,10 @@ +@@ -3465,6 +3655,10 @@ sub sortDir { if(defined($dirOrder{$a}) && defined($dirOrder{$b})) { $dirOrder{$a} <=> $dirOrder{$b} @@ -1189,7 +1164,7 @@ diff -u -r1.117 -r1.136 } else { lc($a) cmp lc($b); } -@@ -3476,7 +3701,11 @@ +@@ -3476,7 +3670,11 @@ sub sortImages { if(defined($imageOrder{$a}) && defined($imageOrder{$b})) { $imageOrder{$a} <=> $imageOrder{$b} @@ -1202,7 +1177,7 @@ diff -u -r1.117 -r1.136 lc($a) cmp lc($b); } } -@@ -3868,7 +4097,7 @@ +@@ -3868,7 +4066,7 @@ # Set image label # my $label = ''; @@ -1211,7 +1186,7 @@ diff -u -r1.117 -r1.136 if( defined( $imageLabels{$imagename} ) ) { # Set image specific label $label = $imageLabels{$imagename}; -@@ -3922,7 +4151,7 @@ +@@ -3922,7 +4120,7 @@ # put our label into the table image hash @@ -1220,7 +1195,7 @@ diff -u -r1.117 -r1.136 $tableImageLabels{$imagename} =~ s/\n/
/g; print( STDERR "Applying image label: \"${label}\"\n" ) -@@ -4073,6 +4302,7 @@ +@@ -4073,6 +4271,7 @@ --[no]forcehtml Force HTML files to be generated (default off) --[no]forcemontage Force montage (default off) --[no]ignorefp Ignore directories with names like _vti (FrontPage directories) (default on) @@ -1228,7 +1203,7 @@ diff -u -r1.117 -r1.136 --[no]help Display usage message (default off) --[no]recurse Recurse directory tree (default off) --srcdir Image directory to process -@@ -4093,6 +4323,8 @@ +@@ -4093,6 +4292,8 @@ Filenames: --dirindexname Directory-name to title cross-reference file name --imgindexname Image-name to thumbnail label cross-reference file name @@ -1237,7 +1212,7 @@ diff -u -r1.117 -r1.136 --indexname Name of master index files (default server index) --pageindexname Base name of page-related index files --readme Name of directory info file -@@ -4138,6 +4370,7 @@ +@@ -4138,6 +4339,7 @@ HTML Colors & Appearance: --address Optional user address info @@ -1245,7 +1220,7 @@ diff -u -r1.117 -r1.136 --[no]anonymous Don't show WebMagick address and copyright info on pages (default off) --coloralink Link (active) color --colorback Background color (also applied to JPEG montage background) -@@ -4150,31 +4383,44 @@ +@@ -4150,31 +4352,44 @@ --dircolorlink Link (unvisited) color (directory frame) --dircolorvlink Link (visited) color (directory frame) --dirhtmlext Extension for directory frame @@ -1298,7 +1273,7 @@ diff -u -r1.117 -r1.136 --framestyle Frame style to use (out of those available) --[no]allowconfig Allow user to configure framestyle, columns and rows (requires javascript and tables) (default off) -@@ -4296,6 +4542,7 @@ +@@ -4296,6 +4511,7 @@ s/&/&/g; s/>/>/g; s/