Forum .LRN Q&A: Integration of Shadowbox.js in Xowiki - Pages

I would like to integrate shadowbox.js (see http://mjijackson.com/shadowbox/) into an xowiki page for viewing websites or multimedia content.
My goal is to have thumbnails (as image snapshots manually taken) or basic links on an xowiki - page and if the user clicks on those thumbnails the reffered webpage is shown like in section WEB on http://mjijackson.com/shadowbox/.

If I place this xowiki page as a portlet on the community page we have a very nice way of accessing different webpages or pictures.

How would I realize this? I tried to integrate the js page in xowiki like stated here http://alice.wu-wien.ac.at:8000/xowiki-doc/#file-swf but had no luck.

Collapse
Posted by Stefan Sobernig on
Christian,


My goal is to have thumbnails (as image snapshots manually taken) or basic links on an xowiki - page and if the user clicks on those thumbnails the reffered webpage is shown like in section WEB on http://mjijackson.com/shadowbox/.

Let me rephrase (to make sure I understand correctly). You want to place shadowbox-empowered anchors on your wiki pages (ordinary ::xowiki::Pages), e.g.:

[[shadowbox:caveman.swf|A flash strip|-gallery Mixed -width 520 -height 390]]

which then embeds a thumbnail (in a gallery context) into the rendered state of the xowiki Page, such as:

swf

If so, then you would have to implement your own "typed link", in XOWiki terms that offers the [[shadowbox:...]] prefix. Doing this is described, roughly, in our last conference tutorial on XOWiki, see slides 6.5 pp., including code snippets.

Collapse
Posted by Stefan Sobernig on
What I left uncommented:


I tried to integrate the js page in xowiki like stated here http://alice.wu-wien.ac.at:8000/xowiki-doc/#file-swf but had no luck.

Well, this can't work as expected because shadowbox environment needs to be initialised once the DOM structure of a page has materialised in the browser. Upon this, an event is fired which needs to be sensed and make shadowbox to initialise. This kind of event subscription could be achieved through embedding [[shadowbox.js]], although. More critical is that the shadowbox distribution contains more than the core js script (adapters, images etc.). so all these need to be in place ...

Collapse
Posted by Stefan Sobernig on
So ... somehow I got caught. I assembled a first, working shot to provide for a shadowbox typed link.

To get started:

  1. cd *oacs_dotlrn_installation*/packages/xowiki/
  2. wget http://alice.wu-wien.ac.at:8000/xowiki-doc/download/file/shadowbox-typed-link.patch
  3. patch -p0 < shadowbox-typed-link.patch
  4. cd www/resources && wget http://alice.wu-wien.ac.at:8000/xowiki-doc/download/file/shadowbox-init.js
  5. Get shadowbox and unpack to www/resources/shadowbox

How to use:

[[shadowbox:test.png|My test page|-height 15ex]]

(gallery)

[[shadowbox:test.png|My test page|-media_gallery test -height 15ex]]
[[shadowbox:test.png|My test page|-media_gallery test -height 15ex]]

It should equally work for the supported movie formats, but how to provide parameterisation in a consistent manner would require more thorough evaluation (there is a plethora of options available) ...

Collapse
Posted by Christian Fuchs on
Thanks Stefan,

since I will hand over this information to our technical support person at KnowledgeMarkets and after I am able to test it, I will be back to you.

Looks good for me. Thanks for your time.