From 3bd439fa03c13f19e7305b82fff23779e303154d Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 15 Jul 2007 19:00:07 +0000 Subject: * In img tag, allow link=no to disable link to full size image. Thanks, Nis Martensen. Closes: #433188 --- IkiWiki/Plugin/img.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/img.pm') diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index a453a49ba..c4e4a6f22 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -96,12 +96,19 @@ sub preprocess (@) { #{{{ return "[[img ".sprintf(gettext("failed to determine size of image %s"), $file)."]]"; } - return ''.$alt.''; + ' />'; + + if (! defined $params{link} || lc($params{link}) eq 'yes') { + return ''.$imgtag.''; + } + else { + return $imgtag; + } } #}}} 1 -- cgit v1.2.3