This question about Missing functionality: Answered

imageplugin type=thumbnail broken

The ImagePlugin type="thumb" is broken in version 2.6. It works in 2.41. The symptom is that if type="thumbnail" appears in the %IMAGE command, then the image doesn't show. This is visible on the foswiki site itself. See http://foswiki.org/Sandbox/ImagePluginTest and scroll down to "New Syntax for Images". There should be an image immediately under. Compare with my site: http://wiki.wedgeblade.net/bin/view/Sandbox/ImagePluginTest.

In this case the syntax for the broken request for an image is:
%IMAGE{"Westminstpalace.jpg" type="thumb" size="100" align="left" caption="The Palace of Westminster"}%

but in my experience anything with type="thumb" fails. I solved the problem by reverting to ImagePlugin version 2.41.

I noticed in the revision history that on 25 Jun 2012 there was a change related to thumbnails. Maybe that broke this feature. I reverted to a version before June 2012

-- TimWegner - 30 Dec 2012

I was able to fix this by editing the imageplugin.tmpl file with the following entries,
%TMPL:DEF{"image:thumb"}%<div %IF{"'$id'!=''" then="id='$id' "}%class='imageFrame imageFrame_$align $class' style='_width:$framewidthpx;max-width:$framewidthpx;$style'><a class='imageHref' title='$title' href='$href'><img src='$src' alt='$alt' width='$width' height='$height' $mousein $mouseout/></a>$thumbcaption</div>%TMPL:END%

%TMPL:DEF{"image:thumbcaption"}%<div class='imageCaption'> $magnifyFormat $caption </div>%TMPL:END%

And adding the following line to ImagePlugin/Core.pm in the handleImage subroutine,
  $result =~ s/\$thumbcaption/$this->getTemplate('thumbcaption')/ge;

This basically just mimics the behavior of the old ImagePlugin version (a thumb is just a frame with a caption and magnifying icon), but using the new template behavior in the current version.

Maybe somebody with access can patch the source in trunk?

-- ChrisHoefler - 10 Jan 2013

Thanks Chris! type=thumb is still broken in the latest plugin version 3.00 so apparently this change didn't make it in. (I had forgotten about my own issue and upgraded the plugin). I may try your fix, although for the moment just changing to type=frame seems fine. Just that the plugin has some documented options that don't work.

(Later) I just tried Chris's suggested fixes above, and image did indeed display, but the code "$magnifyFormat $caption" appeared in the bottom of the image frame.

-- TimWegner - 26 May 2013

This issue is still present in 3.30

I've opened a Task: http://foswiki.org/Tasks/Item12859

-- OliverSchaub - 16 Apr 2014

Fixed in 3.32.

-- MichaelDaum - 16 Apr 2014
 

QuestionForm edit

Subject Missing functionality
Extension ImagePlugin
Version Foswiki 1.1.6
Status Answered
Related Topics
Topic revision: r5 - 16 Apr 2014, MichaelDaum - This page was cached on 18 Jan 2018 - 23:04.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License