XML MiniSlideShow

 

 

XML Mini Slideshow for Gallery2 and Now Gallery3
Copyright (C) 2009 Wayne Patterson http://www.flashyourweb.com

This program is freeware.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@version 3.0.1 Date: 12-09-2010
@author Wayne Patterson
@my best advice use our embed tool.

Download

The MiniSlideShow communicates with your Gallery2 website via an external XML generator, and is not part of the official Gallery2 package.

The MiniSlideShow will start loading gallery item thumbs - after 4 it will start displaying while loading the rest in the background.

 

New

12-09-2010 Added:

"onMiniSlideShowReady" external js function called when first image is loaded.

7-15-2009 Added:

The mini will now load the built-in mediaRss feeds in Gallery3 as well as the Gallery2 slideshow module's mediaRss feeds.

 

Quick Jump
FileList
mediaRss
Embedding
External Variables
Transitions
swfObject
Embed-O-Rator

Having trouble embedding
the Mini in your page?
Try Our New Tool!

Embed-O-Rator


FileList:

  • minislideshow.swf
  • crossdomain.xml
  • mediaRss.php
  • usage.txt

 

 

mediaRss.php Usage You can direct the mini to a specific album by simply supplying the g2_itemId of the album

ie. http://www.yoursite.com/gallery2/mediaRss.php?g2_itemId=49

*Note on Gallery style urls and Flash
Flash interprets &(ampersand) as a break, so you will need to replace them with the unicode equivelent %26 in the url only.
Continue adding your additional vars with the &(ampersand).

You can also take advantage of the Dynamic, Keyword or even the experimental Tags modules via the mode command:

http://www.yoursite.com/gallery2/mediaRss.php?mode=dynamic%26g2_view=dynamicalbum.UpdatesAlbum

http://www.yoursite.com/gallery2/mediaRss.php?mode=dynamic%26g2_view=dynamicalbum.RandomAlbum

http://www.yoursite.com/gallery2/mediaRss.php?mode=dynamic%26g2_view=dynamicalbum.PopularAlbum

http://www.yoursite.com/gallery2/mediaRss.php?mode=dynamic%26g2_view=keyalbum.KeywordAlbum%26g2_keyword=yourKeyword

http://www.yoursite.com/gallery2/mediaRss.php?mode=dynamic%26g2_view=tags.VirtualAlbum%26g2_tagName=yourTagName

 

I've even added a Mime search.

 

http://www.yoursite.com/gallery2/mediaRss.php?mode=search%26g2_itemId=49%26mime=video/x-flv

Here we tell it to search starting from the album with a g2_itemId of 49 for all flash videos(video/x-flv) - recursive search.

 

With useFull we now have the ability to poll for derivative images of a particular size(if they exist) - added in 2.0.6.

 

http://www.yoursite.com/gallery2/mediaRss.php?g2_itemId=49%26g2_maxImageWidth=600%26g2_maxImageHeight=600&useFull=true

Here we poll for images no larger than 600x600 in album 49


Embedding/Usage
1. Upload minislideshow.swf and your mediaRss(.php) file to your gallery2 base directory.
(if you have previous version of mediaRss.php, there have been some changes)

2. Edit line 30 of your mediaRss(.php) to reflect your setup (default will work for most).

 line30

* Hint: If your gallery is embedded the embedUri needs to reflect you CMS' embedUri

3. Place the following in your webpage where you want the mini slideshow to appear: (please consider using the swfObject method described below)


The above code sample would render something similar to:

Flash player 9,0,115,0 or above is required to view this demo, click here to upgrade.
get_flashplayer


Edit the g2_itemId in the xmlUrl to reflect the album you want to be displayed and also the site url.
* Hint: If you have url rewrite enabled, you may have to temporarily disable it to see the g2_itemId in your album's url.
* Hint: To allow fullscreen mode, add allowFullscreen="true" to your embed code. - Must have the latest FlashPlayer(9,0,115,0) to have wmode="transparent" and allowFullscreen="true" at the same time.


External Variables(case sensitive)

External Variable Description/Possible Value
shuffle true or false
showDropShadow true or false
delay number in seconds to display a slide
transInType Transition in. Default Fade. (see Available Transitions below)
transOutType Transition out. Default Fade. (see Available Transitions below)
noLink Can be true. Default false.
showTitle top or bottom. Default false.
altLink Replace all links with a single alternate link for the whole slideshow. Default false.
linkTarget Specify the target for all links in the slideshow. Default _parent.
titleColor Title text color. Default FFFFFF(white).
titleBgColor Title text background color. Default 333333(charcoal).
Masks circleMask, roundedMask, starMask example: &starMask=true
useFull true or false - use the full image instead of the thumb. Perfect for large displays (enables fullscreen icon)
fullscreenIcon hide the fullscreen icon when usefull is used Default false.
showControls true(autohide) or false or always - show the controlBar. Default true. updated in 2.0.7
autoStart true or false Default true. added in 2.0.7
loop true or false - restart after last image. Default true. added in 2.0.7
preload number of images to preload. Default 4. added in 2.0.6
siteInfoText create a link back to your site in the right-click context menu eg. Copyright 2009 FlashYourWeb.com
siteInfoUrl link url for siteInfoText eg. http://www.flashyourweb.com
allowScaling if you are using full images (useFull) images will scale to fill the screen in fullscreen mode. Default false. added in 2.0.8
showLoader Show/Hide the loader animation and image count while loading. added in 2.0.8
mp3Url If you include an mp3Url, music will start as soon as its loaded and the slideshow is playing.
A small mute button will also be available. added in 3.0.0
customLink Use the value of a custom field as your link. Effectively allowing for each image to have its own link.
Full details here. added in 3.0.0
linkToParent Link to the item's parent album Default false. added in 3.0.0
useResizes When useFull with G3 you can choose resizes instead of fullsize. added in 3.0.0
fontScale which sets the font-size to Stage.width/fontScale - so the smaller the number the larger the text size - default 20 added in 3.0.1


Add your external variables to your xmlUrl separated with an ampersand (&) ie.
xmlUrl=http://yoursite.com/gallery2/mediaRss.php?g2_itemId=1486 & shuffle=true & showDropShadow=true & delay=3
&
transInType=Fade & transOutType=Random

Available Transitions(case sensitive)

Transition Description
Blinds Reveals the movie clip object by using appearing or disappearing rectangles.
Fade Fades the movie clip object in or out.
Fly Slides the movie clip object in from a specified direction.
Iris Reveals or hides the movie clip object by using an animated mask of a square shape or a circle shape that zooms in or out.
Photo Causes the movie clip object to appear or disappear like a photographic flash.
PixelDissolve Reveals or hides the movie clip object by using randomly appearing or disappearing rectangles in a checkerboard pattern.
Rotate Rotates the movie clip object.
Squeeze Scales the movie clip object horizontally or vertically.
Wipe Reveals or hides the movie clip object by using an animated mask of a shape that moves horizontally.
Zoom Zooms the movie clip object in or out by scaling it in proportion.
Random A mix of all.


Embedding with swfObject

swfObject uses javascript to sidestep IE7 and Opera's "Click here to activate and use this control" blunder by writing the flash object to the page after it fully loads.

Its the preferred method to embed flash these days.

1st. Include swfObject in the head of your site.
<script type="text/javascript" src="http://www.yoursite.com/swfobject.js"></script>

Any questions, comments, or suggestions are welcome in our forums.

 

We are a small development team which focuses on creating applications that positively impact Open Source communities and projects. Donate a few and help support FlashYourWeb development. Thanks!

| View Printable Version