Nis Martensen. Closes: #433188
return "[[img ".sprintf(gettext("failed to determine size of image %s"), $file)."]]";
}
return "[[img ".sprintf(gettext("failed to determine size of image %s"), $file)."]]";
}
- return '<a href="'.$fileurl.'"><img src="'.$imgurl.
+ my $imgtag='<img src="'.$imgurl.
'" alt="'.$alt.'" width="'.$im->Get("width").
'" height="'.$im->Get("height").'"'.
(exists $params{class} ? ' class="'.$params{class}.'"' : '').
(exists $params{id} ? ' id="'.$params{id}.'"' : '').
'" alt="'.$alt.'" width="'.$im->Get("width").
'" height="'.$im->Get("height").'"'.
(exists $params{class} ? ' class="'.$params{class}.'"' : '').
(exists $params{id} ? ' id="'.$params{id}.'"' : '').
+ ' />';
+
+ if (! defined $params{link} || lc($params{link}) eq 'yes') {
+ return '<a href="'.$fileurl.'">'.$imgtag.'</a>';
+ }
+ else {
+ return $imgtag;
+ }
* Use type= not style= in html for alternate stylesheets, which is more
correct (but in my testing both epiphany and iceweasel work ok with
style=text/css).
* Use type= not style= in html for alternate stylesheets, which is more
correct (but in my testing both epiphany and iceweasel work ok with
style=text/css).
+ * In img tag, allow link=no to disable link to full size image. Thanks,
+ Nis Martensen. Closes: #433188
- -- Joey Hess <joeyh@debian.org> Fri, 13 Jul 2007 16:28:47 -0400
+ -- Joey Hess <joeyh@debian.org> Sun, 15 Jul 2007 14:59:23 -0400
ikiwiki (2.3) unstable; urgency=low
ikiwiki (2.3) unstable; urgency=low
You can also pass `alt`, `class` and `id` parameters. These are passed through
unchanged to the html img tag.
You can also pass `alt`, `class` and `id` parameters. These are passed through
unchanged to the html img tag.
+The `link` parameter is used to control whether the scaled down image links
+to the full size version. By default it does; set "link=no" to disable
+this.
+
You can also set default values that will be applied to all later images on
the page, unless overridden. Useful when including many images on a page.
You can also set default values that will be applied to all later images on
the page, unless overridden. Useful when including many images on a page.