Very simple caption addition code, using a file called "captions.txt" in the photos directory.
git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--0.9.2--patch-9
function bpgallery_default_thumbsline() {
cat << END
function bpgallery_default_thumbsline() {
cat << END
-<div class="thumbnail"><a href="$filename"><img src="icons/$filename" /></a></div>
+<div class="thumbnail"><a href="$filename"><img src="icons/$filename" /></a><div class="caption">$caption</div></div>
background: white;
color: black;
font-family: sans-serif;
background: white;
color: black;
font-family: sans-serif;
height: ${MAXHEIGHT}px;
}
height: ${MAXHEIGHT}px;
}
+div.caption {
+ width: 100%;
+ text-align: center;
+ font-weight: bold;
+}
+
+if [[ -z $GREPCOMMAND ]]; then
+ GREPCOMMAND=grep
+fi
+
if [[ -z $WIDTH ]]; then
WIDTH=100
fi
if [[ -z $WIDTH ]]; then
WIDTH=100
fi
$BPGALLERY_HEAD_FUNCTION > index.html
$BPGALLERY_HEAD_FUNCTION > index.html
-$FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 --replace $ECHOCOMMAND {} |$SORTCOMMAND -g | while read filename; do filename=${filename#./}; $BPGALLERY_THUMBSLINE_FUNCTION; done >> index.html
+$FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 --replace $ECHOCOMMAND {} |$SORTCOMMAND -g | while read filename; do filename=${filename#./}; caption=$($GREPCOMMAND -E "^$filename " captions.txt); caption=${caption#* }; $BPGALLERY_THUMBSLINE_FUNCTION; done >> index.html
$BPGALLERY_TAIL_FUNCTION >> index.html
$BPGALLERY_TAIL_FUNCTION >> index.html