[pmwiki-users] Galleria
DaveG
pmwiki at solidgone.com
Tue Jun 14 11:58:26 CDT 2011
On 6/11/2011 11:12 AM, Peter Gragert wrote:
> Hallo to Petko and Dave
>
> This works in my 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(){
> $(".Galleria").galleria({
> width: 900,
> height: 900,
> autoplay: 2000,
> transition: "pulse",
> dataConfig: function(img){
> return { description: $(img).nextAll(\'em\').html() };
> }
> });
> });
> //--></script>';
>
> But now it is the same for all>>Galleria<<
Correct. That is because getDataConfig not only sets preferences, but
also actually creates the gallery. This basically means you need to
either use markup, OR use the getDataConfig method for a given
gallery(ies) -- you can't do both.
The galleria markup does allow you to pass in the same parameters as
getDataConfig though, so this shouldn't be a show-stopper.
It would be nice to be able to set some global parameters though, like
the description/tag preference for example. I'll try to take a look at
that over the weekend.
>
> 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 ???<<
Either use the markup, with parameters, or use the method Petko details
in his earlier reply.
~ ~ Dave
More information about the pmwiki-users
mailing list