As
MartinCleaver pointed out on
TWikiIRC, the plugin doesn't respect permission settings for other webs and topics. this should be updated eventually (i thought the api would handle that). in the meantime, this is a warning for those concerned.
--
WillNorris - 31 Jul 2003
more details later, but I managed to get this working on cygwin:
- download and install binary version of image magick cygwin
- copy
libX11.dll and libX11ext.dll from another cygwin machine with XFree installed
- edit
ImageGalleryPlugin.pm and change all occurrences of $i->{path} to $i->{name}
there is an Image Galley bug, it tries to convert all attachments to thumbnails,not just images.
also found a twiki bug. If somebody uses > in the attach comment field it doesn't get turned into > when saved.
--
MattWilkie - 30 Jul 2003
thanks for trying this out on windows, matt
hmm, i guess i uploaded a slightly old version of this plugins (i developed it over a year ago and it's been on several machines). anyway, to fix the problem, i've added the following check:
%CODE{"perl"}%
next unless (my $dimensions = `"$IMAGE_MAGICK/identify" "$fn"`) =~
m/(\d+)x(\d+)\+(\d+)\+(\d+)/;
%ENDCODE%
and i've attached a new
ImageGalleryPlugin.pm to this page. i'm going to wait a few days before updating
ImageGalleryPlugin and see what else crops up (and hopefully improve on the documentation in the meantime)
also, i guess i don't understand the difference between path and name; should i be using name instead?
--
WillNorris - 31 Jul 2003
I tried out the update. I had to explicitly specify the path of
identify in the same manner as
convert (and set a corresponding preferences entry in the IG plugin topic). When I used the more general
$IMAGE_MAGICK/identify I got errors in the apache logfile:
identify: UnableToAccessConfigureFile (/twiki/.magick/magic.mgk)
A more generalised solution is probably be desired. E.g. set IM_HOME and use
$IM_HOME/bin/convert and
$IM_HOME/bin/identify.
The plugin always writes debug info regardless of the
Set DEBUG line in the plugin topic.
And a minor problem:
identify always writes error messages to the apache logfile when encountering non-image types (
identify: No decode delegate for this image format ). Not a big deal but it would be cleaner if it just silently ignored these (unless debugging is turned on).
And oh yes,
{name} instead of
{path} is necessary, at least with twiki-2003-jul-01. Path seems to be a record of the original file location on the users machine (e.g.
c:\images\tree.bmp )
--
MattWilkie - 31 Jul 2003
hopefully the new plugin that i've updated at
ImageGalleryPlugin addresses all of these issues except:
- not sure why
$IMAGE_MAGICK/identify didn't work (but i've updated the plugin to use the technique which worked)
- not sure what to do about identify's errors (i could do some sort of stderr redirection, but i'm not sure how that will play out on Windows)
additionally, i've change the default location from
/usr to
/usr/X11R6 (which might help out the Windows configuration, too). this new location reflects the setup required to run this program on
SourceForge. i've created symlinks on my system rather than have to edit the configuration from the default installed version.
--
WillNorris - 01 Aug 2003
FYI, I did some cosmetic formatting in the Plugins topic.
--
PeterThoeny - 02 Aug 2003
thanks, i'll be sure to grab the updated text from
ImageGalleryPlugin next time i do an update.
--
WillNorris - 02 Aug 2003
Any idea why i the gallery only pulls gifs, not jpeg's? i put Magick.pm in twiki/lib/Image/ though testenv doesn't see it installed in Image:Magick if that means anything...
--
BenjaminFleischer - 03 Oct 2003
What a great plugin!
--
MartinCleaver - 13 Oct 2003
I also can't get jpegs recognized - they simply don't show up as thumbnail. Is this meant to support GIFs only?
A seconds point: I find the alt text not very useful. Please see my suggestion in
AttachedImageDefaultAltText.
--
ArthurClemens - 13 Oct 2003
definitely not just gif support

however, it is "limited" to whatever you've installed for ImageMagick, which itself relies on many external libraries to do the grunt work of format conversions. for example, i even get previews of pdf files.
--
WillNorris - 17 Oct 2003
Jpegs work for me -
http://mbssrc.com/bin/view/Social/ChineseNationalDayCelebrationPhotos
(I suspect it depends on the version of Image::Magick you are using)
--
MartinCleaver - 13 Oct 2003
It'd be nice if there was an option to display images like this:
http://www.rotman.utoronto.ca/photogallery/shebiz/index.html
It has show-a-different-page on mouse rollover.
--
MartinCleaver - 17 Oct 2003
those features are nice. when i originally started writing this, i envisioned something more along the the lines of
LiveFrame, but never got around to it

and, i'm unlikely to have the time anytime soon.
--
WillNorris - 17 Oct 2003
someone commented (
on some page i can't find atm AttachedImageDefaultAltText ) on the fact that as implemented, the alt text for the thumbnail images isn't that useful.
i agree. originally, i tried using the comment and the file size,
but if the comment contained any
WikiWords or html, then the the html tags would prematurely close the alt tag, and mess up elements after it.
i'm not sure what the/a "correct" solution to the problem is, though; i don't know how to fix it. perhaps a %URIENCODE%-like function? (does something like this already exist?)
--
WillNorris - 17 Oct 2003
Hello, I also had problems with image formats that are not GIF's. I've tried JPEG's and PNG's, and both didn't work. So I tested calling ImageMagick's
identify by hand. And I've got the following:
terceiro@jedi:~$ identify /opt/TWiki/pub/TWiki/ImageGalleryPlugin/twikiwide.gif
/opt/TWiki/pub/TWiki/ImageGalleryPlugin/twikiwide.gif GIF 271x78+0+0 PseudoClass 256c 8-bit 5850b 0.0u 0:01
terceiro@jedi:~$ identify /opt/TWiki/pub/TWiki/ImageGalleryPlugin/dsc00011.jpg
/opt/TWiki/pub/TWiki/ImageGalleryPlugin/dsc00011.jpg JPEG 1216x912 DirectClass 8-bit 448kb 0.0u 0:01
Note that the dimensions are shown in different formats for GIF's and JPEG's (WxH+X+Y for GIF's, just WxH for JPEG's), at least on the version of ImageMagick I'm using, which is "Version: @(#)ImageMagick 5.4.4 04/05/02 Q:16
http://www.imagemagick.org"
.
I solved the problem by changing the regular expression that takes the image dimensions, . This is the patch for the modification on the lib/TWiki/Plugins/ImageGalleryPlugin.pm file :
90c90
< m/(\d+)x(\d+)\+(\d+)\+(\d+)/;
---
> m/(\d+)x(\d+)(\+(\d+))?(\+(\d+))?/;
I tested and it worked, both for JPEG's and PNG's. I guess it should work on other versions of ImageMagick, but I'm not sure.
--
AntonioTerceiro - 16 Dec 2003
I'm thinking it'd be neat to use this to build a mugshot gallery. i.e. to take the first image off everyone's home page (like
ExtensionToAttachUrlDirective) and build a clickable map of everyone registered on the wiki together with (e.g. their name / other details).
It would also need the ability to show a single picture vs. a standard "no picture" picture for use on someone's home topic (and to encourage them to upload one).
It would also need extension to the syntax:
- %IMAGEGALLERY{ web="Main" size="small" index=1 topic="User2, User2, User3"}% (this would work with a TWikiGroup embedded in topic)
and
- %IMAGEGALLERY{ web="Main" size="small"}% (this would look at all topics in the web)
New options:
- Index would indicate that you are only interested in the first topic
- Default would allocate default avatars to those without pictures
Of course, this could provide not only galleries of people, but of places etc, whatever is represented by that web.
--
MartinCleaver - 05 Mar 2004
Proposal
Change ImageGalleryPlugin.pm line 157 to:
$format =~ s/\$wikiusername/&TWiki::userToWikiName($img->{user})/geos;
--
KaiRedemann - 24 May 2004
That is an undocumented call and should not be used. There is an equivalent call in
FuncDotPm.
--
PeterThoeny - 25 May 2004
- The plugin topic is not in CVS
- If you have a zip file on the same page as the images, you get a fatal error. This is a fix:
$ diff -c ImageGalleryPlugin.pm~ ImageGalleryPlugin.pm
*** ImageGalleryPlugin.pm~ Sat Jan 31 07:04:49 2004
--- ImageGalleryPlugin.pm Wed Oct 27 14:21:51 2004
***************
*** 94,99 ****
--- 94,101 ----
my $fn = &TWiki::Func::getPubDir() . "/$web/$topic/$i->{name}";
my $thumb = &TWiki::Func::getPubDir() . "/$web/$topic/thumbs/$resize/$i->{name}";
+ next unless ($fn =~ m/jpg$|gif$|png$/i);
+
&TWiki::Func::writeDebug( Dumper( $i ) ) if $debug;
next unless (my $dimensions = `"$IDENTIFY" "$fn"`) =~
--
MartinCleaver - 27 Oct 2004
I've attached two js files detailed at the bottom of
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_21097469.html
They give the effect of:
Hopefully someone (maybe me

) can find a way to incorporate them.
--
MartinCleaver - 28 Oct 2004
I had the need to limit the number of images shown by
ImageGalleryPlugin. I had to show the first image attached to a topic as it's "visual caption" (in this case, each topic is a news article) in a list of topics generated by a
%SEARCH%.
I achieved this ny adding a "max" attribute, which tells the maximum number of
images to be displayed in the image gallery. It's very usefull in situations
like mine.
The changes made to the plugin are in
this patch.
--
AntonioTerceiro - 23 Jan 2005
Hi Will,
here's my botch on this plugin. My changes include:
- render 4 images in a row only
- show navigation prev, next, back; clicking on the image will advance to the next image
- red dots at the end of the image title are links to manage the image attachment
- added document relations first, prev, next, last, up/parent (try mozilla to get the menus)
- restructured plugin to make it more efficient, i.e. only init plugin if a topic actually needs it (tm).
- fixed mod-perl issue during module initialization
- added latest security patches
Hope you like it. See
this
demo.
--
MichaelDaum - 11 Mar 2005
Any update on a new release of this plugin? Its one of my favourites but
Google:ImageGalleryPlugin
first page only lists its vulnerabilities
--
MartinCleaver - 16 Mar 2005
Very impresive work Michael. But could you change the code to be fully
Func.pm conformant.
That is, change things like
TWiki::extractNameValuePair() to be
TWiki::Func::extractNameValuePair()
Thanks.
--
AntonAylward - 16 Mar 2005
Attached a fixed version. So now it uses Func.pm as much as possible.... Oops I've over-attached
the
ImageGalleryPlugin.pm file from
WillNorris. Someone still need that old version?
--
MichaelDaum - 16 Mar 2005
Michael - would you care to take over the official release of this package? Will seems to like your changes and this package seems a natural fit for you.
--
MartinCleaver - 24 Mar 2005
Ok. I do it. (\me loves IGP)
--
MichaelDaum - 04 Apr 2005
I tried running Micha's version on a Cairo release server. It installed but crashed when trying to display. Has anyone got a working version?
--
MartinCleaver - 11 Apr 2005
Hi all, please don't report any errors on the previous IGP that I sent over. A new one will follow very soon.
--
MichaelDaum - 12 Apr 2005
Here is the first pre-release. Can someone test, please?
--
MichaelDaum - 27 Apr 2005
Does it need Dakar or
TWikiRelease23Feb2005 or will it work with the standard insecure
CairoRelease?
--
MartinCleaver - 28 Apr 2005
I ask because I still get Undefined subroutine &TWiki::normalizeFileName called
--
MartinCleaver - 28 Apr 2005
So you still haven't security-patched your Cairo? Well, there should be a maintenance release
of Cairo including the &TWiki::normalizeFileName stuff....
Anyway, the IGP tries to do its best to
work with a security-enhanced Cairo and with Dakar using the following wrapper:
sub normalizeFileName {
my ($this, $fileName) = @_;
if ($this->{isDakar}) {
return &TWiki::Sandbox::normalizeFileName($fileName);
} else {
return &TWiki::normalizeFileName($fileName);
}
}
I will not check for a non-existing &TWiki::normalizeFileName.
So the answer is: no, the new IGP will not work with an insecure Cairo.
--
MichaelDaum - 28 Apr 2005
A few notes for installation on Cairo 02September2004 + patch
UncoordinatedSecurityAlert23Feb2005):
- the plugin is using $mimeTypesFilename from TWiki.cfg (the version I was using, did not): make sure it points to a valid file or no attachment is recognised as image.
- Upper case JPG is not in the mime.types that comes with apache2 (SuSE 9.2) : the plugin did not recognise the *.JPG files as "pictures" , I had to add JPG in mime.types file (perhaps the regex could be changed ? )
- "Illegal division by zero at /var/srv/www/twiki/lib/TWiki/Plugins/ImageGalleryPlugin/Core.pm line 537" when referencing a non existent topic
(%IMAGEGALLERY{topic="NotExistingTopic"}%. (was the case with the ImageGalleryPlugin.txt that comes with the plugin). (well the topic existed but the attachments in pub where missing! 01 May 2005)
- once the thumbnails are created it is no more possible to change their size (I had to delete them in the igp folder before thumbnails with a different size were created).
--
MarcelTrap - 30 Apr 2005
Marcel, thanks for your notes. I've uploaded a
second pre-release which fixes the resizing and the uppercase suffix problem. However why don't you have a mimetypes file. This should be considered an installation problem, isn't it.
I can't reproduce the division by zero any more either. Yes, the IGP comes with no example images because your TWiki has enough of them. The IGP is trying to generate a gallery from
TWikiLogos which should be present by default aswell. Could you please report on
any problems with the second release?
--
MichaelDaum - 03 May 2005
Uh, the next release will check for view permissions on the topic where the
images are comming from.
--
MichaelDaum - 03 May 2005
You are right Michael, the mime.types and the zero divide were do to my bad (manual) TWiki upgrade, but
ImageGalleryPlugin was fine until I upgraded it too. It started reporting "no images found at ..." while plenty of *.JPG file were attached. I looked the code to find out that it checked $mimetypefilename from TWiki.cfg ....
I did not copy over the new folder /pub/TWiki to the old version ... so no folder /pub/TWiki/TWikiLogos -> "zero divide" when viewing TWiki/ImageGalleryPlugin. My bad installation, only that an error ¨file pub/TWikiLogos not found" would have made it easier to fix.
Your new version works fine for me, can even view the images at different size in the same topic! Thank you.
--
MarcelTrap - 04 May 2005
Michael - can this version be used to aggregate pictures from multiple topics? I want to pick up all pictures in a web (such as Main/People) where the topic is of the type
UserForm.
--
MartinCleaver - 06 May 2005
Not yet
--
MichaelDaum - 06 May 2005
small errors in Core.pm
- line 154 pos 66 should be "maxwidth" not "maxheight"
- line 633 - does never get rendered as on line 615 $n get replaced by \n (perhaps should the \n be a BR/ ?)
- line 637 $thumurl does not get rendered: double quote to be removed
--
MarcelTrap - 07 May 2005
Here's the third pre-release that includes
- the fixes for the bugs MarcelTrap reported
- support for multiple topics as proposed by MartinCleaver: pictures can be collected from a list of topics now
- a new tag %NRIMAGES{"topic1, topic2, ..., topicn"}% that returns the number of images attached to the listed topics
--
MichaelDaum - 09 May 2005
... and
another pre-release fixing the IGP when called
with malicious arguments from within the rename view.
--
MichaelDaum - 09 May 2005
Great work. Michael.
A couple of bits of feedback:
Quite separately, it occurred to me that we would benefit from a TOPICLIST{category=UserForm, web=People} directive to avoid the need for an ugly search or special functionality in plugins such as IGP; Micha was quite right to not implement that here.
--
MartinCleaver - 10 May 2005
One more thing. Clicking on a image produced from a topics list takes to page such as
http://wiki.conceptmapping.org/view/Sandbox/UserListByPicture?id=1&filename=MartinAtMBS.JPG#igp1
- navigation between the pictures then does not work.
--
MartinCleaver - 10 May 2005
Martin, thanks for your testcases.
(a) Well, the format parameter in
http://wiki.conceptmapping.org/Sandbox/UserListByPicture
is working: it says format="$topic" and
produces a MartinCleaver on the first photo (an empty chair?). This is correct as MartinCleaver is the topic this photo is attached to.
* But it said $topic - which would have meant "MartinCleaver" and "AlbertoCanas" should have been written under the photos rather than IMG_XXXX as presently. To prove it, see
http://wiki.conceptmapping.org/view/Sandbox/UserListByPicture?raw=on
now; it does not say "ignored" under each photo.
(b) needs a fix: make the
id variable in
commonTagsHander() global in order to propagate
information btw two independent calls to
handleCommonTags() .
* Thanks for that
(c) don't understand the navigation-does-not-work issue. Can you elaborate, please.
1 Start at
http://wiki.conceptmapping.org/Sandbox/UserListByPicture
2 Click any picture (e.g. Martin At MBS)
3 There is now no picture (but interestingly enough, with preview 5 it shows the "is ignored" text)
Btw. you should disable directory indexing on your pub url ("security" by obscurity

)
* Thanks.
--
MichaelDaum - 10 May 2005
Here's a fifth pre-release that
- fixes (b)
- captures ImageMagick error messages
- doesn't trust attachment info - checks for attachment existence aswell (fixes the division by zero testcase reported above)
- adds a refresh query parameter to recompute images in the IGP cache
--
MichaelDaum - 10 May 2005
Michael, there is a warning on an undefined value on
ImageGalleryPlugin/Core.pm, line 198.
I've stopped it with this (ridiculous) patch:
--- /home/terceiro/ImageGalleryPlugin/lib/TWiki/Plugins/ImageGalleryPlugin/Core.pm 2005-05-10 06:03:52.000000000 -0300
+++ Core.pm 2005-05-12 10:07:08.400567893 -0300
@@ -194,7 +194,7 @@
$this->{doThumbTitles} = $this->{doTitles};
}
- my $refresh = $this->{query}->param("refresh");
+ my $refresh = ($this->{query}->param("refresh") or "");
$this->{doRefresh} = ($refresh eq 'on')?1:0;
return 1;
I've tested the last (fifth) pre-release that you posted.
--
AntonioTerceiro - 12 May 2005
Thanks for your patch. I will add it to the next release.
--
MichaelDaum - 12 May 2005
Hi Michael. Thanks for the re-release. I've interspersed my comments above.
--
MartinCleaver - 13 May 2005
Incidently, I think (c) in the above is just a nice to have; a reasonable starting place might be to disable to cursoring between pictures gathered from multiple topics.
Hm, disabling navigating between pictures? How about putting them into separate IMAGEALLERY tags
then... not sure if I understand (c).
-- MichaelDaum - 24 May 2005
--
MartinCleaver - 23 May 2005
Hi Martin. Try
%IMAGEGALLERY{
title="is ignored $date"
topics="People.MartinCleaver,People.AlbertoCanas" size="large"
}%
to get a custom title under the photos. The
format parameter is for formatting the image
itself which defaults to something sensible. The
title /
thumbtitle parameter customizes the title
under the photo / thumbnail.
--
MichaelDaum - 24 May 2005
Wow, fantastic! It all works, even (c). Thanks Micha - it was thumbtitle that I missed.
--
MartinCleaver - 24 May 2005
http://wiki.conceptmapping.org/People/UserListByPhotograph
has the result - you can click on the names to navigate to the person's home page or click on the pictures to see them in sequence.
--
MartinCleaver - 24 May 2005
At some point I plan to add the ability to:
- Pick the first n pictures from any given topic
- Show a template "no picture" picture for people topics without a photo.
- Use the CSS file (missing in the distro?) to hide the implicit IMAGEGALLERY tag I added into the template in the event that the topic with the tag is not actually a person - I guess I want the Template to be picked according to Form used.
--
MartinCleaver - 24 May 2005
Hey, looks great. What about an
images parameter to specify a set of image urls. That would
be more general and solve (1) also. A
SEARCH with some
$formfield(avatar) format would
complete your application. Note, that right now each image attached to a homepage at your
site will end up in the UserListByPicture. So there will be only one photo for
AlbertoCanas.
Anyway, if there are no other issues I will make an official IGP release within the next days.
--
MichaelDaum - 24 May 2005
I do think IGP is ready for release. Good work!
--
MartinCleaver - 25 May 2005
On the images parameter idea, yes, that would be generally useful but it feels wrong to give absolute URLs. I suspect a parameter to pick up the first image from each topic is a simpler solution that would solve the same problem.
Is putting the image into formfield adding a layer of complexity? How would a photo attached by an end user get into that specific field?
--
MartinCleaver - 25 May 2005
Writing urls for a specifiy attachment of a topic is arkward in TWiki right now. Maybe I write some
FeatureRequest to propose a syntax for that.
Hm, "Picking the first n images" vs "list of image urls" ... both sound reasonable features.
See, taking the first image will solve
your application in a way, but the means should be
usefull in a broader sense. Be aware that noone can rearrange the order of attachments to
switch to another photo. Simply entering a full url might be to inconvenient also but is
the most general solution.
How to insert the url into the formfield ... well, create a link,
copy paste it into the UserForm field. That's how other sites do it ... more or less.
--
MichaelDaum - 25 May 2005
new release today
--
MichaelDaum - 15 Jun 2005
Michael, I've already done the "n images" thing, for the previous IGP's architecture,
with
thi patch. Hope this helps, it shouldn't
be that hard to adapt do the new architecture.
--
AntonioTerceiro - 15 Jun 2005
Michael, I've problem follow that,
Undefined subroutine &TWiki::normalizeFileName called at ../lib/TWiki/Plugins/ImageGalleryPlugin/Core.pm line 802.
--
SupattraJaikong - 17 Jun 2005
You need to have a look at the security patches from
TWiki:Codev/UncoordinatedSecurityAlert23Feb2005
. see my comments
above. Sorry, Supattra, that there's no maintenance release
of cairo (the current stable release of TWiki), that already includes these patches.
--
MichaelDaum - 17 Jun 2005
Ok, there's a new version of the IGP that gracefully degrates to non-security if you don't have the patches mentioned above in place. Synced this version with the one in SVN repository.
--
MichaelDaum - 14 Sep 2005
On Safari, when you hover the mouse over the images block all texts become invisible (the red dots remain).
--
ArthurClemens - 02 Oct 2005
Would it be possible to generate a xml view with all image urls listed? I am looking for a CMS for Flash, and no wiki or CMS can give me what I want: just a simple list of images in plain text or XML.
--
ArthurClemens - 02 Oct 2005
I see the page is hard coded in Core.pm. Any chance you could make templates out of this?
Also: where are thumbnails stored? Or are they always created on the fly?
--
ArthurClemens - 02 Oct 2005
Has anyone seen an
UnableToOpenBlob error:
I get this for the
TWikiLogos example:
Error: Exception 435: UnableToOpenBlob? `/www/wiki/pub/TWiki/ImageGalleryPlugin/igp1/thumb_twikiRobot121x54.gif': No such file or directory
very confusing error message
--
NathanStrange - 02 Nov 2005
Nathan, this is an error message of the Image::Magick perl module. Which version are you using?
--
MichaelDaum - 02 Nov 2005
Hi, I have tried with small jpg. It works. However, when I use big jpg such as family photo from digital camera. It fails. Any one could help?
--
BenChoi - 14 Nov 2005
You'd have to be more explicit. How big was the file? In what format? Can you attach it here? What was the error message?
--
MartinCleaver - 14 Nov 2005
Is anyone seeing any problems on RHES4 with
ImageGallery Plugin on Dakar? I'm seeing the following in my Apache logs.
[Sun Dec 04 22:41:24 2005] [error] [client 192.168.37.219] [Sun Dec 4 22:41:24 2005] view: Deep recursion on subroutine "Image::Magick::AUTOLOAD" at /usr/lib/perl5/site_pe rl/5.8.5/i386-linux-thread-multi/Image/Magick.pm line 42., referer:
http://www.panicfr
iends.net/twiki/bin/view/TWiki/TWikiPreferences
any suggestions or pointers?
--
ToddGrayson - 08 Dec 2005
Hi there, I've just commited that old patch for adding a limit for the number ofimages displayed. This time I named the parameter
limit to be consistent with, for instace,
%SEARCH{...}%
--
AntonioTerceiro - 18 Jan 2006
Thanks, Antonio. I will release a new version including your patch on twiki.org asap.
--
MichaelDaum - 18 Jan 2006
With the option to let TWiki automatically add files that are present in the attachment directory as attachments (and creating a new META entry for each), the
igp1 directory becomes a visible attachment/link on the page.
Is it somehow posible, to add the
igp1 directory with enabled hidden flag before TWiki detects it and add it automatically
without hidden flag.
--
TobiasRoeser - 15 Feb 2006
Oh, certainly. And I tought I did that already. Here's a quick one-char-patch. But I make
a proper release with that fix included asap.
--- twikiplugins/ImageGalleryPlugin/lib/TWiki/Plugins/ImageGalleryPlugin/Core.pm
+++ lib/TWiki/Plugins/ImageGalleryPlugin/Core.pm
@@ -65,11 +65,11 @@
mkdir $topicPubDir unless -d $topicPubDir;
if ($this->{id}) {
- $this->{igpDir} = $this->normalizeFileName("$topicPubDir/igp$this->{id}");
+ $this->{igpDir} = $this->normalizeFileName("$topicPubDir/_igp$this->{id}");
mkdir $this->{igpDir} unless -d $this->{igpDir};
$this->{igpPubUrl} = &TWiki::Func::getPubUrlPath() .
- "/$this->{web}/$this->{topic}/igp$this->{id}";
+ "/$this->{web}/$this->{topic}/_igp$this->{id}";
$this->{infoFile} = $this->normalizeFileName("$this->{igpDir}/info.txt");
}
Background: any file starting with an underscore (_) in the pub directory will be ignored by
the auth-attach mechanism...an undocumented feature I know...but hey.
--
MichaelDaum - 15 Feb 2006
Thanks for the quick response. You documented this feature with your last post already.
--
TobiasRoeser - 15 Feb 2006
Michael, there is a second position in Core.pm, where you have to change the path!
Could you please have a look at:
https://lepetitfou.dyndns.org/kthinkbat
? The third image should have and has (when clicked for enlargement) its original size, but it looks somewhat blurred. Is this normal? I set the maxheight and maxwidth to 1000, because I don't whant any size reduction. Maybe the plugin should avoid resizing if not nessesary?
--
TobiasRoeser - 15 Feb 2006
Oh, yeah. Adjusted the above patch. But on your page the comma is wrong:
%IMAGEGALLERY{maxheight="1000"
,maxwidth="1000"}% Replace the comma with a space and
everything is fine (No bluring).
--
MichaelDaum - 16 Feb 2006
Thanks for your first class support.
ImageGalleryPlugin is really great.
--
TobiasRoeser - 16 Feb 2006
Feature Request: A Filter option would we very useful, especially for large galleries or if you have to import only some images of another gallery. The filter could be a regex or maybe a range of image numbers (these numbers in the image comment).
What do you think about? How easy/difficult would it be to implement this?
--
TobiasRoeser - 18 Feb 2006
Another feature request: provide a more user friendly interface for (re)labelling the images (editing the comment entry of each individual attachment via the standard interface is ... enduring

).
Maybe this can be combined with the previous feature request by specifying a special classification (wiki)word as comment (ala mark all images by entering the prefix '
!InUse: ' to the comment field of the attachment, resp. introduce a concept of GalleryNames)
--
FranzJosefSilli - 18 Feb 2006
Implemented
include /
exclude arguments in version v3.3 . This can be used to add
tags in comments to match different subsets of images attached to the same topic.
Does that work out?
--
MichaelDaum - 20 Feb 2006
Wow, this was fast. Thanks.
What happens, if I select more than one topic and use include/exclude at the same time? Will it be assigned to all topics images? will have to give it a try as soon I have time for it, so maybe tomorrow.
--
TobiasRoeser - 20 Feb 2006
Very nice Plugin! I found that certain image names get ignored. Example: rc11si350.mwlib.jpg is ignored while rc11si350_mwlib.jpg appears correctly. If someone knows a quick fix to this it would be appreciated. Thanks.
--
ChuckSolie - 28 Feb 2006
when in normal view mode, the height is 0, anybody knows why?
but thumbnail mode is ok
--
XieXiaopu - 11 Apr 2006
Hm, what could be the reason I can't click through my Gallery using this Plugin on a PatternSkin based install using a twiki-vm (TWikiVMDebian) under Windows?
Anyway, I have a feature idea: Can this Plugin be enhanced by a calendar like in flickr?
--
FranzJosefSilli - 25 Apr 2006
Sorry to ask again, has anyone ever run into the problem where
ImageMagick fails after you load the plugin, complaining about
view: Deep recursion on subroutine "Image::Magick::AUTOLOAD" at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/Image/Magick.pm line 42.
I have been trying to get this working for quite a while now on RHES.
ImageMagick is working as an X applicaiton on the system... are there path dependancies for the plugin/twiki installaiton? Any tips from anyone who has had to troubleshoot this plugin?
--
ToddGrayson - 03 May 2006
Hi Todd, I having same problem, I think. I unzip the files, configure the plugin, then when I try to load the
ImageGalleryPlugin page, it hangs forever and seems to take up all resources of server. An error in the webserver log:
[Wed May 17 15:06:43 2006] [error] [client 130.88.197.231] [Wed May 17 15:06:43
2006] view: Deep recursion on subroutine "Image::Magick::AUTOLOAD" at /usr/lib/p
erl5/5.8.5/Image/Magick.pm line 42.
exactly as you got.
I am currently checking to see if a) my version of
ImageMagick 6.2.6 is working b) my
PerlMagic is the right version for that version of
ImageMagick c) The
ImageMagick is really calling
ImageMagick6.2.6. Any advice would be great.
--
HelenHulme - 17 May 2006
Hi, I don't know if it's me or what, but I'm really having problems in configuring the plugin. I always see the following error:
Can't locate TWiki/Plugins/ImageGalleryPlugin/Core.pm in
@INC
(
@INC
contains: /home/httpd/twiki/lib/CPAN/lib//arch/ /home/httpd/twiki/lib/CPAN/lib//5.8.6/i586-linux-thread-multi/ /home/httpd/twiki/lib/CPAN/lib//5.8.6/ /home/httpd/twiki/lib/CPAN/lib// /home/httpd/twiki/lib . /usr/lib/perl5/5.8.6/i586-linux-thread-multi /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl) at (eval 56) line 1.
at (eval 56) line 1
Can anyone help me please?
--
SulmanIqbal - 22 May 2006
Helen - I'm all the way up to Image::Magick 6.2.7 trying to "fix" this. I started a thread on the
ImageMagick site. The author would like a "thread dump" of the process... which I'm working my way through documentation to try to produce... Any TWiki-tech god input on getting a "thread dump" from the Magic.pm when its invoked... strace the pid?? Some magic switch in the script?? Some apache debug switch to dump mem of cgi calls? Any TWiki debugging feedback would be great.
SulmanIgbal... If you are not installing as root, it might be necessary to configure based upon the non root user's perl environments, etc. using the
@localPerlLibPath
in the twiki/bin/LocalLib.cfg file...
--
ToddGrayson - 23 May 2006
It's working...I changed some permissions on the installed files and now it's working fine. Thanks for your support!
--
SulmanIqbal - 23 May 2006
So. On RHES 4 update 3, using APache 2.2, with image::magick 6.2.7. After enabling the plugin and attempting to connect to the "ImageGalleryPlugin" page, CPU spins up to 90+% VIEW is the process that is spinning up the CPU.. Is there a way to debug the call to VIEW, and the subsquent call from VIEW to MAGIC.PM, which invariably is where the apache error log points to the deep recursion and throws the error messages above.
Will
CPAN debugging help in this? Any tips from plugin developers?
--
ToddGrayson - 25 May 2006
In general I put in print STDERR commands and see what's in the logs afterwards. Hm, this deep recursion bug is strange. I am not able to reproduce it with image::magick 6.2.4 and a lot of releases before.
Maybe this is related to a specific image file or image type.
--
MichaelDaum - 25 May 2006
SulmanIqbal , I have same problem with this plugin, I have installed eevryting with root access including
CPAN module. What permissions did you change?
--
GauravSharma - 25 May 2006
Perhaps you might consider updating the plugin to comply with
PluginsApiPolicies as well as continuing to support Cairo? This will help to ensure that the plugin will continue to work in future versions with little or no changes.
--
MeredithLesly - 15 Jun 2006
In regards to the original post, "this plugin also needs to be updated so as not to directly read and write into the /pub directory. I hope Micha updates this so that there's a Dakar- (and post-Dakar) compliant version". I disagree. As long as this Plugin is designed to work on Cairo and Dakar (which is a
good thing), it is better to follow the
recommended storage of Plugin data defined for Cairo. This also works fine on TWiki 4, but does not strictly follow the redefined rules.
- It's best to use the Cairo storage recommendation for code intended to work with Cairo and the Dakar storage recommendation for code intended to work with Dakar. That way the plugin is far more likely to work in future versions of TWiki without changes, which I assume is a goal that everyone shares. -- MeredithLesly - 16 Jun 2006
I am not sure what kind of performance impact there is if the new policy is applied. The image::magick creates a file. This file needs to be created in a temp place (Plugin workarea), then attached to TWiki with the official API. The overhead needs to be evaluated.
--
PeterThoeny - 15 Jun 2006
I totally agree that the pressing problems come first. I'm very sorry if I sounded like I didn't care about them, or put the API policies first (which I do think I did

).
I guess I posted this
now, as opposed to a time when it would have been more appropriate (i.e., when there weren't serious and perplexing problems going on), because I was accused of singling out
TagMePlugin for not complying. I'm not saying this to justify my timing, merely to explain my reasons.
I wish I had time to help you now, but I'm on a tight deadline. Once I have time, if there are still problems (and I can reproduce them), I'll be glad to try and help.
Mea culpa.
--
MeredithLesly - 16 Jun 2006
Archived content from
ImageGalleryPluginDev.
--
MichaelDaum - 16 Jun 2006