plainblack.com
Username Password
search
Bookmark and Share

    

Slideshow for the gallery

User kimd
Date 2/28/2010 3:22 am
Views 299
Rating 0    Rate [
|
]
Previous · Next
User Message
kimd

Some of our users complained that it is quite inconvenient to look at photos in the gallery. Of course, there is a slideshow feature. However, I would not call it state-of-the-art. It works, but it is definitely not sexy...

After some research I noticed that there is a lot of JS code available on the net. One slideshow particularly simple to use is the  TripTracker slideshow. Adding it to the gallery is as simple as adding the following lines of code to the default gallery view template:

<script type="text/javascript" src="http://slideshow.triptracker.net/slide.js"></script>
<script type="text/javascript">
    var viewer = new PhotoViewer();
    <tmpl_loop file_loop>
        viewer.add('<tmpl_var fileUrl escape="js">','<tmpl_var title escape="js"> - <tmpl_var synopsis_textonly escape="js">','^D("%z",<tmpl_var creationDate>); - <tmpl_var ownerUsername escape="js">');
    </tmpl_loop file_loop>
    viewer.enableAutoPlay();
    viewer.disablePanning();
</script>

Now we only need to replace the link to the slideshow view with

<a href="removed)">^International(template url_slideshow,Asset_GalleryAlbum);</a> &middot;

and we are done (Note that slideshows will only contain pictures of the current page. But that is a different problem).

The good thing about TripTracker is that it does not have external dependencies. The bad news is that it is only free for non-commercial use. So, the reason I am writing all this is that I am looking for a GPL'd slideshow that could be integrated into the webgui core.

Alternatively, we could of course try to improve the current slideshow. I noticed, that YUI comes with an overlay widget and that there is an image loader package. Maybe, it is just a few lines to create something similar as the TripTracker slideshow. However, I do not know enough about JS to be able to judge this.

Any suggestions?

--- (Edited on 2/28/2010 3:22 am [GMT-0600] by kimd) ---



Back to Top
Rate [
|
]
 
 
kimd

I just noticed that the href attribute in the <a>-tag was removed by the HTML filter. It was set to "javascript:void(viewer.show(0))".

--- (Edited on 2/28/2010 3:25 am [GMT-0600] by kimd) ---

--- (Edited on 2/28/2010 3:25 am [GMT-0600] by kimd) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved