May 20, 2013

Shadowbox- gallery set (How To)

A lot of questions get asked in the RapidWeaver forum about creating a gallery set from Shadowbox , so this short how-to should help explain using this .

What is a gallery set ?
In Shadowbox, you can group media(images, movies, flash) as a set, in this case a gallery set , when the shadowbox opens you get previous and next arrows or text selections to move between the gallery set items you have set up.

An example of a gallery set item


In this example with Shadowbox v2 you get a graphical link indicating more items, no need to close the overlay and select an additional image :)
So let us proceed to make a gallery set item to pop up with Shadowbox.

Make a link



Select Text
Add Link

Link to image – shadowbox setting

1. Add Link to to asset, this could be a movie too

2. Add custom attribute

3. add the rel tag shadowbox[test] . This is to notify Shadowbox that the image is part of a set

no spaces in the gallery name or it will not work :D

Test the link



Here we have the image in a Shadowbox, ths actual item is in gallery set of 3 items. (you can move between a Flash file, a web page or image anything you want )

That’s it


Shadowbox Take 2 – screencast and demo

Shadowbox Take 2 – screencast and demo (approx 13minutes)
page9-shadowbox2.png

ShadowBox – advanced integration
Developers Site: http://mjijackson.com/shadowbox/ (no relation to the singer :) )

So what ?
This readme covers the hard coded integration for ShadowBox and to have this available in all your pages, if you require :)
Here you can see the demo page with the finished result. This also works with Blocks, Accordion and Carousel (well partially :( ) and even Pluskit import.. how cool is that!

Integrating to RapidWeaver!
After my first try, I though I needed to do something a bit more integrated so it is used on all pages (thanks to seemore for the hint). just to recap some basics, shadowbox will use the Mootools 1.11 framework which should keep things tidy with all the other Mootools related plugins that are produced by YourHead.

I will walk though all this in the screencast …. so please watch (feel free to pause at any time) read through compare notes and what is actually happening on the screencast and then finally you can use this in your Theme of choice :)

First of all
- Duplicate your Theme (Ctrl- Click Duplicate) and give it a name

- download(see below download files in the comments) the files that we are going to add in the Theme contents , add all the files (except the readme) from the Shadowbox folder into the duplicated Theme contents, this includes the javascript, the images and Jeroens FLV player.
Open the Themes.plist in your text editor (I’m using Textmate)
Things to add to the Theme.plist see image below
        loading.gif
        overlay-85.png
        mootools.js
        shadowbox-mootools.js
        shadowbox.js
        shadowbox.css
        flvplayer.swf
Figure 1.
page9-shadowplist.jpg

Add the javascript Header information following RapidWeaver conventions. This includes the relevant information for your pages to find the mootools, shadowbox javascript and shadowbox css. In addition it also initialises the shadowbox with extra path information to find the images and flvplayer as you can see below.

    <script type=“text/javascript” src=“%pathto(mootools.js)%”>script>
    <script type=“text/javascript” src=“%pathto(shadowbox-mootools.js)%”>script>
    <script type=“text/javascript” src=“%pathto(shadowbox.js)%”>script>
    <script type=“text/javascript”>
                    window.addEvent(‘domready’,function(){
            var options = {
                loadingImage:‘%pathto(loading.gif)%’,
                flvPlayer:‘%pathto(flvplayer.swf)%’,
                overlayBgImage:‘%pathto(overlay-85.png)%’,
            };

            window.addEvent(Shadowbox.init(options));
                    });
    script>

Screenshot of what it should look like
figure 2.

page9-shadowjscript.jpg

Add the following to find the shadowbox css
rel=“stylesheet” type=“text/css” media=“screen” href=“%pathto(shadowbox.css)%”  />

Screenshot again
Figure 3.
page9-shadowcss.jpg

-Install the snippets I have created first of all from the download pack
Create a new project or Test Page
- Add the ShadowBox JS Header to the Header Section in the Page Inspector

Looks like we are good to go so lets add a page to our ShadowBox modified Theme and see if it works.
As a note this will work in preview mode and export also.

To call a Shadowbox (without going into too much detail) just add shadowbox to the rel tag. You can see more at the developers site :)

Some examples… it is worth noting you can change the default size at initialisation. Web page content goes full size :)
Figure 4.
page9-sh1.jpg

Change size of Shadowbox, using a FLV asset
Figure 5.
page9-sh2.jpg

Mediabox Integration with RapidWeaver pages

Mediabox Integration with RapidWeaver pages
page9-mediaboxposter.png
Another cool videobox plug in using Mootools framework to play back video content, Mediabox also supports web content too. This is what I use on the site here :)
To accompany the RW forum article here

Shadowbox screencast integration and RapidWeaver

Shadowbox screencast integration
page9-shadowbox.png
A pretty cool lightbox (that does everything from web, mov, flv, wmv…)… check out the demo page for more information on how to integrate to RapidWeaver and my test examples online