[pmwiki-users] Galleria
Petko Yotov
5ko at 5ko.fr
Tue Jun 14 03:30:57 CDT 2011
On Saturday 11 June 2011 17:12:42 Peter Gragert wrote:
> But now it is the same for all >>Galleria<<
>
> Could be with different with an if ... else if ... but that is not so nice.
> Any idea how to put the parameters to >>Galleria ???autoplay ???
> ???transition ??? <<
Until Dave implements the changes to the recipe (and after), I could recommend
that you do not have a huge number of different Galleria styles. 2 or 3 styles
should be more than enough, otherwise you will annoy your visitors, especially
those who use Internet a lot (they tend to hate animations).
If you have a limited number of styles, you can add them all to config.php:
$HTMLHeaderFmt['galleria-js'] = '<script type="text/javascript"
src="$PubDirUrl/galleria/galleria-1.2.3.js"></script>
<script type="text/javascript"><!--
$(document).ready(function(){
function getDataConfig(img) { // Same dataConfig function for all Gallerias
return { description: $(img).nextAll(\'em\').html() };
}
$(".Galleria").galleria({ // Style 1
dataConfig: getDataConfig, width: 500, height: 400
});
$(".GalleriaPulse").galleria({ // Style 2, Pulse
dataConfig: getDataConfig, width: 500, height: 400, transition: "pulse"
});
$(".GalleriaAutoplay").galleria({ // Style 3, Flash & autoplay
dataConfig: getDataConfig, width: 500, height: 400, autoplay: 2000,
transition: "flash"
});
});
//--></script>';
Then, in the wiki page, you use >>Galleria<<, >>GalleriaPulse<< or
>>GalleriaAutoplay<<, etc.
Petko
More information about the pmwiki-users
mailing list