Exhibit and Thickbox: Gallery via ref does not work

43 views
Skip to first unread message

stefan....@googlemail.com

unread,
Jun 5, 2009, 11:09:18 AM6/5/09
to SIMILE Widgets
Hi everyone,

I am setting up a students' "repository" (some space where students
can present their work which was made during a course/semester) for
the human-computer interaction group at my university. And I am doing
this with exhibit 2.1 which turns out pretty neat. But I have one
minor issue:

I cannot get the ThickBox 3.1 GALLERY IMAGES to work. However, I am
able to display a single image in a ThickBox. What I can't do is
switch to another image. One therefore had to close the current image
and manually select the next one.

This is how I did it (in the lens of the viewPanel, that is, the
bubble configuration):

<div>
<span ex:if-exists=".uri_img1"><a ex:href-content=".uri_img1"
class="thickbox" ex:ref-content=".id" onclick="return showThickbox
(this);>
<img ex:src-content=".uri_img1" width="60"/></a></span>
<span ex:if-exists=".uri_img2"><a ex:href-content=".uri_img2"
class="thickbox" ex:ref-content=".id" onclick="return showThickbox
(this);>
<img ex:src-content=".uri_img2" width="60"/></a></span>
<span ex:if-exists=".uri_img3"><a ex:href-content=".uri_img3"
class="thickbox" ex:ref-content=".id" onclick="return showThickbox
(this);>
<img ex:src-content=".uri_img3" width="60"/></a></span>
</div>

Obviously, this doesn't work. I tried a couple of other things but
neither turned out to be a solution.
Can anyone provide some advice on this? This would be great since I am
kindda stuck...

Thanks in advance.
Regards,
steff

John Callahan

unread,
Jun 5, 2009, 11:52:27 AM6/5/09
to simile-...@googlegroups.com
This would be very nice to have. I've tried the same with Lightbox2
(jQuery based) without luck. It could have to do with the order the
libraries are called but that's just a wild guess. Sorry I can't help
further.

- John

steff

unread,
Jun 6, 2009, 7:27:38 AM6/6/09
to SIMILE Widgets
Hi John,

I'm somehow glad that you ran into the same problem because I thought
I was just too stupid.
Actually I tried the Lightbox2 component as well and it showed the
exact same behaviour. The "rel" attribute is set up correctly but when
I modify the js function "showTickbox(a)" to display its value as the
caption it is always false. You might be right with your assumption
that the order of library calls are responsible for this. But that's
just a guess, I suppose.

Thanks for answering. Maybe someone has solved this...

rommyusa

unread,
Jun 11, 2009, 7:56:38 PM6/11/09
to SIMILE Widgets
I had the same problem with ThickBox 3.1 GALLERY IMAGES... I saw that
the code worked on the sample site (http://jquery.com/demo/thickbox/)
and after investigating further, I noticed that the sample code is
using jQuery version 1.1.3.1. When I downloaded this version it
worked. (Previously I had used a newer version 1.3.2).
Hope this helps.

On Jun 5, 8:09 am, "stefan.dierd...@googlemail.com"

David Huynh

unread,
Jun 12, 2009, 12:35:33 AM6/12/09
to simile-...@googlegroups.com
Steff,

This is tricky because the views don't keep track of the list of items
that they are displaying. There is a way to get the *set* of those
items, but not the *list*, as the ordering of those items is dependent
on each view, and though they get sorted, their order is only used for
rendering and then discarded.

You might have to override the default implementation a bit to do what
you want. The list view and thumbnail view are both backed by this code

http://api.simile-widgets.org/exhibit/2.2.0/scripts/ui/views/ordered-view-frame.js
Look for
Exhibit.OrderedViewFrame.prototype._internalReconstruct
inside it, find the function called createItem. You can override
_internalReconstruct so that createItem caches the item it renders into
an array, from where your Thickbox can used to find the next item.

David

steff

unread,
Jul 1, 2009, 3:07:15 PM7/1/09
to SIMILE Widgets
Thank you guys for replying and sorry for being so late to get back to
you. Somehow my mail notification refused to work and I seem to
heavily rely on these kind of things. My bad.

But let me ask you one thing first: is there a decent and up-to-date
documentation on how to host exhibit on one's own webserver or even
local? I found a bunch of them and they all do not seem to work. I
checked it out recursively via SVN from http://simile-widgets.googlecode.com/svn/exhibit/trunk

Thanks for helping out...

On 12 Jun., 06:35, David Huynh <dfhu...@alum.mit.edu> wrote:
> http://api.simile-widgets.org/exhibit/2.2.0/scripts/ui/views/ordered-...
Message has been deleted

steff

unread,
Jul 1, 2009, 3:31:41 PM7/1/09
to SIMILE Widgets
Thank you, rommyusa. I swapped the files and it really works. I can't
believe things can be sooo easy. Thanks a million, mate.

Greg Linch

unread,
Aug 25, 2009, 12:03:39 PM8/25/09
to SIMILE Widgets
Hi David,

I implemented Thickbox using the "Integrating Thickbox" page

http://simile.mit.edu/wiki/Exhibit/Thickbox_integration

and got Thickbox to work, but it broke the View Panel area (maps,
etc.):

http://www.greglinch.com/jfk/jfkuse/jfk.html

Any thoughts?

Thanks!
Reply all
Reply to author
Forward
0 new messages