my $size = $params{size} || $imgdefaults{$params{page}}->{size} || 'full';
my $alt = $params{alt} || $imgdefaults{$params{page}}->{alt} || '';
my $title = $params{title} || $imgdefaults{$params{page}}->{title} || '';
+ my $caption = $params{caption} || $imgdefaults{$params{page}}->{caption} || '';
if ($image eq 'defaults') {
$imgdefaults{$params{page}} = {
size => $size,
alt => $alt,
title => $title,
+ caption => $caption,
};
return '';
}
' />';
if (! defined $params{link} || lc($params{link}) eq 'yes') {
- return '<a href="'.$fileurl.'">'.$imgtag.'</a>';
+ $imgtag='<a href="'.$fileurl.'">'.$imgtag.'</a>';
}
elsif ($params{link} =~ /^\w+:\/\//) {
- return '<a href="'.$params{link}.'">'.$imgtag.'</a>';
+ $imgtag='<a href="'.$params{link}.'">'.$imgtag.'</a>';
}
elsif (length bestlink($params{page}, $params{link})) {
add_depends($params{page}, $params{link});
- return htmllink($params{page}, $params{destpage},
+ $imgtag=htmllink($params{page}, $params{destpage},
$params{link}, linktext => $imgtag,
noimageinline => 1);
}
+
+ if (defined $caption) {
+ return '<table class="img">'.
+ '<caption>'.$caption.'</caption>'.
+ '<tr><td>'.$imgtag.'</td></tr>'.
+ '</table>';
+ }
else {
return $imgtag;
}
making the image smaller than the specified size.
You can also pass `alt`, `title`, `class` and `id` parameters. These are
-passed through unchanged to the html img tag.
+passed through unchanged to the html img tag. If you include a `caption`
+parameter, the caption will be displayed centered beneath the image.
The `link` parameter is used to control whether the scaled down image links
to the full size version. By default it does; set "link=somepage" to link
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-04 14:36-0400\n"
+"POT-Creation-Date: 2008-06-07 23:12-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "deleting bucket.."
msgstr ""
-#: ../IkiWiki/Plugin/amazon_s3.pm:37 ../IkiWiki/Setup/Standard.pm:86
+#: ../IkiWiki/Plugin/amazon_s3.pm:37 ../IkiWiki/Setup/Standard.pm:89
msgid "done"
msgstr ""
msgid "prog not a valid graphviz program"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:55
+#: ../IkiWiki/Plugin/img.pm:57
#, perl-format
msgid "bad size \"%s\""
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:65 ../IkiWiki/Plugin/img.pm:69
-#: ../IkiWiki/Plugin/img.pm:86
+#: ../IkiWiki/Plugin/img.pm:67 ../IkiWiki/Plugin/img.pm:71
+#: ../IkiWiki/Plugin/img.pm:88
#, perl-format
msgid "failed to read %s: %s"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:72
+#: ../IkiWiki/Plugin/img.pm:74
#, perl-format
msgid "failed to resize: %s"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:103
+#: ../IkiWiki/Plugin/img.pm:105
#, perl-format
msgid "failed to determine size of image %s"
msgstr ""
msgid "at noon on %A"
msgstr ""
-#: ../IkiWiki/Plugin/recentchanges.pm:82
+#: ../IkiWiki/Plugin/recentchanges.pm:76
msgid "missing page"
msgstr ""
-#: ../IkiWiki/Plugin/recentchanges.pm:84
+#: ../IkiWiki/Plugin/recentchanges.pm:78
#, perl-format
msgid "The page %s does not exist."
msgstr ""
msgid "Must specify %s when using the search plugin"
msgstr ""
-#: ../IkiWiki/Plugin/search.pm:33
+#: ../IkiWiki/Plugin/search.pm:164
+#, perl-format
+msgid "need Digest::SHA1 to index %s"
+msgstr ""
+
+#: ../IkiWiki/Plugin/search.pm:197
msgid "search"
msgstr ""
msgid "generating wrappers.."
msgstr ""
-#: ../IkiWiki/Setup/Standard.pm:76
+#: ../IkiWiki/Setup/Standard.pm:79
msgid "rebuilding wiki.."
msgstr ""
-#: ../IkiWiki/Setup/Standard.pm:79
+#: ../IkiWiki/Setup/Standard.pm:82
msgid "refreshing wiki.."
msgstr ""