You are here: Foswiki>Tasks Web>Item1587 (27 Jul 2017, MichaelDaum)Edit Attach

Item1587: INCLUDE and INCLUDINGTOPIC directives are handled in a wrong way

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: ImageGalleryPlugin
Branches:
Reported By: PhilippLeufke
Waiting For:
Last Change By: MichaelDaum

Description

INCLUDE

Including (INCLUDE{}) a topic which features an Image gallery and accessing the gallery by clicking on a thumbnail will push you to the included topic. This behavior is not transparent for the user since he doesn't even know (without viewing the raw view), that the image gallery originates from another topic.

INCLUDINGTOPIC

Imagine:
We want to have image galleries for many topics, featuring only the pictures of these very topics and we want the galleries to be modifiable by just editing one topic which is included into all other topics.

Lets say:
  • TopicA is the one which has images attached and which INCLUDEs...
  • ... TopicB, where the image gallery is defined

So TopicA looks like that:
[...]
%INCLUDE{TopicB}%
[...]
and TopicB contains:
%STARTINCLUDE%
---+++ Image Gallery
%IMAGEGALLERY{topic="%INCLUDINGTOPIC%"}%
%STOPINCLUDE%

This way, TopicA gets the nice thumbnail gallery of its own pictures. But: Clicking on a picture will -- like mentioned above -- kick you to the included topic TopicB, where of course the image you wanted to access can't be found.

Even more weird is:
If there is an image attached to the included topic TopicB, then this one will be shown in the thumbnail gallery of the INCLUDINGTOPIC TopicA rather than the images attached to the latter!

Nobody interested? Item1813 might be related...

-- PhilippLeufke - 08 Jul 2009

You probably have to set your own format and fiddle with $name and $(image|thumb|orig)url. Did you already tried this?

-- OliverKrueger - 08 Jul 2009

Just tried it.
  1. What's a little bit annoying: the ImageGalleryPlugin documentation seems to list the wrong default format; i.e. inserting the default format string <a href="$origurl"><img src="$imageurl" title="$comment" width="$width" height="$height"/></a> will not result in the look of the gallery which you get without using format. This needs to be fixed in the documentation. What is the real default string?
  2. With the suggested default format I didn't get the nice slideshow-like view when clicking a thumbnail. This view is accessed with URL parameters which are not adjustable by the user (or am I wrong?). So you will always be pushed to the included topic TopicB.

The more I fiddle around with this, I'm convinced that Item1813 is really related to this issue since both are addressing problems. What needs to be fixed in my eyes (but I'm not an expert) is:
  • the URL for clicking a thumbnail (you know: for accessing the slideshow view with the arrows left/right...) should always be the one of %TOPIC% (or %INCLUDINGTOPIC%) and not %BASETOPIC% (it's probably not coded like that, but the result is the same)
  • the topic="!Item1587" parameter is non-ambiguous in my eyes, it should be handled in the only possible correct way; including images to the gallery which are attached to %!BASETOPIC% is a bug
  • $imageurl and =$thumburl" should be robust against images with same filenames (compare Item 1813. Maybe adding the name of the original topic to the filename will help?!

-- PhilippLeufke - 09 Jul 2009

Bug confirmed. I'll work in it.

-- ItaloValcy - 03 May 2010

No actions the recent 7 years. Closing. ImageGalleryPlugin has changed a lot in the meantime anyway.

-- Main.MichaelDaum - 27 Jul 2017 - 11:46

ItemTemplate edit

Summary INCLUDE and INCLUDINGTOPIC directives are handled in a wrong way
ReportedBy PhilippLeufke
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component ImageGalleryPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r6 - 27 Jul 2017, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy